rtc_alarm.c File Reference
#include <stdlib.h>
#include "rtc_alarm.h"
#include "rtc.h"
#include "c_list.h"
#include "LPC17xx.h"
Include dependency graph for rtc_alarm.c:

Data Structures | |
struct | sem_alarm_t |
Functions | |
void | rtc_alarm_create_recurring (alarm_freq_t freq, SemaphoreHandle_t *pAlarm) |
alarm_time_t * | rtc_alarm_create (alarm_time_t time, SemaphoreHandle_t *pAlarm) |
void | RTC_IRQHandler (void) |
Function Documentation
alarm_time_t* rtc_alarm_create | ( | alarm_time_t | time, |
SemaphoreHandle_t * | pAlarm | ||
) |
Enables alarm at the given
- Parameters
-
time
- Postcondition
- pAlarm semaphore will be given when RTC time matches the given time.
- Returns
- alarm_time_t that can be used to modify alarm time
void rtc_alarm_create_recurring | ( | alarm_freq_t | freq, |
SemaphoreHandle_t * | pAlarm | ||
) |
Enables a permanent recurring alarm every second, minute, or hour
- Parameters
-
pAlarm The signal (semaphore) to give when the alarm triggers freq The frequency of the alarm
- See also
- alarm_freq_t
- Note
- This is different from rtc_alarm_create() because once you enable this recurring alarm, there is no way to disable it or change it later.
void RTC_IRQHandler | ( | void | ) |