aboutsummaryrefslogtreecommitdiff
path: root/cc3200/mods/pybrtc.c
diff options
context:
space:
mode:
authorDaniel Campora2015-05-09 17:46:16 +0200
committerDaniel Campora2015-05-17 12:34:49 +0200
commit8e611e841476d98eb829978a7e73ce92ff822ca8 (patch)
tree7881c41feb3a5c5ecd98b1a65da5c0bc56d3382f /cc3200/mods/pybrtc.c
parent9466e154b4806ace535d4493d1dd6e63379c2f68 (diff)
cc3200: Add Timer module. Supports free running, PWM and capture modes.
Diffstat (limited to 'cc3200/mods/pybrtc.c')
-rw-r--r--cc3200/mods/pybrtc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/cc3200/mods/pybrtc.c b/cc3200/mods/pybrtc.c
index a9cc995d5..603f9930c 100644
--- a/cc3200/mods/pybrtc.c
+++ b/cc3200/mods/pybrtc.c
@@ -92,6 +92,18 @@ void pybrtc_init(void) {
}
}
+void pyb_rtc_callback_disable (mp_obj_t self_in) {
+ // check the wake from param
+ if (pybrtc_data.prwmode & PYB_PWR_MODE_ACTIVE) {
+ // disable the slow clock interrupt
+ MAP_PRCMIntDisable(PRCM_INT_SLOW_CLK_CTR);
+ }
+ // disable wake from ldps and hibernate
+ pybsleep_configure_timer_wakeup (PYB_PWR_MODE_ACTIVE);
+ // read the interrupt status to clear any pending interrupt
+ (void)MAP_PRCMIntStatus();
+}
+
/******************************************************************************
DECLARE PRIVATE FUNCTIONS
******************************************************************************/
@@ -108,18 +120,6 @@ STATIC void pyb_rtc_callback_enable (mp_obj_t self_in) {
pybsleep_configure_timer_wakeup (pybrtc_data.prwmode);
}
-STATIC void pyb_rtc_callback_disable (mp_obj_t self_in) {
- // check the wake from param
- if (pybrtc_data.prwmode & PYB_PWR_MODE_ACTIVE) {
- // disable the slow clock interrupt
- MAP_PRCMIntDisable(PRCM_INT_SLOW_CLK_CTR);
- }
- // disable wake from ldps and hibernate
- pybsleep_configure_timer_wakeup (PYB_PWR_MODE_ACTIVE);
- // read the interrupt status to clear any pending interrupt
- (void)MAP_PRCMIntStatus();
-}
-
/******************************************************************************/
// Micro Python bindings