move externs to .h
This commit is contained in:
parent
9328d09a7a
commit
c86ca2a4ff
|
@ -55,19 +55,15 @@ mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *
|
|||
return timer;
|
||||
}
|
||||
|
||||
extern volatile int rtc_woke_up_counter;
|
||||
bool alarm_time_timealarm_woke_us_up(void) {
|
||||
return rtc_woke_up_counter;
|
||||
}
|
||||
|
||||
extern void port_disable_interrupt_after_ticks_ch(uint32_t channel);
|
||||
void alarm_time_timealarm_reset(void) {
|
||||
port_disable_interrupt_after_ticks_ch(1);
|
||||
rtc_woke_up_counter = 0;
|
||||
}
|
||||
|
||||
extern void port_interrupt_after_ticks_ch(uint32_t channel, uint32_t ticks);//XXX in port.c
|
||||
|
||||
void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) {
|
||||
bool timealarm_set = false;
|
||||
alarm_time_timealarm_obj_t *timealarm = MP_OBJ_NULL;
|
||||
|
|
|
@ -32,6 +32,10 @@ typedef struct {
|
|||
mp_float_t monotonic_time; // values compatible with time.monotonic_time()
|
||||
} alarm_time_timealarm_obj_t;
|
||||
|
||||
extern volatile int rtc_woke_up_counter;
|
||||
extern void port_disable_interrupt_after_ticks_ch(uint32_t channel);
|
||||
extern void port_interrupt_after_ticks_ch(uint32_t channel, uint32_t ticks);
|
||||
|
||||
// Find the alarm object that caused us to wake up or create an equivalent one.
|
||||
mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms);
|
||||
// Check for the wake up alarm from pretend deep sleep.
|
||||
|
|
Loading…
Reference in New Issue