Revision df20c2fc
bootloader/AMiRo-BLT | ||
---|---|---|
1 |
Subproject commit 03906dc3eea1bcc0aa880aeadd1bc1ba1d26d472 |
|
1 |
Subproject commit 2880bac8f7c2bc4873cfdd9e88a914fb10659f59 |
core/core.mk | ||
---|---|---|
31 | 31 |
|
32 | 32 |
# C source files |
33 | 33 |
AMIROOSCORECSRC = $(wildcard $(AMIROOS_CORE_DIR)src/*.c) |
34 |
AMIROOSCORECSRC = $(AMIROOS_CORE_DIR)src/aos_debug.c \ |
|
35 |
$(AMIROOS_CORE_DIR)src/aos_iostream.c \ |
|
36 |
$(AMIROOS_CORE_DIR)src/aos_rtcan.c \ |
|
37 |
$(AMIROOS_CORE_DIR)src/aos_shell.c \ |
|
38 |
$(AMIROOS_CORE_DIR)src/aos_system.c \ |
|
39 |
$(AMIROOS_CORE_DIR)src/aos_thread.c \ |
|
40 |
$(AMIROOS_CORE_DIR)src/aos_time.c \ |
|
41 |
$(AMIROOS_CORE_DIR)src/aos_timer.c \ |
|
42 |
$(AMIROOS_CORE_DIR)src/aos_unittest.c |
|
43 | 34 |
|
44 | 35 |
# C++ source files |
45 | 36 |
AMIROOSCORECPPSRC = $(wildcard $(AMIROOS_CORE_DIR)src/*.c?*) |
modules/PowerManagement_1-1/module.c | ||
---|---|---|
1317 | 1317 |
/* data */ &_utAlldVcnl4020Data, |
1318 | 1318 |
}; |
1319 | 1319 |
|
1320 |
static ut_rtcandata_t _utLldRtCanData = { |
|
1321 |
/*operation */ NULL |
|
1322 |
}; |
|
1323 |
|
|
1324 |
static int _utShellCmdCb_LldRtCan(BaseSequentialStream* stream, int argc, char* argv[]) |
|
1325 |
{ |
|
1326 |
if(argc == 2 ){ |
|
1327 |
if (strcmp(argv[1], "send") == 0) { |
|
1328 |
((ut_rtcandata_t*)moduleUtLldRtCan.data)->operation = "send"; |
|
1329 |
aosUtRun(stream, &moduleUtLldRtCan,NULL); |
|
1330 |
return AOS_OK; |
|
1331 |
}else if(strcmp(argv[1], "receive") == 0){ |
|
1332 |
((ut_rtcandata_t*)moduleUtLldRtCan.data)->operation = "receive"; |
|
1333 |
aosUtRun(stream, &moduleUtLldRtCan,NULL); |
|
1334 |
return AOS_OK; |
|
1335 |
} |
|
1336 |
} |
|
1337 |
return AOS_INVALID_ARGUMENTS; |
|
1338 |
} |
|
1339 |
aos_unittest_t moduleUtLldRtCan = { |
|
1340 |
/* name */ "RTCAN", |
|
1341 |
/* info */ NULL, |
|
1342 |
/* test function */ utLldRtCanFunc, |
|
1343 |
/* shell command */ { |
|
1344 |
/* name */ "unittest:rtcan", |
|
1345 |
/* callback */ _utShellCmdCb_LldRtCan, |
|
1346 |
/* next */ NULL, |
|
1347 |
}, |
|
1348 |
/* data */&_utLldRtCanData, |
|
1349 |
}; |
|
1320 | 1350 |
#endif /* BOARD_SENSORRING == BOARD_PROXIMITYSENSOR */ |
1321 | 1351 |
|
1322 | 1352 |
#if (BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L0X) || defined(__DOXYGEN__) |
... | ... | |
1473 | 1503 |
|
1474 | 1504 |
#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */ |
1475 | 1505 |
|
1476 |
static ut_rtcandata_t _utLldRtCanData = { |
|
1477 |
/*operation */ NULL |
|
1478 |
}; |
|
1479 |
|
|
1480 |
static int _utShellCmdCb_LldRtCan(BaseSequentialStream* stream, int argc, char* argv[]) |
|
1481 |
{ |
|
1482 |
if(argc == 2 ){ |
|
1483 |
if (strcmp(argv[1], "send") == 0) { |
|
1484 |
((ut_rtcandata_t*)moduleUtLldRtCan.data)->operation = "send"; |
|
1485 |
aosUtRun(stream, &moduleUtLldRtCan,NULL); |
|
1486 |
return AOS_OK; |
|
1487 |
}else if(strcmp(argv[1], "receive") == 0){ |
|
1488 |
((ut_rtcandata_t*)moduleUtLldRtCan.data)->operation = "receive"; |
|
1489 |
aosUtRun(stream, &moduleUtLldRtCan,NULL); |
|
1490 |
return AOS_OK; |
|
1491 |
} |
|
1492 |
} |
|
1493 |
return AOS_INVALID_ARGUMENTS; |
|
1494 |
} |
|
1495 |
aos_unittest_t moduleUtLldRtCan = { |
|
1496 |
/* name */ "RTCAN", |
|
1497 |
/* info */ NULL, |
|
1498 |
/* test function */ utLldRtCanFunc, |
|
1499 |
/* shell command */ { |
|
1500 |
/* name */ "unittest:rtcan", |
|
1501 |
/* callback */ _utShellCmdCb_LldRtCan, |
|
1502 |
/* next */ NULL, |
|
1503 |
}, |
|
1504 |
/* data */ &_utLldRtCanData, |
|
1505 |
}; |
|
1506 |
|
|
1507 | 1506 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
1508 | 1507 |
|
1509 | 1508 |
/** @} */ |
modules/PowerManagement_1-1/module.h | ||
---|---|---|
444 | 444 |
aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113.shellcmd); \ |
445 | 445 |
aosShellAddCommand(&aos.shell, &moduleUtAlldTps62113Ina219.shellcmd); \ |
446 | 446 |
MODULE_INIT_TEST_SENSORRING(); \ |
447 |
aosShellAddCommand(&aos.shell, &moduleUtAlldVcnl4020.shellcmd); \ |
|
448 | 447 |
aosShellAddCommand(&aos.shell, &moduleUtLldRtCan.shellcmd); \ |
449 | 448 |
} |
450 | 449 |
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__) |
... | ... | |
595 | 594 |
#include <alld_led.h> |
596 | 595 |
#include <alld_pklcs1212e4001.h> |
597 | 596 |
#include <alld_tps62113.h> |
598 |
|
|
599 | 597 |
/** |
600 | 598 |
* @brief EEPROM driver. |
601 | 599 |
*/ |
... | ... | |
806 | 804 |
* @brief TPS62113 (step-sown converter) in combination with INA219 (power monitor) unit test object. |
807 | 805 |
*/ |
808 | 806 |
extern aos_unittest_t moduleUtAlldTps62113Ina219; |
807 |
/** |
|
808 |
* @brief RtCan Unit test Object |
|
809 |
*/ |
|
810 |
extern aos_unittest_t moduleUtLldRtCan; |
|
811 |
|
|
809 | 812 |
|
810 | 813 |
#if (BOARD_SENSORRING == BOARD_PROXIMITYSENSOR) || defined(__DOXYGEN__) |
811 | 814 |
|
... | ... | |
864 | 867 |
|
865 | 868 |
#endif /* BOARD_SENSORRING == BOARD_DISTANCESENSOR_VL53L1X */ |
866 | 869 |
|
867 |
/** |
|
868 |
* @brief RtCan unit test object. |
|
869 |
*/ |
|
870 |
extern aos_unittest_t moduleUtLldRtCan; |
|
871 | 870 |
|
872 | 871 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
873 | 872 |
|
periphery-lld/AMiRo-LLD | ||
---|---|---|
1 |
Subproject commit 11500ad81cfe6291b84e2faaf5731446da4014d4 |
|
1 |
Subproject commit bb46c559fac6ba3c2c9e1516d4a4171213263157 |
unittests/lld/src/ut_lld_rtcan.c | ||
---|---|---|
56 | 56 |
ctfp.SID = 0x003; |
57 | 57 |
msg = rtcan_transmit(&MODULE_HAL_CAN,CAN_ANY_MAILBOX,&ctfp); |
58 | 58 |
}else if (strcmp(operation, "receive")==0){ |
59 |
aosUtInfoMsg(stream,"trying to receive msg"); |
|
59 | 60 |
CANRxFrame crfp; |
60 | 61 |
crfp.RTR = CAN_RTR_DATA; |
61 | 62 |
crfp.IDE = CAN_IDE_STD; |
62 | 63 |
crfp.DLC = 0; |
63 | 64 |
crfp.SID = 0x003; |
65 |
int empty = can_lld_is_rx_nonempty(&MODULE_HAL_CAN,CAN_ANY_MAILBOX); |
|
66 |
aosUtInfoMsg(stream,"%d",empty); |
|
64 | 67 |
msg = rtcan_receive(&MODULE_HAL_CAN,CAN_ANY_MAILBOX,&crfp); |
65 | 68 |
} |
66 | 69 |
|
unittests/unittests.mk | ||
---|---|---|
32 | 32 |
|
33 | 33 |
# C sources |
34 | 34 |
UNITTESTSCSRC = $(wildcard $(UNITTESTS_DIR)lld/src/*.c) \ |
35 |
$(wildcard $(UNITTESTS_DIR)periphery-lld/src/*.c) |
|
36 |
UNITTESTSCSRC = $(UNITTESTS_DIR)lld/src/ut_lld_adc.c \ |
|
37 |
$(UNITTESTS_DIR)lld/src/ut_lld_rtcan.c \ |
|
38 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_a3906.c \ |
|
39 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_at24c01bn-sh-b.c \ |
|
40 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_bq24103a.c \ |
|
41 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_bq27500.c \ |
|
42 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_bq27500_bq24103a.c \ |
|
43 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_hmc5883l.c \ |
|
44 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_ina219.c \ |
|
45 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_l3g4200d.c \ |
|
46 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_led.c \ |
|
47 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_lis331dlh.c \ |
|
48 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_ltc4412.c \ |
|
49 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_mpr121.c \ |
|
50 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_pca9544a.c \ |
|
51 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_pklcs1212e4001.c \ |
|
52 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_tlc5947.c \ |
|
53 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_tps2051bdbv.c \ |
|
54 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_tps62113.c \ |
|
55 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_tps62113_ina219.c \ |
|
56 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_vcnl4020.c \ |
|
57 |
$(UNITTESTS_DIR)periphery-lld/src/ut_alld_dw1000.c |
|
35 |
$(wildcard $(UNITTESTS_DIR)periphery-lld/src/*.c) |
Also available in: Unified diff