@@ -92,6 +92,18 @@ void pybrtc_init(void) {
9292 }
9393}
9494
95+ void pyb_rtc_callback_disable (mp_obj_t self_in ) {
96+ // check the wake from param
97+ if (pybrtc_data .prwmode & PYB_PWR_MODE_ACTIVE ) {
98+ // disable the slow clock interrupt
99+ MAP_PRCMIntDisable (PRCM_INT_SLOW_CLK_CTR );
100+ }
101+ // disable wake from ldps and hibernate
102+ pybsleep_configure_timer_wakeup (PYB_PWR_MODE_ACTIVE );
103+ // read the interrupt status to clear any pending interrupt
104+ (void )MAP_PRCMIntStatus ();
105+ }
106+
95107/******************************************************************************
96108 DECLARE PRIVATE FUNCTIONS
97109 ******************************************************************************/
@@ -108,18 +120,6 @@ STATIC void pyb_rtc_callback_enable (mp_obj_t self_in) {
108120 pybsleep_configure_timer_wakeup (pybrtc_data .prwmode );
109121}
110122
111- STATIC void pyb_rtc_callback_disable (mp_obj_t self_in ) {
112- // check the wake from param
113- if (pybrtc_data .prwmode & PYB_PWR_MODE_ACTIVE ) {
114- // disable the slow clock interrupt
115- MAP_PRCMIntDisable (PRCM_INT_SLOW_CLK_CTR );
116- }
117- // disable wake from ldps and hibernate
118- pybsleep_configure_timer_wakeup (PYB_PWR_MODE_ACTIVE );
119- // read the interrupt status to clear any pending interrupt
120- (void )MAP_PRCMIntStatus ();
121- }
122-
123123/******************************************************************************/
124124// Micro Python bindings
125125
0 commit comments