hardware_rtc: make rtc_enable_alarm public
This commit is contained in:
parent
4904fe2e32
commit
8ada5fa7eb
@ -69,6 +69,11 @@ bool rtc_running(void);
|
||||
*/
|
||||
void rtc_set_alarm(datetime_t *t, rtc_callback_t user_callback);
|
||||
|
||||
/*! \brief Enable the RTC alarm (if inactive)
|
||||
* \ingroup hardware_rtc
|
||||
*/
|
||||
void rtc_enable_alarm(void);
|
||||
|
||||
/*! \brief Disable the RTC alarm (if active)
|
||||
* \ingroup hardware_rtc
|
||||
*/
|
||||
|
@ -103,7 +103,7 @@ bool rtc_get_datetime(datetime_t *t) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static void rtc_enable_alarm(void) {
|
||||
void rtc_enable_alarm(void) {
|
||||
// Set matching and wait for it to be enabled
|
||||
hw_set_bits(&rtc_hw->irq_setup_0, RTC_IRQ_SETUP_0_MATCH_ENA_BITS);
|
||||
while(!(rtc_hw->irq_setup_0 & RTC_IRQ_SETUP_0_MATCH_ACTIVE_BITS)) {
|
||||
|
Loading…
Reference in New Issue
Block a user