Revision 1a8fb642 modules/NUCLEO-L476RG/module.h

View differences:

modules/NUCLEO-L476RG/module.h
105 105
/**
106 106
 * @brief   Event flag to be set on a USER_BUTTON interrupt.
107 107
 */
108
#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
108
#define MODULE_OS_GPIOEVENTFLAG_USERBUTTON      AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
109 109

  
110 110
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
111 111
/**
......
120 120
 */
121 121
#define MODULE_INIT_INTERRUPTS() {                                            \
122 122
  /* user button */                                                           \
123
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
123
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioUserButton.gpio->line);  \
124 124
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
125 125
}
126 126

  
......
128 128
 * @brief   Test initialization hook.
129 129
 */
130 130
#define MODULE_INIT_TESTS() {                                                 \
131
  /* initialize tests and add to shell */                                     \
131
  /* add test commands to shell */                                            \
132 132
  aosShellAddCommand(&aos.shell, &moduleTestLedShellCmd);                     \
133 133
  aosShellAddCommand(&aos.shell, &moduleTestButtonShellCmd);                  \
134 134
  MODULE_INIT_TEST_MPU6050();                                                 \
......
136 136
}
137 137
#if (BOARD_MPU6050_CONNECTED == true)
138 138
  #define MODULE_INIT_TEST_MPU6050() {                                        \
139
    /* add unit-test shell commands */                                        \
140 139
    aosShellAddCommand(&aos.shell, &moduleTestMpu6050ShellCmd);               \
141 140
  }
142 141
#else /* (BOARD_MPU6050_CONNECTED == true) */
......
185 184
 * @brief   Periphery communication interface deinitialization hook.
186 185
 */
187 186
#define MODULE_SHUTDOWN_PERIPHERY_IF() {                                      \
187
  /* don't stop the serial driver so messages can still be printed */         \
188 188
}
189 189

  
190 190
/**
191 191
 * @brief   HOOK to toggle the LEDs when the user button is pressed.
192 192
 */
193
#define MODULE_MAIN_LOOP_IO_EVENT(eventflags) {                               \
194
  if (eventflags & MODULE_OS_IOEVENTFLAGS_USERBUTTON) {                       \
193
#define MODULE_MAIN_LOOP_GPIOEVENT(eventflags) {                              \
194
  if (eventflags & MODULE_OS_GPIOEVENTFLAG_USERBUTTON) {                      \
195 195
    button_lld_state_t buttonstate;                                           \
196 196
    button_lld_get(&moduleLldUserButton, &buttonstate);                       \
197 197
    led_lld_set(&moduleLldLed, (buttonstate == BUTTON_LLD_STATE_PRESSED) ? LED_LLD_STATE_ON : LED_LLD_STATE_OFF); \

Also available in: Unified diff