Access functions for the Real Time Counter Controller
More...
Access functions for the Real Time Counter Controller
LGPL License Terms libopencm3 License
- Author
- © 2016 Maxim Sloyko maxim.nosp@m.s@go.nosp@m.ogle..nosp@m.com
◆ rtc_clear()
void rtc_clear |
( |
uint32_t |
rtc | ) |
|
◆ rtc_disable_events()
void rtc_disable_events |
( |
uint32_t |
rtc, |
|
|
uint32_t |
mask |
|
) |
| |
Disable events.
- Parameters
-
[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.
◆ rtc_enable_events()
void rtc_enable_events |
( |
uint32_t |
rtc, |
|
|
uint32_t |
mask |
|
) |
| |
Enable events.
- Parameters
-
[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.
◆ rtc_get_counter()
uint32_t rtc_get_counter |
( |
uint32_t |
rtc | ) |
|
RTC get Counter value.
- Parameters
-
Definition at line 51 of file rtc.c.
References RTC_COUNTER.
◆ rtc_set_compare()
void rtc_set_compare |
( |
uint32_t |
rtc, |
|
|
uint8_t |
cmp, |
|
|
uint32_t |
value |
|
) |
| |
Set compare register.
- Parameters
-
[in] | rtc | uint32_t RTC base |
[in] | cmp | uint8_t compare number (0-3) |
[in] | value | uint32_t compare value |
Definition at line 109 of file rtc.c.
References RTC_CC.
◆ rtc_set_prescaler()
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.
- Parameters
-
[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.
◆ rtc_start()
void rtc_start |
( |
uint32_t |
rtc | ) |
|
◆ rtc_stop()
void rtc_stop |
( |
uint32_t |
rtc | ) |
|