Revision 56dc4779

View differences:

core/inc/aos_system.h
235 235
  void aosSysStop(void);
236 236
  void aosSysDeinit(void);
237 237
  void aosSysShutdownFinal(aos_shutdown_t shutdown);
238
  palcallback_t aosSysGetStdIntCallback(void);
238
  palcallback_t aosSysGetStdExtiCallback(void);
239 239
#if defined(__cplusplus)
240 240
}
241 241
#endif /* defined(__cplusplus) */
core/src/aos_system.c
658 658
 *
659 659
 * @param[in] args   Pointer to the GPIO line identifier.
660 660
 */
661
static void _intCallback(void* args)
661
static void _extiCallback(void* args)
662 662
{
663 663
  aosDbgCheck((args != NULL) && (*((ioline_t*)args) != PAL_NOLINE) && (PAL_PAD(*((ioline_t*)args)) < sizeof(eventflags_t) * 8));
664 664

  
......
824 824
  /* interrupt setup */
825 825
#if (AMIROOS_CFG_SSSP_ENABLE == true)
826 826
  // PD signal
827
  palSetLineCallback(moduleSsspGpioPd.gpio->line, _intCallback, &moduleSsspGpioPd.gpio->line);
827
  palSetLineCallback(moduleSsspGpioPd.gpio->line, _extiCallback, &moduleSsspGpioPd.gpio->line);
828 828
  palEnableLineEvent(moduleSsspGpioPd.gpio->line, APAL2CH_EDGE(moduleSsspGpioPd.meta.edge));
829 829
  // SYNC signal
830 830
#if (AMIROOS_CFG_SSSP_MASTER == true)
831
  palSetLineCallback(moduleSsspGpioSync.gpio->line, _intCallback, &moduleSsspGpioSync.gpio->line);
831
  palSetLineCallback(moduleSsspGpioSync.gpio->line, _extiCallback, &moduleSsspGpioSync.gpio->line);
832 832
#else /* (AMIROOS_CFG_SSSP_MASTER == true) */
833 833
  palSetLineCallback(moduleSsspGpioSync.gpio->line, _signalSyncCallback, &moduleSsspGpioSync.gpio->line);
834 834
#endif /* (AMIROOS_CFG_SSSP_MASTER == true) */
835 835
  palEnableLineEvent(moduleSsspGpioSync.gpio->line, APAL2CH_EDGE(moduleSsspGpioSync.meta.edge));
836 836
#if (AMIROOS_CFG_SSSP_STACK_START != true)
837 837
  // DN signal
838
  palSetLineCallback(moduleSsspGpioDn.gpio->line, _intCallback, &moduleSsspGpioDn.gpio->line);
838
  palSetLineCallback(moduleSsspGpioDn.gpio->line, _extiCallback, &moduleSsspGpioDn.gpio->line);
839 839
  palEnableLineEvent(moduleSsspGpioDn.gpio->line, APAL2CH_EDGE(moduleSsspGpioDn.meta.edge));
840 840
#endif /* (AMIROOS_CFG_SSSP_STACK_START != true) */
841 841
#if (AMIROOS_CFG_SSSP_STACK_END != true)
842 842
  // UP signal
843
  palSetLineCallback(moduleSsspGpioUp.gpio->line, _intCallback, &moduleSsspGpioUp.gpio->line);
843
  palSetLineCallback(moduleSsspGpioUp.gpio->line, _extiCallback, &moduleSsspGpioUp.gpio->line);
844 844
  palEnableLineEvent(moduleSsspGpioUp.gpio->line, APAL2CH_EDGE(moduleSsspGpioUp.meta.edge));
845 845
#endif /* (AMIROOS_CFG_SSSP_STACK_END != true) */
846 846
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */
......
1151 1151
/**
1152 1152
 * @brief   Generic callback function for GPIO interrupts.
1153 1153
 *
1154
 * @param[in] args   Pointer to the GPIO pad identifier.
1154
 * @return  Pointer to the callback function.
1155 1155
 */
1156
palcallback_t aosSysGetStdIntCallback(void)
1156
palcallback_t aosSysGetStdExtiCallback(void)
1157 1157
{
1158
  return _intCallback;
1158
  return _extiCallback;
1159 1159
}
1160 1160

  
1161 1161
/** @} */
modules/DiWheelDrive_1-1/module.h
302 302
 */
303 303
#define MODULE_INIT_INTERRUPTS() {                                            \
304 304
  /* COMPASS_DRDY */                                                          \
305
  palSetLineCallback(moduleGpioCompassDrdy.gpio->line, aosSysGetStdIntCallback(), &moduleGpioCompassDrdy.gpio->line); \
306
  palEnableLineEvent(moduleGpioCompassDrdy.gpio->line, APAL2CH_EDGE(moduleGpioCompassDrdy.meta.edge));                \
305
  palSetLineCallback(moduleGpioCompassDrdy.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioCompassDrdy.gpio->line);  \
306
  palEnableLineEvent(moduleGpioCompassDrdy.gpio->line, APAL2CH_EDGE(moduleGpioCompassDrdy.meta.edge));                  \
307 307
  /* IR_INT */                                                                \
308
  palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt.gpio->line); \
