File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 * THE SOFTWARE.
2525 */
2626
27+ #ifndef MICROPY_INCLUDED_STMHAL_IRQ_H
28+ #define MICROPY_INCLUDED_STMHAL_IRQ_H
29+
2730// these states correspond to values from query_irq, enable_irq and disable_irq
2831#define IRQ_STATE_DISABLED (0x00000001)
2932#define IRQ_STATE_ENABLED (0x00000000)
@@ -147,4 +150,4 @@ MP_DECLARE_CONST_FUN_OBJ_0(pyb_irq_stats_obj);
147150#define IRQ_PRI_RTC_WKUP 15
148151#define IRQ_SUBPRI_RTC_WKUP 0
149152
150-
153+ #endif // MICROPY_INCLUDED_STMHAL_IRQ_H
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ void mp_hal_set_interrupt_char(int c); // -1 to disable
2727
2828// timing functions
2929
30+ #include "stmhal/irq.h"
31+
32+ #define mp_hal_quiet_timing_enter () raise_irq_pri(1)
33+ #define mp_hal_quiet_timing_exit (irq_state ) restore_irq_pri(irq_state)
3034#define mp_hal_delay_us_fast (us ) mp_hal_delay_us(us)
3135
3236extern bool mp_hal_ticks_cpu_enabled ;
You can’t perform that action at this time.
0 commit comments