Revision 846b80db
modules/DiWheelDrive_1-1/module.c | ||
---|---|---|
807 | 807 |
/* data */ &_utVcnl4020Data, |
808 | 808 |
}; |
809 | 809 |
|
810 |
static ut_rtcandata_t _utLldRtCanData = { |
|
811 |
/*operation */ NULL |
|
812 |
}; |
|
813 |
|
|
810 | 814 |
static int _utShellCmdCb_LldRtCan(BaseSequentialStream* stream, int argc, char* argv[]) |
811 | 815 |
{ |
812 |
(void)argc; |
|
813 |
(void)argv; |
|
814 |
aosUtRun(stream, &moduleUtLldRtCan, NULL); |
|
815 |
return AOS_OK; |
|
816 |
if(argc == 2 ){ |
|
817 |
if (strcmp(argv[1], "send") == 0) { |
|
818 |
((ut_rtcandata_t*)moduleUtLldRtCan.data)->operation = "send"; |
|
819 |
aosUtRun(stream, &moduleUtLldRtCan,NULL); |
|
820 |
return AOS_OK; |
|
821 |
}else if(strcmp(argv[1], "receive") == 0){ |
|
822 |
((ut_rtcandata_t*)moduleUtLldRtCan.data)->operation = "receive"; |
|
823 |
aosUtRun(stream, &moduleUtLldRtCan,NULL); |
|
824 |
return AOS_OK; |
|
825 |
} |
|
826 |
} |
|
827 |
return AOS_INVALID_ARGUMENTS; |
|
816 | 828 |
} |
817 | 829 |
aos_unittest_t moduleUtLldRtCan = { |
818 | 830 |
/* name */ "RTCAN", |
... | ... | |
823 | 835 |
/* callback */ _utShellCmdCb_LldRtCan, |
824 | 836 |
/* next */ NULL, |
825 | 837 |
}, |
826 |
/* data */ NULL,
|
|
838 |
/* data */ &_utLldRtCanData,
|
|
827 | 839 |
}; |
828 | 840 |
|
829 | 841 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
Also available in: Unified diff