309
  palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));                \
308
  palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioIrInt.gpio->line);  \
309
  palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));                  \
310 310
  /* GYRO_DRDY */                                                             \
311
  palSetLineCallback(moduleGpioGyroDrdy.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGyroDrdy.gpio->line); \
312
  palEnableLineEvent(moduleGpioGyroDrdy.gpio->line, APAL2CH_EDGE(moduleGpioGyroDrdy.meta.edge));                \
311
  palSetLineCallback(moduleGpioGyroDrdy.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGyroDrdy.gpio->line);  \
312
  palEnableLineEvent(moduleGpioGyroDrdy.gpio->line, APAL2CH_EDGE(moduleGpioGyroDrdy.meta.edge));                  \
313 313
  /* ACCEL_INT */                                                             \
314
  palSetLineCallback(moduleGpioAccelInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioAccelInt.gpio->line); \
315
  palEnableLineEvent(moduleGpioAccelInt.gpio->line, APAL2CH_EDGE(moduleGpioAccelInt.meta.edge));                \
314
  palSetLineCallback(moduleGpioAccelInt.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioAccelInt.gpio->line);  \
315
  palEnableLineEvent(moduleGpioAccelInt.gpio->line, APAL2CH_EDGE(moduleGpioAccelInt.meta.edge));                  \
316 316
  /* PATH_DCSTAT */                                                           \
317
  palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDcStat.gpio->line); \
318
  palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));                \
317
  palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioPathDcStat.gpio->line);  \
318
  palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));                  \
319 319
  /* SYS_REG_EN */                                                            \
320
  palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysRegEn.gpio->line); \
321
  palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));                \
320
  palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysRegEn.gpio->line);  \
321
  palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));                  \
322 322
  /* SYS_WARMRST */                                                           \
323
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
324
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
323
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysWarmrst.gpio->line);  \
324
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                  \
325 325
}
326 326

  
327 327
/**
modules/DiWheelDrive_1-2/module.h
282 282
 */
283 283
#define MODULE_INIT_INTERRUPTS() {                                            \
284 284
  /* IR_INT */                                                                \
285
  palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt.gpio->line); \
286
  palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));                \
285
  palSetLineCallback(moduleGpioIrInt.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioIrInt.gpio->line);  \
286
  palEnableLineEvent(moduleGpioIrInt.gpio->line, APAL2CH_EDGE(moduleGpioIrInt.meta.edge));                  \
287 287
  /* IMU_INT */                                                               \
288
  palSetLineCallback(moduleGpioImuInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioImuInt.gpio->line); \
289
  palEnableLineEvent(moduleGpioImuInt.gpio->line, APAL2CH_EDGE(moduleGpioImuInt.meta.edge));                \
