Revision 3106e8cc modules/DiWheelDrive_1-1/module.c
| modules/DiWheelDrive_1-1/module.c | ||
|---|---|---|
| 111 | 111 |
SPIConfig moduleHalSpiAccelerometerConfig = {
|
| 112 | 112 |
/* circular buffer mode */ false, |
| 113 | 113 |
/* callback function pointer */ NULL, |
| 114 |
/* chip select line port */ GPIOC,
|
|
| 115 |
/* chip select line pad number */ GPIOC_ACCEL_SS_N,
|
|
| 114 |
/* chip select line port */ PAL_PORT(LINE_ACCEL_SS_N),
|
|
| 115 |
/* chip select line pad number */ PAL_PAD(LINE_ACCEL_SS_N),
|
|
| 116 | 116 |
/* CR1 */ SPI_CR1_BR_0, |
| 117 | 117 |
/* CR2 */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN, |
| 118 | 118 |
}; |
| ... | ... | |
| 120 | 120 |
SPIConfig moduleHalSpiGyroscopeConfig = {
|
| 121 | 121 |
/* circular buffer mode */ false, |
| 122 | 122 |
/* callback function pointer */ NULL, |
| 123 |
/* chip select line port */ GPIOC,
|
|
| 124 |
/* chip select line pad number */ GPIOC_GYRO_SS_N,
|
|
| 123 |
/* chip select line port */ PAL_PORT(LINE_GYRO_SS_N),
|
|
| 124 |
/* chip select line pad number */ PAL_PAD(LINE_GYRO_SS_N),
|
|
| 125 | 125 |
/* CR1 */ SPI_CR1_BR_0, |
| 126 | 126 |
/* CR2 */ SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN, |
| 127 | 127 |
}; |
| ... | ... | |
| 139 | 139 |
* @brief LED output signal GPIO. |
| 140 | 140 |
*/ |
| 141 | 141 |
static apalGpio_t _gpioLed = {
|
| 142 |
/* port */ GPIOA, |
|
| 143 |
/* pad */ GPIOA_LED, |
|
| 142 |
/* line */ LINE_LED, |
|
| 144 | 143 |
}; |
| 145 | 144 |
ROMCONST apalControlGpio_t moduleGpioLed = {
|
| 146 | 145 |
/* GPIO */ &_gpioLed, |
| ... | ... | |
| 155 | 154 |
* @brief POWER_EN output signal GPIO. |
| 156 | 155 |
*/ |
| 157 | 156 |
static apalGpio_t _gpioPowerEn = {
|
| 158 |
/* port */ GPIOB, |
|
| 159 |
/* pad */ GPIOB_POWER_EN, |
|
| 157 |
/* line */ LINE_POWER_EN, |
|
| 160 | 158 |
}; |
| 161 | 159 |
ROMCONST apalControlGpio_t moduleGpioPowerEn = {
|
| 162 | 160 |
/* GPIO */ &_gpioPowerEn, |
| ... | ... | |
| 171 | 169 |
* @brief COMPASS_DRDY output signal GPIO. |
| 172 | 170 |
*/ |
| 173 | 171 |
static apalGpio_t _gpioCompassDrdy = {
|
| 174 |
/* port */ GPIOB, |
|
| 175 |
/* pad */ GPIOB_COMPASS_DRDY, |
|
| 172 |
/* line */ LINE_COMPASS_DRDY, |
|
| 176 | 173 |
}; |
| 177 | 174 |
ROMCONST apalControlGpio_t moduleGpioCompassDrdy = {
|
| 178 | 175 |
/* GPIO */ &_gpioCompassDrdy, |
| ... | ... | |
| 187 | 184 |
* @brief IR_INT input signal GPIO. |
| 188 | 185 |
*/ |
| 189 | 186 |
static apalGpio_t _gpioIrInt = {
|
| 190 |
/* port */ GPIOB, |
|
| 191 |
/* pad */ GPIOB_IR_INT, |
|
| 187 |
/* line */ LINE_IR_INT, |
|
| 192 | 188 |
}; |
| 193 | 189 |
ROMCONST apalControlGpio_t moduleGpioIrInt = {
|
| 194 | 190 |
/* GPIO */ &_gpioIrInt, |
| ... | ... | |
| 203 | 199 |
* @brief GYRO_DRDY input signal GPIO. |
| 204 | 200 |
*/ |
| 205 | 201 |
static apalGpio_t _gpioGyroDrdy = {
|
| 206 |
/* port */ GPIOB, |
|
| 207 |
/* pad */ GPIOB_GYRO_DRDY, |
|
| 202 |
/* line */ LINE_GYRO_DRDY, |
|
| 208 | 203 |
}; |
| 209 | 204 |
ROMCONST apalControlGpio_t moduleGpioGyroDrdy = {
|
| 210 | 205 |
/* GPIO */ &_gpioGyroDrdy, |
| ... | ... | |
| 219 | 214 |
* @brief SYS_UART_UP bidirectional signal GPIO. |
| 220 | 215 |
*/ |
| 221 | 216 |
static apalGpio_t _gpioSysUartUp = {
|
| 222 |
/* port */ GPIOB, |
|
| 223 |
/* pad */ GPIOB_SYS_UART_UP, |
|
| 217 |
/* line */ LINE_SYS_UART_UP, |
|
| 224 | 218 |
}; |
| 225 | 219 |
ROMCONST apalControlGpio_t moduleGpioSysUartUp = {
|
| 226 | 220 |
/* GPIO */ &_gpioSysUartUp, |
| ... | ... | |
| 235 | 229 |
* @brief ACCEL_INT input signal GPIO. |
| 236 | 230 |
*/ |
| 237 | 231 |
static apalGpio_t _gpioAccelInt = {
|
| 238 |
/* port */ GPIOB, |
|
| 239 |
/* pad */ GPIOB_ACCEL_INT_N, |
|
| 232 |
/* line */ LINE_ACCEL_INT_N, |
|
| 240 | 233 |
}; |
| 241 | 234 |
ROMCONST apalControlGpio_t moduleGpioAccelInt = {
|
| 242 | 235 |
/* GPIO */ &_gpioAccelInt, |
| ... | ... | |
| 251 | 244 |
* @brief SYS_SNYC bidirectional signal GPIO. |
| 252 | 245 |
*/ |
| 253 | 246 |
static apalGpio_t _gpioSysSync = {
|
| 254 |
/* port */ GPIOC, |
|
| 255 |
/* pad */ GPIOC_SYS_INT_N, |
|
| 247 |
/* line */ LINE_SYS_INT_N, |
|
| 256 | 248 |
}; |
| 257 | 249 |
ROMCONST apalControlGpio_t moduleGpioSysSync = {
|
| 258 | 250 |
/* GPIO */ &_gpioSysSync, |
| ... | ... | |
| 267 | 259 |
* @brief PATH_DCSTAT input signal GPIO. |
| 268 | 260 |
*/ |
| 269 | 261 |
static apalGpio_t _gpioPathDcStat = {
|
| 270 |
/* port */ GPIOC, |
|
| 271 |
/* pad */ GPIOC_PATH_DCSTAT, |
|
| 262 |
/* line */ LINE_PATH_DCSTAT, |
|
| 272 | 263 |
}; |
| 273 | 264 |
ROMCONST apalControlGpio_t moduleGpioPathDcStat = {
|
| 274 | 265 |
/* GPIO */ &_gpioPathDcStat, |
| ... | ... | |
| 283 | 274 |
* @brief PATH_DCEN output signal GPIO. |
| 284 | 275 |
*/ |
| 285 | 276 |
static apalGpio_t _gpioPathDcEn = {
|
| 286 |
/* port */ GPIOC, |
|
| 287 |
/* pad */ GPIOC_PATH_DCEN, |
|
| 277 |
/* line */ LINE_PATH_DCEN, |
|
| 288 | 278 |
}; |
| 289 | 279 |
ROMCONST apalControlGpio_t moduleGpioPathDcEn = {
|
| 290 | 280 |
/* GPIO */ &_gpioPathDcEn, |
| ... | ... | |
| 299 | 289 |
* @brief SYS_PD bidirectional signal GPIO. |
| 300 | 290 |
*/ |
| 301 | 291 |
static apalGpio_t _gpioSysPd = {
|
| 302 |
/* port */ GPIOC, |
|
| 303 |
/* pad */ GPIOC_SYS_PD_N, |
|
| 292 |
/* line */ LINE_SYS_PD_N, |
|
| 304 | 293 |
}; |
| 305 | 294 |
ROMCONST apalControlGpio_t moduleGpioSysPd = {
|
| 306 | 295 |
/* GPIO */ &_gpioSysPd, |
| ... | ... | |
| 315 | 304 |
* @brief SYS_REG_EN input signal GPIO. |
| 316 | 305 |
*/ |
| 317 | 306 |
static apalGpio_t _gpioSysRegEn = {
|
| 318 |
/* port */ GPIOC, |
|
| 319 |
/* pad */ GPIOC_SYS_REG_EN, |
|
| 307 |
/* line */ LINE_SYS_REG_EN, |
|
| 320 | 308 |
}; |
| 321 | 309 |
ROMCONST apalControlGpio_t moduleGpioSysRegEn = {
|
| 322 | 310 |
/* GPIO */ &_gpioSysRegEn, |
| ... | ... | |
| 331 | 319 |
* @brief SYS_WARMRST bidirectional signal GPIO. |
| 332 | 320 |
*/ |
| 333 | 321 |
static apalGpio_t _gpioSysWarmrst = {
|
| 334 |
/* port */ GPIOD, |
|
| 335 |
/* pad */ GPIOD_SYS_WARMRST_N, |
|
| 322 |
/* line */ LINE_SYS_WARMRST_N, |
|
| 336 | 323 |
}; |
| 337 | 324 |
ROMCONST apalControlGpio_t moduleGpioSysWarmrst = {
|
| 338 | 325 |
/* GPIO */ &_gpioSysWarmrst, |
Also available in: Unified diff