mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
stm32/irq: Clean up irq.h so it does not depend on core uPy defines.
The irq.h file now just provides low-level IRQ definitions and priorities. All Python binding definitions are moved to modmachine.h, with some renaming of pyb -> machine, and also the machine_idle definition (was pyb_wfi) is moved to modmachine.c. The cc3200 and teensy ports are updated to build with these changes. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -52,7 +52,7 @@ extern uint32_t irq_stats[IRQ_STATS_MAX];
|
||||
#define IRQ_EXIT(irq)
|
||||
#endif
|
||||
|
||||
static inline mp_uint_t query_irq(void) {
|
||||
static inline uint32_t query_irq(void) {
|
||||
return __get_PRIMASK();
|
||||
}
|
||||
|
||||
@@ -92,11 +92,6 @@ static inline void restore_irq_pri(uint32_t state) {
|
||||
|
||||
#endif
|
||||
|
||||
MP_DECLARE_CONST_FUN_OBJ_0(pyb_wfi_obj);
|
||||
MP_DECLARE_CONST_FUN_OBJ_0(pyb_disable_irq_obj);
|
||||
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_enable_irq_obj);
|
||||
MP_DECLARE_CONST_FUN_OBJ_0(pyb_irq_stats_obj);
|
||||
|
||||
// IRQ priority definitions.
|
||||
//
|
||||
// Lower number implies higher interrupt priority.
|
||||
|
||||
Reference in New Issue
Block a user