288
  palSetLineCallback(moduleGpioImuInt.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioImuInt.gpio->line);  \
289
  palEnableLineEvent(moduleGpioImuInt.gpio->line, APAL2CH_EDGE(moduleGpioImuInt.meta.edge));                  \
290 290
  /* PATH_DCSTAT */                                                           \
291
  palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDcStat.gpio->line); \
292
  palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));                \
291
  palSetLineCallback(moduleGpioPathDcStat.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioPathDcStat.gpio->line);  \
292
  palEnableLineEvent(moduleGpioPathDcStat.gpio->line, APAL2CH_EDGE(moduleGpioPathDcStat.meta.edge));                  \
293 293
  /* SYS_REG_EN */                                                            \
294
  palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysRegEn.gpio->line); \
295
  palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));                \
294
  palSetLineCallback(moduleGpioSysRegEn.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysRegEn.gpio->line);  \
295
  palEnableLineEvent(moduleGpioSysRegEn.gpio->line, APAL2CH_EDGE(moduleGpioSysRegEn.meta.edge));                  \
296 296
  /* SYS_WARMRST */                                                           \
297
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
298
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
297
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysWarmrst.gpio->line);  \
298
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                  \
299 299
}
300 300

  
301 301
/**
modules/LightRing_1-0/module.h
206 206
 */
207 207
#define MODULE_INIT_INTERRUPTS() {                                            \
208 208
  /* LASER_OC */                                                              \
209
  palSetLineCallback(moduleGpioLaserOc.gpio->line, aosSysGetStdIntCallback(), &moduleGpioLaserOc.gpio->line); \
210
  palEnableLineEvent(moduleGpioLaserOc.gpio->line, APAL2CH_EDGE(moduleGpioLaserOc.meta.edge));                \
209
  palSetLineCallback(moduleGpioLaserOc.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioLaserOc.gpio->line);  \
210
  palEnableLineEvent(moduleGpioLaserOc.gpio->line, APAL2CH_EDGE(moduleGpioLaserOc.meta.edge));                  \
211 211
  /* WL_GDO2 */                                                               \
212
  palSetLineCallback(moduleGpioWlGdo2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioWlGdo2.gpio->line); \
213
  palEnableLineEvent(moduleGpioWlGdo2.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo2.meta.edge));                \
212
  palSetLineCallback(moduleGpioWlGdo2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioWlGdo2.gpio->line);  \
213
  palEnableLineEvent(moduleGpioWlGdo2.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo2.meta.edge));                  \
214 214
  /* WL_GDO0 */                                                               \
215
  palSetLineCallback(moduleGpioWlGdo0.gpio->line, aosSysGetStdIntCallback(), &moduleGpioWlGdo0.gpio->line); \
215
  palSetLineCallback(moduleGpioWlGdo0.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioWlGdo0.gpio->line);  \
216 216
  /*palEnableLineEvent(moduleGpioWlGdo0.gpio->line, APAL2CH_EDGE(moduleGpioWlGdo0.meta.edge)); // this is broken for some reason*/  \
217 217
}
218 218

  
modules/NUCLEO-F103RB/module.h
171 171
 */
172 172
#define MODULE_INIT_INTERRUPTS() {                                            \
173 173
  /* user button */                                                           \
174
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
175
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
174
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
175
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
176 176
  MODULE_INIT_INTERRUPTS_DW1000();                                            \
177 177
}
178 178
#if (BOARD_DW1000_CONNECTED == true)
179 179
  #define MODULE_INIT_INTERRUPTS_DW1000() {                                   \
180
    palSetLineCallback(moduleGpioDw1000Irqn.gpio->line, aosSysGetStdIntCallback(), &moduleGpioDw1000Irqn.gpio->line); \
181
    palEnableLineEvent(moduleGpioDw1000Irqn.gpio->line, APAL2CH_EDGE(moduleGpioDw1000Irqn.meta.edge));                \
