libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
RTC Defines

Defined Constants and Types for the NRF52xx Realtime clock More...

Collaboration diagram for RTC Defines:

Modules

 RTC instances
 

Macros

#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)))
 

Detailed Description

Defined Constants and Types for the NRF52xx Realtime clock

Version
1.0.0
Date
Nov 2021

LGPL License Terms libopencm3 License

Author
© 2016 Maxim Sloyko maxim.nosp@m.s@go.nosp@m.ogle..nosp@m.com
© 2021 Eduard Drusa <ventyl86 at netkosice dot sk>

Macro Definition Documentation

◆ RTC_CC

#define RTC_CC (   rtc,
 
)    MMIO32((rtc) + 0x540 + 0x4 * (i))

Definition at line 64 of file common/rtc.h.

◆ RTC_COUNTER

#define RTC_COUNTER (   rtc)    MMIO32((rtc) + 0x504)

Definition at line 62 of file common/rtc.h.

◆ RTC_EVENT_COMPARE

#define RTC_EVENT_COMPARE (   rtc,
 
)    MMIO32((rtc) + 0x140 + 0x4 * (i))

Definition at line 53 of file common/rtc.h.

◆ RTC_EVENT_OVRFLW

#define RTC_EVENT_OVRFLW (   rtc)    MMIO32((rtc) + 0x104)

Definition at line 52 of file common/rtc.h.

◆ RTC_EVENT_TICK

#define RTC_EVENT_TICK (   rtc)    MMIO32((rtc) + 0x100)

Definition at line 51 of file common/rtc.h.

◆ RTC_EVTEN

#define RTC_EVTEN (   rtc)    MMIO32((rtc) + 0x340)

Definition at line 59 of file common/rtc.h.

◆ RTC_EVTENCLR

#define RTC_EVTENCLR (   rtc)    MMIO32((rtc) + 0x348)

Definition at line 61 of file common/rtc.h.

◆ RTC_EVTENSET

#define RTC_EVTENSET (   rtc)    MMIO32((rtc) + 0x344)

Definition at line 60 of file common/rtc.h.

◆ RTC_INTEN

#define RTC_INTEN (   rtc)    _PERIPH_INTEN(rtc)

Definition at line 56 of file common/rtc.h.

◆ RTC_INTEN_COMPARE

#define RTC_INTEN_COMPARE (   n)    (1 << (16 + (n)))

Definition at line 69 of file common/rtc.h.

◆ RTC_INTEN_OVRFLW

#define RTC_INTEN_OVRFLW   (1 << 1)

Definition at line 68 of file common/rtc.h.

◆ RTC_INTEN_TICK

#define RTC_INTEN_TICK   (1 << 0)

Definition at line 67 of file common/rtc.h.

◆ RTC_INTENCLR

#define RTC_INTENCLR (   rtc)    _PERIPH_INTENCLR(rtc)

Definition at line 58 of file common/rtc.h.

◆ RTC_INTENSET

#define RTC_INTENSET (   rtc)    _PERIPH_INTENSET(rtc)

Definition at line 57 of file common/rtc.h.

◆ RTC_PRESCALER

#define RTC_PRESCALER (   rtc)    MMIO32((rtc) + 0x508)

Definition at line 63 of file common/rtc.h.

◆ RTC_TASK_CLEAR

#define RTC_TASK_CLEAR (   rtc)    MMIO32((rtc) + 0x008)

Definition at line 47 of file common/rtc.h.

◆ RTC_TASK_START

#define RTC_TASK_START (   rtc)    MMIO32((rtc) + 0x000)

Definition at line 45 of file common/rtc.h.

◆ RTC_TASK_STOP

#define RTC_TASK_STOP (   rtc)    MMIO32((rtc) + 0x004)

Definition at line 46 of file common/rtc.h.

◆ RTC_TASK_TRIGOVRFLW

#define RTC_TASK_TRIGOVRFLW (   rtc)    MMIO32((rtc) + 0x00C)

Definition at line 48 of file common/rtc.h.