Revision cda14729 modules/NUCLEO-F767ZI/module.h
modules/NUCLEO-F767ZI/module.h | ||
---|---|---|
101 | 101 |
/** |
102 | 102 |
* @brief Event flag to be set on a USER_BUTTON interrupt. |
103 | 103 |
*/ |
104 |
#define MODULE_OS_IOEVENTFLAGS_USERBUTTON AOS_IOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
|
|
104 |
#define MODULE_OS_GPIOEVENTFLAG_USERBUTTON AOS_GPIOEVENT_FLAG(PAL_PAD(LINE_BUTTON))
|
|
105 | 105 |
|
106 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
|
|
106 |
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__) |
|
107 | 107 |
/** |
108 | 108 |
* @brief Shell prompt text. |
109 | 109 |
*/ |
110 | 110 |
extern ROMCONST char* moduleShellPrompt; |
111 |
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */
|
|
111 |
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */ |
|
112 | 112 |
|
113 | 113 |
/** |
114 | 114 |
* @brief Interrupt initialization macro. |
115 |
* @note SSSP related interrupt signals are already initialized in 'aos_system.c'. |
|
116 | 115 |
*/ |
117 | 116 |
#define MODULE_INIT_INTERRUPTS() { \ |
118 | 117 |
/* user button */ \ |
119 |
palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdExtiCallback(), &moduleGpioUserButton.gpio->line); \
|
|
118 |
palSetLineCallback(moduleGpioUserButton.gpio->line, aosSysGetStdGpioCallback(), &moduleGpioUserButton.gpio->line); \
|
|
120 | 119 |
palEnableLineEvent(moduleGpioUserButton.gpio->line, APAL2CH_EDGE(moduleGpioUserButton.meta.edge)); \ |
121 | 120 |
} |
122 | 121 |
|
123 | 122 |
/** |
124 |
* @brief Unit test initialization hook.
|
|
123 |
* @brief Test initialization hook.
|
|
125 | 124 |
*/ |
126 | 125 |
#define MODULE_INIT_TESTS() { \ |
127 |
/* add unit-test shell commands */ \
|
|
126 |
/* add test commands to shell */ \
|
|
128 | 127 |
} |
129 | 128 |
|
130 | 129 |
/** |
... | ... | |
139 | 138 |
* @brief Periphery communication interface deinitialization hook. |
140 | 139 |
*/ |
141 | 140 |
#define MODULE_SHUTDOWN_PERIPHERY_IF() { \ |
141 |
/* don't stop the serial driver so messages can still be printed */ \ |
|
142 | 142 |
} |
143 | 143 |
|
144 | 144 |
/** |
145 | 145 |
* @brief HOOK to toggle the LEDs when the user button is pressed. |
146 | 146 |
*/ |
147 |
#define MODULE_MAIN_LOOP_IO_EVENT(eventflags) { \
|
|
148 |
if (eventflags & MODULE_OS_IOEVENTFLAGS_USERBUTTON) { \
|
|
147 |
#define MODULE_MAIN_LOOP_GPIOEVENT(eventflags) { \
|
|
148 |
if (eventflags & MODULE_OS_GPIOEVENTFLAG_USERBUTTON) { \
|
|
149 | 149 |
apalControlGpioState_t buttonstate; \ |
150 | 150 |
apalControlGpioGet(&moduleGpioUserButton, &buttonstate); \ |
151 | 151 |
apalControlGpioSet(&moduleGpioLed1, buttonstate); \ |
... | ... | |
163 | 163 |
*/ |
164 | 164 |
/*===========================================================================*/ |
165 | 165 |
|
166 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) || defined(__DOXYGEN__) |
|
167 |
|
|
168 |
// SSSP is not yet supported on this module |
|
169 |
|
|
170 |
#endif /* (AMIROOS_CFG_SSSP_ENABLE == true) */ |
|
171 |
|
|
166 | 172 |
/** @} */ |
167 | 173 |
|
168 | 174 |
/*===========================================================================*/ |
Also available in: Unified diff