180
    palSetLineCallback(moduleGpioDw1000Irqn.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioDw1000Irqn.gpio->line);  \
181
    palEnableLineEvent(moduleGpioDw1000Irqn.gpio->line, APAL2CH_EDGE(moduleGpioDw1000Irqn.meta.edge));                  \
182 182
  }
183 183
#else /* (BOARD_DW1000_CONNECTED == true) */
184 184
  #define MODULE_INIT_INTERRUPTS_DW1000() {                                   \
modules/NUCLEO-F401RE/module.h
106 106
 */
107 107
#define MODULE_INIT_INTERRUPTS() {                                            \
108 108
  /* user button */                                                           \
109
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
110
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
109
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
110
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
111 111
}
112 112

  
113 113
/**
modules/NUCLEO-F767ZI/module.h
116 116
 */
117 117
#define MODULE_INIT_INTERRUPTS() {                                            \
118 118
  /* user button */                                                           \
119
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
120
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
119
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
120
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
121 121
}
122 122

  
123 123
/**
modules/NUCLEO-L476RG/module.h
120 120
 */
121 121
#define MODULE_INIT_INTERRUPTS() {                                            \
122 122
  /* user button */                                                           \
123
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
124
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
123
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
124
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
125 125
}
126 126

  
127 127
/**
modules/PowerManagement_1-1/module.h
397 397
 */
398 398
#define MODULE_INIT_INTERRUPTS() {                                            \
399 399
  /* IR_INT1 */                                                               \
400
  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt1.gpio->line); \
401
  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                \
400
  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioIrInt1.gpio->line);  \
401
  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                  \
402 402
  /* GAUGE_BATLOW2 */                                                         \
403
  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow2.gpio->line); \
404
  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                \
403
  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatLow2.gpio->line);  \
404
  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                  \
405 405
  /* GAUGE_BATGD2 */                                                          \
406
  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd2.gpio->line); \
407
  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                \
406
  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatGd2.gpio->line);  \
407
  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                  \
408 408
  /* GAUGE_BATLOW1 */                                                         \
409
  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow1.gpio->line); \
410
  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                \
409
  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatLow1.gpio->line);  \
410
  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                  \
411 411
  /* GAUGE_BATGD1 */                                                          \
412
  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd1.gpio->line); \
413
  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                \
412
  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatGd1.gpio->line);  \
413
  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                  \
414 414
  /* IR_INT2 */                                                               \
415
  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt2.gpio->line); \
416
  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                \
415
  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioIrInt2.gpio->line);  \
416
  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                  \
417 417
  /* TOUCH_INT */                                                             \
418
  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioTouchInt.gpio->line); \
419
  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                \
418
  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioTouchInt.gpio->line);  \
419
  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                  \
420 420
  /* PATH_DC */                                                               \
421
  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDc.gpio->line); \
422
  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                \
421
  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioPathDc.gpio->line);  \
422
  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                  \
423 423
  /* SYS_SPI_DIR */                                                           \
424
  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysSpiDir.gpio->line); \
425
  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                \
424
  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysSpiDir.gpio->line);  \
425
  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                  \
426 426
  /* SYS_WARMRST */                                                           \
427
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
428
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
427
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysWarmrst.gpio->line);  \
428
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                  \
429 429
}
430 430

  
431 431
/**
modules/PowerManagement_1-2/module.h
402 402
 */
403 403
#define MODULE_INIT_INTERRUPTS() {                                            \
404 404
  /* IR_INT1 */                                                               \
405
  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt1.gpio->line); \
406
  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                \
405
  palSetLineCallback(moduleGpioIrInt1.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioIrInt1.gpio->line);  \
406
  palEnableLineEvent(moduleGpioIrInt1.gpio->line, APAL2CH_EDGE(moduleGpioIrInt1.meta.edge));                  \
407 407
  /* GAUGE_BATLOW2 */                                                         \
