libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include <libopencm3/cm3/common.h>
#include <libopencm3/nrf/memorymap.h>
#include <libopencm3/nrf/periph.h>
Go to the source code of this file.
Macros | |
#define | RTC0 RTC0_BASE |
#define | RTC1 RTC1_BASE |
#define | RTC_TASK_START(rtc) MMIO32((rtc) + 0x000) |
#define | RTC_TASK_STOP(rtc) MMIO32((rtc) + 0x004) |
#define | RTC_TASK_CLEAR(rtc) MMIO32((rtc) + 0x008) |
#define | RTC_TASK_TRIGOVRFLW(rtc) MMIO32((rtc) + 0x00C) |
#define | RTC_EVENT_TICK(rtc) MMIO32((rtc) + 0x100) |
#define | RTC_EVENT_OVRFLW(rtc) MMIO32((rtc) + 0x104) |
#define | RTC_EVENT_COMPARE(rtc, i) MMIO32((rtc) + 0x140 + 0x4 * (i)) |
#define | RTC_INTEN(rtc) _PERIPH_INTEN(rtc) |
#define | RTC_INTENSET(rtc) _PERIPH_INTENSET(rtc) |
#define | RTC_INTENCLR(rtc) _PERIPH_INTENCLR(rtc) |
#define | RTC_EVTEN(rtc) MMIO32((rtc) + 0x340) |
#define | RTC_EVTENSET(rtc) MMIO32((rtc) + 0x344) |
#define | RTC_EVTENCLR(rtc) MMIO32((rtc) + 0x348) |
#define | RTC_COUNTER(rtc) MMIO32((rtc) + 0x504) |
#define | RTC_PRESCALER(rtc) MMIO32((rtc) + 0x508) |
#define | RTC_CC(rtc, i) MMIO32((rtc) + 0x540 + 0x4 * (i)) |
#define | RTC_INTEN_TICK (1 << 0) |
#define | RTC_INTEN_OVRFLW (1 << 1) |
#define | RTC_INTEN_COMPARE(n) (1 << (16 + (n))) |
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... | |