Revision cda14729 modules/STM32F407G-DISC1/module.h

View differences:

modules/STM32F407G-DISC1/module.h
133 133
/**
134 134
 * @brief   Event flag to be set on a USER_BUTTON interrupt.
135 135
 */
136
#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
136
#define MODULE_OS_GPIOEVENTFLAG_USERBUTTON      AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
137 137

  
138
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
138
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
139 139
/**
140 140
 * @brief   Shell prompt text.
141 141
 */
142 142
extern ROMCONST char* moduleShellPrompt;
143
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
143
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */
144 144

  
145 145
/**
146 146
 * @brief   Interrupt initialization macro.
147
 * @note    SSSP related interrupt signals are already initialized in 'aos_system.c'.
148 147
 */
149 148
#define MODULE_INIT_INTERRUPTS() {                                            \
150 149
  /* user button */                                                           \
151
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
150
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioUserButton.gpio->line);  \
152 151
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
153 152
}
154 153

  
155 154
/**
156
 * @brief   Unit test initialization hook.
155
 * @brief   Test initialization hook.
157 156
 */
158 157
#define MODULE_INIT_TESTS() {                                                 \
159
  /* add unit-test shell commands */                                          \
158
  /* add test commands to shell */                                            \
160 159
}
161 160

  
162 161
/**
......
171 170
 * @brief   Periphery communication interface deinitialization hook.
172 171
 */
173 172
#define MODULE_SHUTDOWN_PERIPHERY_IF() {                                      \
173
  /* don't stop the serial driver so messages can still be printed */         \
174 174
}
175 175

  
176 176
/**
177 177
 * @brief   HOOK to toggle the LEDs when the user button is pressed.
178 178
 */
179
#define MODULE_MAIN_LOOP_IO_EVENT(eventflags) {                               \
180
  if (eventflags & MODULE_OS_IOEVENTFLAGS_USERBUTTON) {                       \
179
#define MODULE_MAIN_LOOP_GPIOEVENT(eventflags) {                              \
180
  if (eventflags & MODULE_OS_GPIOEVENTFLAG_USERBUTTON) {                      \
181 181
    apalControlGpioState_t buttonstate;                                       \
182 182
    apalControlGpioGet(&moduleGpioUserButton, &buttonstate);                  \
183 183
    apalControlGpioSet(&moduleGpioLedRed, buttonstate);                       \
......
196 196
 */
197 197
/*===========================================================================*/
198 198

  
199
#if (AMIROOS_CFG_SSSP_ENABLE == true) || defined(__DOXYGEN__)
200

  
201
// SSSP is not yet supported on this module
202

  
203
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */
204

  
199 205
/** @} */
200 206

  
201 207
/*===========================================================================*/

Also available in: Unified diff