Revision 1678f270 modules/RT-STM32L476RG-NUCLEO64/module.c
| modules/RT-STM32L476RG-NUCLEO64/module.c | ||
|---|---|---|
| 71 | 71 |
#endif |
| 72 | 72 |
|
| 73 | 73 |
|
| 74 |
MPU6050Driver moduleLldMpu6050 = {
|
|
| 75 |
/* I2C Driver */ &MODULE_HAL_I2C_MPU6050, |
|
| 76 |
/* I²C address */ 0x68, |
|
| 77 |
/* current LSB (uA) */ 0x00u, |
|
| 78 |
/* configuration */ NULL, |
|
| 79 |
}; |
|
| 80 |
|
|
| 81 |
/* MPU6050 */ |
|
| 82 |
static int _utShellCmdCb_AlldMpu6050(BaseSequentialStream* stream, int argc, char* argv[]) |
|
| 83 |
{
|
|
| 84 |
(void)argc; |
|
| 85 |
(void)argv; |
|
| 86 |
aosUtRun(stream, &moduleUtAlldMpu6050, NULL); |
|
| 87 |
return AOS_OK; |
|
| 88 |
} |
|
| 89 |
|
|
| 90 |
static ut_mpu6050data_t _utAlldMpu6050Data = {
|
|
| 91 |
/* driver */ &moduleLldMpu6050, |
|
| 92 |
/* timeout */ MICROSECONDS_PER_SECOND, |
|
| 93 |
}; |
|
| 94 |
aos_unittest_t moduleUtAlldMpu6050 = {
|
|
| 95 |
/* name */ "MPU6050", |
|
| 96 |
/* info */ "accelerometer and gyroscope", |
|
| 97 |
/* test function */ utAlldMpu6050Func, |
|
| 98 |
/* shell command */ {
|
|
| 99 |
/* name */ "unittest:Accelerometer&Gyroscope", |
|
| 100 |
/* callback */ _utShellCmdCb_AlldMpu6050, |
|
| 101 |
/* next */ NULL, |
|
| 102 |
}, |
|
| 103 |
/* data */ &_utAlldMpu6050Data |
|
| 104 |
}; |
|
| 105 |
|
|
| 74 | 106 |
/** @} */ |
Also available in: Unified diff