Revision 3106e8cc modules/DiWheelDrive_1-1/module.h
| modules/DiWheelDrive_1-1/module.h | ||
|---|---|---|
| 242 | 242 |
/** |
| 243 | 243 |
* @brief Event flag to be set on a SYS_SYNC interrupt. |
| 244 | 244 |
*/ |
| 245 |
#define MODULE_OS_IOEVENTFLAGS_SYSSYNC AOS_IOEVENT_FLAG(GPIOC_SYS_INT_N)
|
|
| 245 |
#define MODULE_OS_IOEVENTFLAGS_SYSSYNC AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_INT_N))
|
|
| 246 | 246 |
|
| 247 | 247 |
/** |
| 248 | 248 |
* @brief Event flag to be set on a SYS_WARMRST interrupt. |
| 249 | 249 |
*/ |
| 250 |
#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST AOS_IOEVENT_FLAG(GPIOD_SYS_WARMRST_N)
|
|
| 250 |
#define MODULE_OS_IOEVENTFLAGS_SYSWARMRST AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_WARMRST_N))
|
|
| 251 | 251 |
|
| 252 | 252 |
/** |
| 253 | 253 |
* @brief Event flag to be set on a PATH_DCSTAT interrupt. |
| 254 | 254 |
*/ |
| 255 |
#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT AOS_IOEVENT_FLAG(GPIOC_PATH_DCEN)
|
|
| 255 |
#define MODULE_OS_IOEVENTFLAGS_PATHDCSTAT AOS_IOEVENT_FLAG(PAL_PAD(LINE_PATH_DCEN))
|
|
| 256 | 256 |
|
| 257 | 257 |
/** |
| 258 | 258 |
* @brief Event flag to be set on a COMPASS_DRDY interrupt. |
| 259 | 259 |
*/ |
| 260 |
#define MODULE_OS_IOEVENTFLAGS_COMPASSDRDY AOS_IOEVENT_FLAG(GPIOB_COMPASS_DRDY)
|
|
| 260 |
#define MODULE_OS_IOEVENTFLAGS_COMPASSDRDY AOS_IOEVENT_FLAG(PAL_PAD(LINE_COMPASS_DRDY))
|
|
| 261 | 261 |
|
| 262 | 262 |
/** |
| 263 | 263 |
* @brief Event flag to be set on a SYS_PD interrupt. |
| 264 | 264 |
*/ |
| 265 |
#define MODULE_OS_IOEVENTFLAGS_SYSPD AOS_IOEVENT_FLAG(GPIOC_SYS_PD_N)
|
|
| 265 |
#define MODULE_OS_IOEVENTFLAGS_SYSPD AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_PD_N))
|
|
| 266 | 266 |
|
| 267 | 267 |
/** |
| 268 | 268 |
* @brief Event flag to be set on a SYS_REG_EN interrupt. |
| 269 | 269 |
*/ |
| 270 |
#define MODULE_OS_IOEVENTFLAGS_SYSREGEN AOS_IOEVENT_FLAG(GPIOC_SYS_REG_EN)
|
|
| 270 |
#define MODULE_OS_IOEVENTFLAGS_SYSREGEN AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_REG_EN))
|
|
| 271 | 271 |
|
| 272 | 272 |
/** |
| 273 | 273 |
* @brief Event flag to be set on a IR_INT interrupt. |
| 274 | 274 |
*/ |
| 275 |
#define MODULE_OS_IOEVENTFLAGS_IRINT AOS_IOEVENT_FLAG(GPIOB_IR_INT)
|
|
| 275 |
#define MODULE_OS_IOEVENTFLAGS_IRINT AOS_IOEVENT_FLAG(PAL_PAD(LINE_IR_INT))
|
|
| 276 | 276 |
|
| 277 | 277 |
/** |
| 278 | 278 |
* @brief Event flag to be set on a GYRO_DRDY interrupt. |
| 279 | 279 |
*/ |
| 280 |
#define MODULE_OS_IOEVENTFLAGS_GYRODRDY AOS_IOEVENT_FLAG(GPIOB_GYRO_DRDY)
|
|
| 280 |
#define MODULE_OS_IOEVENTFLAGS_GYRODRDY AOS_IOEVENT_FLAG(PAL_PAD(LINE_GYRO_DRDY))
|
|
| 281 | 281 |
|
| 282 | 282 |
/** |
| 283 | 283 |
* @brief Event flag to be set on a SYS_UART_UP interrupt. |
| 284 | 284 |
*/ |
| 285 |
#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP AOS_IOEVENT_FLAG(GPIOB_SYS_UART_UP)
|
|
| 285 |
#define MODULE_OS_IOEVENTFLAGS_SYSUARTUP AOS_IOEVENT_FLAG(PAL_PAD(LINE_SYS_UART_UP))
|
|
| 286 | 286 |
|
| 287 | 287 |
/** |
| 288 | 288 |
* @brief Event flag to be set on a ACCEL_INT interrupt. |
| 289 | 289 |
*/ |
| 290 |
#define MODULE_OS_IOEVENTFLAGS_ACCELINT AOS_IOEVENT_FLAG(GPIOB_ACCEL_INT_N)
|
|
| 290 |
#define MODULE_OS_IOEVENTFLAGS_ACCELINT AOS_IOEVENT_FLAG(PAL_PAD(LINE_ACCEL_INT_N))
|
|
| 291 | 291 |
|
| 292 | 292 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
| 293 | 293 |
/** |
| ... | ... | |
| 309 | 309 |
*/ |
| 310 | 310 |
#define MODULE_INIT_INTERRUPTS() { \
|
| 311 | 311 |
/* COMPASS_DRDY */ \ |
| 312 |
palSetPadCallback(moduleGpioCompassDrdy.gpio->port, moduleGpioCompassDrdy.gpio->pad, _intCallback, &moduleGpioCompassDrdy.gpio->pad); \
|
|
| 313 |
palEnablePadEvent(moduleGpioCompassDrdy.gpio->port, moduleGpioCompassDrdy.gpio->pad, APAL2CH_EDGE(moduleGpioCompassDrdy.meta.edge)); \
|
|
| 312 |
palSetLineCallback(moduleGpioCompassDrdy.gpio->line, aosSysGetStdIntCallback(), &moduleGpioCompassDrdy.gpio->line); \
|
|
| 313 |
palEnableLineEvent(moduleGpioCompassDrdy.gpio->line, APAL2CH_EDGE(moduleGpioCompassDrdy.meta.edge)); \
|
|
| 314 | 314 |
/* IR_INT */ \ |
| 315 |
palSetPadCallback(moduleGpioIrInt.gpio->port, moduleGpioIrInt.gpio->pad, _intCallback, &moduleGpioIrInt.gpio->pad); \
|
|
| 316 |
palEnablePadEvent(moduleGpioIrInt.gpio->port, moduleGpioIrInt.gpio->pad, APAL2CH_EDGE(moduleGpioIrInt.meta.edge)); \
|
|
| 315 |
palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt.gpio->line); \
|
|
| 316 |
palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge)); \
|
|
| 317 | 317 |
/* GYRO_DRDY */ \ |
| 318 |
palSetPadCallback(moduleGpioGyroDrdy.gpio->port, moduleGpioGyroDrdy.gpio->pad, _intCallback, &moduleGpioGyroDrdy.gpio->pad); \
|
|
| 319 |
palEnablePadEvent(moduleGpioGyroDrdy.gpio->port, moduleGpioGyroDrdy.gpio->pad, APAL2CH_EDGE(moduleGpioGyroDrdy.meta.edge)); \
|
|
| 318 |
palSetLineCallback(moduleGpioGyroDrdy.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGyroDrdy.gpio->line); \
|
|
| 319 |
palEnableLineEvent(moduleGpioGyroDrdy.gpio->line, APAL2CH_EDGE(moduleGpioGyroDrdy.meta.edge)); \
|
|
| 320 | 320 |
/* ACCEL_INT */ \ |
| 321 |
palSetPadCallback(moduleGpioAccelInt.gpio->port, moduleGpioAccelInt.gpio->pad, _intCallback, &moduleGpioAccelInt.gpio->pad); \
|
|
| 322 |
palEnablePadEvent(moduleGpioAccelInt.gpio->port, moduleGpioAccelInt.gpio->pad, APAL2CH_EDGE(moduleGpioAccelInt.meta.edge)); \
|
|
| 321 |
palSetLineCallback(moduleGpioAccelInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioAccelInt.gpio->line); \
|
|
| 322 |
palEnableLineEvent(moduleGpioAccelInt.gpio->line, APAL2CH_EDGE(moduleGpioAccelInt.meta.edge)); \
|
|
| 323 | 323 |
/* PATH_DCSTAT */ \ |
| 324 |
palSetPadCallback(moduleGpioPathDcStat.gpio->port, moduleGpioPathDcStat.gpio->pad, _intCallback, &moduleGpioPathDcStat.gpio->pad); \
|
|
| 325 |
palEnablePadEvent(moduleGpioPathDcStat.gpio->port, moduleGpioPathDcStat.gpio->pad, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge)); \
|
|
| 324 |
palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDcStat.gpio->line); \
|
|
| 325 |
palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge)); \
|
|
| 326 | 326 |
/* SYS_REG_EN */ \ |
| 327 |
palSetPadCallback(moduleGpioSysRegEn.gpio->port, moduleGpioSysRegEn.gpio->pad, _intCallback, &moduleGpioSysRegEn.gpio->pad); \
|
|
| 328 |
palEnablePadEvent(moduleGpioSysRegEn.gpio->port, moduleGpioSysRegEn.gpio->pad, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge)); \
|
|
| 327 |
palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysRegEn.gpio->line); \
|
|
| 328 |
palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge)); \
|
|
| 329 | 329 |
/* SYS_WARMRST */ \ |
| 330 |
palSetPadCallback(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, _intCallback, &moduleGpioSysWarmrst.gpio->pad); \
|
|
| 331 |
palEnablePadEvent(moduleGpioSysWarmrst.gpio->port, moduleGpioSysWarmrst.gpio->pad, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge)); \
|
|
| 330 |
palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
|
|
| 331 |
palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge)); \
|
|
| 332 | 332 |
} |
| 333 | 333 |
|
| 334 | 334 |
/** |
Also available in: Unified diff