123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /*
- * Module_PCBTest.c
- *
- * Created on: 2020¦~5¤ë17¤é
- * Author: Wendell
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "Module_PCBTest.h"
- #include "Comm_Test.h"
- #include "PrimaryMCU_Test.h"
- #include "IO_Test.h"
- #include "Storage_Test.h"
- #include "Ethernet_Test.h"
- TestItem const TestList[] =
- {
- { 4, "Communication Test", "comm", DoDCMCommTest},
- { 4, "Ethernet 0 Test", "eth0", DoEthernet0Test},
- { 4, "Ethernet 1 Test", "eth1", DoEthernet1Test},
- { 7, "Primary MCU Test", "primary", DoPrimaryMCUTest},
- { 2, "Digital & Analog IO Test", "io", DoIOTest},
- { 7, "Storage Test", "storage", DoStorageTest},
- { 0, "", "", 0}
- };
- int main(int argc, char *argv[])
- {
- const TestItem *tItem;
- if(argc > 1)
- {
- for(tItem = TestList; tItem->CmdStrLen; tItem++)
- {
- if(strncmp(tItem->Cmd, argv[1], tItem->CmdStrLen) == 0)
- {
- printf("\r\nDCM %s Start", tItem->Name); /* prints !!!Hello World!!! */
- (*tItem->fnCmd)();
- break;
- }
- }
- }
- else
- {
- printf("\r\nNeed Some Parameter");
- }
- printf("\r\n");
- return 0;
- }
|