summaryrefslogtreecommitdiffstatshomepage
path: root/teensy/modpyb.c
diff options
context:
space:
mode:
Diffstat (limited to 'teensy/modpyb.c')
-rw-r--r--teensy/modpyb.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/teensy/modpyb.c b/teensy/modpyb.c
index 81149d89bf..518b93be8f 100644
--- a/teensy/modpyb.c
+++ b/teensy/modpyb.c
@@ -38,6 +38,7 @@
#include "obj.h"
#include "gc.h"
#include "gccollect.h"
+#include "irq.h"
#include "systick.h"
#include "pyexec.h"
#include "led.h"
@@ -181,45 +182,17 @@ STATIC mp_obj_t pyb_udelay(mp_obj_t usec_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_udelay_obj, pyb_udelay);
-/// \function wfi()
-/// Wait for an interrupt.
-/// This executies a `wfi` instruction which reduces power consumption
-/// of the MCU until an interrupt occurs, at which point execution continues.
-STATIC mp_obj_t pyb_wfi(void) {
- __WFI();
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_0(pyb_wfi_obj, pyb_wfi);
-
-/// \function disable_irq()
-/// Disable interrupt requests.
-STATIC mp_obj_t pyb_disable_irq(void) {
- __disable_irq();
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_0(pyb_disable_irq_obj, pyb_disable_irq);
-
-/// \function enable_irq()
-/// Enable interrupt requests.
-STATIC mp_obj_t pyb_enable_irq(void) {
- __enable_irq();
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_0(pyb_enable_irq_obj, pyb_enable_irq);
-
STATIC mp_obj_t pyb_stop(void) {
printf("stop not currently implemented\n");
return mp_const_none;
}
-
-MP_DEFINE_CONST_FUN_OBJ_0(pyb_stop_obj, pyb_stop);
+STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_stop_obj, pyb_stop);
STATIC mp_obj_t pyb_standby(void) {
printf("standby not currently implemented\n");
return mp_const_none;
}
-
-MP_DEFINE_CONST_FUN_OBJ_0(pyb_standby_obj, pyb_standby);
+STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_standby_obj, pyb_standby);
/// \function have_cdc()
/// Return True if USB is connected as a serial device, False otherwise.