Revision cda14729 modules/NUCLEO-F401RE/module.h

View differences:

modules/NUCLEO-F401RE/module.h
91 91
/**
92 92
 * @brief   Event flag to be set on a USER_BUTTON interrupt.
93 93
 */
94
#define MODULE_OS_IOEVENTFLAGS_USERBUTTON       AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
94
#define MODULE_OS_GPIOEVENTFLAG_USERBUTTON      AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
95 95

  
96
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
96
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
97 97
/**
98 98
 * @brief   Shell prompt text.
99 99
 */
100 100
extern ROMCONST char* moduleShellPrompt;
101
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
101
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */
102 102

  
103 103
/**
104 104
 * @brief   Interrupt initialization macro.
105
 * @note    SSSP related interrupt signals are already initialized in 'aos_system.c'.
106 105
 */
107 106
#define MODULE_INIT_INTERRUPTS() {                                            \
108 107
  /* user button */                                                           \
109
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line);  \
108
  palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioUserButton.gpio->line);  \
110 109
  palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge));                  \
111 110
}
112 111

  
113 112
/**
114
 * @brief   Unit test initialization hook.
113
 * @brief   Test initialization hook.
115 114
 */
116 115
#define MODULE_INIT_TESTS() {                                                 \
117
  /* add unit-test shell commands */                                          \
116
  /* add test commands to shell */                                            \
118 117
}
119 118

  
120 119
/**
......
129 128
 * @brief   Periphery communication interface deinitialization hook.
130 129
 */
131 130
#define MODULE_SHUTDOWN_PERIPHERY_IF() {                                      \
131
  /* don't stop the serial driver so messages can still be printed */         \
132 132
}
133 133

  
134 134
/**
135 135
 * @brief   HOOK to toggle the LEDs when the user button is pressed.
136 136
 */
137
#define MODULE_MAIN_LOOP_IO_EVENT(eventflags) {                               \
138
  if (eventflags & MODULE_OS_IOEVENTFLAGS_USERBUTTON) {                       \
137
#define MODULE_MAIN_LOOP_GPIOEVENT(eventflags) {                              \
138
  if (eventflags & MODULE_OS_GPIOEVENTFLAG_USERBUTTON) {                      \
139 139
    apalControlGpioState_t buttonstate;                                       \
140 140
    apalControlGpioGet(&moduleGpioUserButton, &buttonstate);                  \
141 141
    apalControlGpioSet(&moduleGpioLed, buttonstate);                          \
......
151 151
 */
152 152
/*===========================================================================*/
153 153

  
154
#if (AMIROOS_CFG_SSSP_ENABLE == true) || defined(__DOXYGEN__)
155

  
156
// SSSP is not yet supported on this module
157

  
158
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */
159

  
154 160
/** @} */
155 161

  
156 162
/*===========================================================================*/

Also available in: Unified diff