408
  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow2.gpio->line); \
409
  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                \
408
  palSetLineCallback(moduleGpioGaugeBatLow2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatLow2.gpio->line);  \
409
  palEnableLineEvent(moduleGpioGaugeBatLow2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow2.meta.edge));                  \
410 410
  /* GAUGE_BATGD2 */                                                          \
411
  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd2.gpio->line); \
412
  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                \
411
  palSetLineCallback(moduleGpioGaugeBatGd2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatGd2.gpio->line);  \
412
  palEnableLineEvent(moduleGpioGaugeBatGd2.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd2.meta.edge));                  \
413 413
  /* GAUGE_BATLOW1 */                                                         \
414
  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatLow1.gpio->line); \
415
  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                \
414
  palSetLineCallback(moduleGpioGaugeBatLow1.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatLow1.gpio->line);  \
415
  palEnableLineEvent(moduleGpioGaugeBatLow1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatLow1.meta.edge));                  \
416 416
  /* GAUGE_BATGD1 */                                                          \
417
  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdIntCallback(), &moduleGpioGaugeBatGd1.gpio->line); \
418
  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                \
417
  palSetLineCallback(moduleGpioGaugeBatGd1.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioGaugeBatGd1.gpio->line);  \
418
  palEnableLineEvent(moduleGpioGaugeBatGd1.gpio->line, APAL2CH_EDGE(moduleGpioGaugeBatGd1.meta.edge));                  \
419 419
  /* IR_INT2 */                                                               \
420
  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdIntCallback(), &moduleGpioIrInt2.gpio->line); \
421
  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                \
420
  palSetLineCallback(moduleGpioIrInt2.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioIrInt2.gpio->line);  \
421
  palEnableLineEvent(moduleGpioIrInt2.gpio->line, APAL2CH_EDGE(moduleGpioIrInt2.meta.edge));                  \
422 422
  /* TOUCH_INT */                                                             \
423
  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdIntCallback(), &moduleGpioTouchInt.gpio->line); \
424
  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                \
423
  palSetLineCallback(moduleGpioTouchInt.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioTouchInt.gpio->line);  \
424
  palEnableLineEvent(moduleGpioTouchInt.gpio->line, APAL2CH_EDGE(moduleGpioTouchInt.meta.edge));                  \
425 425
  /* PATH_DC */                                                               \
426
  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdIntCallback(), &moduleGpioPathDc.gpio->line); \
427
  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                \
426
  palSetLineCallback(moduleGpioPathDc.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioPathDc.gpio->line);  \
427
  palEnableLineEvent(moduleGpioPathDc.gpio->line, APAL2CH_EDGE(moduleGpioPathDc.meta.edge));                  \
428 428
  /* SYS_SPI_DIR */                                                           \
429
  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysSpiDir.gpio->line); \
430
  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                \
429
  palSetLineCallback(moduleGpioSysSpiDir.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysSpiDir.gpio->line);  \
430
  palEnableLineEvent(moduleGpioSysSpiDir.gpio->line, APAL2CH_EDGE(moduleGpioSysSpiDir.meta.edge));                  \
431 431
  /* SYS_WARMRST */                                                           \
432
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdIntCallback(), &moduleGpioSysWarmrst.gpio->line); \
433
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                \
432
  palSetLineCallback(moduleGpioSysWarmrst.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioSysWarmrst.gpio->line);  \
433
  palEnableLineEvent(moduleGpioSysWarmrst.gpio->line, APAL2CH_EDGE(moduleGpioSysWarmrst.meta.edge));                  \
434 434
}
435 435

  
436 436
/**
modules/STM32F407G-DISC1/module.h
148 148
 */
149 149
#define MODULE_INIT_INTERRUPTS() {                                            \
150 150
  /* user button */                                                           \
151
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdIntCallback(), &moduleGpioUserButton.gpio->line); \
152
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                \
151
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
152
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
153 153
}
154 154

  
155 155
/**

Also available in: Unified diff