Revision 126ace3c modules/NUCLEO-L476RG/module.c
modules/NUCLEO-L476RG/module.c | ||
---|---|---|
18 | 18 |
|
19 | 19 |
/** |
20 | 20 |
* @file |
21 |
* @brief Structures and constant for the STM32L476RG-NUCLEO64 module.
|
|
21 |
* @brief Structures and constant for the NUCLEO-L476RG module.
|
|
22 | 22 |
* |
23 |
* @addtogroup STM32L476RG-NUCLEO64_module
|
|
23 |
* @addtogroup NUCLEO-L476RG_module
|
|
24 | 24 |
* @{ |
25 | 25 |
*/ |
26 | 26 |
|
27 |
#include "module.h"
|
|
27 |
#include <amiroos.h>
|
|
28 | 28 |
|
29 | 29 |
/*===========================================================================*/ |
30 | 30 |
/** |
... | ... | |
49 | 49 |
/* CR1 */ 0, |
50 | 50 |
}; |
51 | 51 |
|
52 |
#if defined(AMIROLLD_CFG_MPU6050) |
|
53 |
|
|
54 |
I2CConfig moduleHalI2c3Config = { |
|
55 |
/* timing reg */ 0, // configured later in MODULE_INIT_PERIPHERY_COMM_MPU6050() hook |
|
56 |
/* CR1 */ 0, |
|
57 |
/* CR2 */ 0, |
|
58 |
}; |
|
59 |
|
|
60 |
#endif /* defined(AMIROLLD_CFG_MPU6050) */ |
|
61 |
|
|
52 | 62 |
/** @} */ |
53 | 63 |
|
54 | 64 |
/*===========================================================================*/ |
... | ... | |
121 | 131 |
*/ |
122 | 132 |
/*===========================================================================*/ |
123 | 133 |
|
134 |
#if defined(AMIROLLD_CFG_MPU6050) |
|
135 |
|
|
136 |
MPU6050Driver moduleLldMpu6050 = { |
|
137 |
/* I2C Driver */ &MODULE_HAL_I2C3, |
|
138 |
/* I²C address */ MPU6050_LLD_I2C_ADDR_FIXED, |
|
139 |
}; |
|
140 |
|
|
141 |
#endif /* defined(AMIROLLD_CFG_MPU6050) */ |
|
142 |
|
|
124 | 143 |
/** @} */ |
125 | 144 |
|
126 | 145 |
/*===========================================================================*/ |
... | ... | |
131 | 150 |
/*===========================================================================*/ |
132 | 151 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
133 | 152 |
|
153 |
#if defined(AMIROLLD_CFG_MPU6050) |
|
154 |
|
|
155 |
/* MPU6050 */ |
|
156 |
static int _utShellCmdCb_AlldMpu6050(BaseSequentialStream* stream, int argc, char* argv[]) |
|
157 |
{ |
|
158 |
(void)argc; |
|
159 |
(void)argv; |
|
160 |
aosUtRun(stream, &moduleUtAlldMpu6050, NULL); |
|
161 |
return AOS_OK; |
|
162 |
} |
|
163 |
static ut_mpu6050data_t _utAlldMpu6050Data = { |
|
164 |
/* driver */ &moduleLldMpu6050, |
|
165 |
/* timeout */ MICROSECONDS_PER_SECOND, |
|
166 |
}; |
|
167 |
aos_unittest_t moduleUtAlldMpu6050 = { |
|
168 |
/* name */ "MPU6050", |
|
169 |
/* info */ "accelerometer and gyroscope", |
|
170 |
/* test function */ utAlldMpu6050Func, |
|
171 |
/* shell command */ { |
|
172 |
/* name */ "unittest:Accelerometer&Gyroscope", |
|
173 |
/* callback */ _utShellCmdCb_AlldMpu6050, |
|
174 |
/* next */ NULL, |
|
175 |
}, |
|
176 |
/* data */ &_utAlldMpu6050Data |
|
177 |
}; |
|
178 |
|
|
179 |
#endif /* defined(AMIROLLD_CFG_MPU6050) */ |
|
180 |
|
|
134 | 181 |
#endif /* AMIROOS_CFG_TESTS_ENABLE == true */ |
135 | 182 |
|
136 | 183 |
/** @} */ |
Also available in: Unified diff