libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Access functions for the Real Time Counter Controller More...
Functions | |
void | rtc_set_prescaler (uint32_t rtc, uint16_t presc) |
RTC set Prescaler value. More... | |
uint32_t | rtc_get_counter (uint32_t rtc) |
RTC get Counter value. More... | |
void | rtc_enable_events (uint32_t rtc, uint32_t mask) |
Enable events. More... | |
void | rtc_disable_events (uint32_t rtc, uint32_t mask) |
Disable events. More... | |
void | rtc_start (uint32_t rtc) |
Start the RTC. More... | |
void | rtc_stop (uint32_t rtc) |
Stop the RTC. More... | |
void | rtc_clear (uint32_t rtc) |
Clear the RTC. More... | |
void | rtc_set_compare (uint32_t rtc, uint8_t cmp, uint32_t value) |
Set compare register. More... | |
Access functions for the Real Time Counter Controller
LGPL License Terms libopencm3 License
void rtc_clear | ( | uint32_t | rtc | ) |
Clear the RTC.
[in] | rtc | uint32_t RTC base |
Definition at line 98 of file rtc.c.
References PERIPH_TRIGGER_TASK, and RTC_TASK_CLEAR.
void rtc_disable_events | ( | uint32_t | rtc, |
uint32_t | mask | ||
) |
Disable events.
[in] | rtc | uint32_t RTC base |
[in] | mask | uint32_t which events to disable |
Definition at line 71 of file rtc.c.
References RTC_EVTENCLR.
void rtc_enable_events | ( | uint32_t | rtc, |
uint32_t | mask | ||
) |
Enable events.
[in] | rtc | uint32_t RTC base |
[in] | mask | uint32_t which events to enable |
Definition at line 61 of file rtc.c.
References RTC_EVTENSET.
uint32_t rtc_get_counter | ( | uint32_t | rtc | ) |
RTC get Counter value.
[in] | rtc | uint32_t RTC base |
Definition at line 51 of file rtc.c.
References RTC_COUNTER.
void rtc_set_compare | ( | uint32_t | rtc, |
uint8_t | cmp, | ||
uint32_t | value | ||
) |
void rtc_set_prescaler | ( | uint32_t | rtc, |
uint16_t | presc | ||
) |
RTC set Prescaler value.
The clock needs to be stopped for this to have any effect.
[in] | rtc | uint32_t RTC base |
[in] | presc | uint16_t 12 bit prescaler value. |
Definition at line 42 of file rtc.c.
References RTC_PRESCALER.
void rtc_start | ( | uint32_t | rtc | ) |
Start the RTC.
[in] | rtc | uint32_t RTC base |
Definition at line 80 of file rtc.c.
References PERIPH_TRIGGER_TASK, and RTC_TASK_START.
void rtc_stop | ( | uint32_t | rtc | ) |
Stop the RTC.
[in] | rtc | uint32_t RTC base |
Definition at line 89 of file rtc.c.
References PERIPH_TRIGGER_TASK, and RTC_TASK_STOP.