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:
Damien George
2020-06-18 12:19:04 +10:00
parent ac15be9365
commit 5f3c2f1fa8
7 changed files with 48 additions and 45 deletions

View File

@@ -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.