nrfx 4.5.0
Loading...
Searching...
No Matches
RTC HAL

Hardware access layer for managing the Real Time Counter (RTC) peripheral. More...

Macros

#define NRF_RTC_HAS_SHORTS   1
 Symbol indicating whether COMPARE_CLEAR shorts are present.
 
#define NRF_RTC_INST_GET(idx)
 Macro getting pointer to the structure of registers of the RTC peripheral.
 
#define NRF_RTC_CC_CHANNEL_COUNT(id)
 Macro for getting the number of compare channels available in a given RTC instance.
 
#define NRF_RTC_CC_COUNT_MAX   NRFX_ARRAY_SIZE(((NRF_RTC_Type*)0)->EVENTS_COMPARE)
 Symbol specifying maximum number of available compare channels.
 
#define NRF_RTC_COUNTER_MAX   RTC_COUNTER_COUNTER_Msk
 Maximum value of the RTC counter.
 
#define NRF_RTC_INPUT_FREQ   32768
 Input frequency of the RTC instance.
 
#define NRF_RTC_FREQ_TO_PRESCALER(FREQ)
 Macro for converting expected frequency to prescaler setting.
 
#define NRF_RTC_WRAP(val)
 Macro for trimming values to the RTC bit width.
 
#define NRF_RTC_CHANNEL_INT_MASK(ch)
 Macro for creating the interrupt bitmask for the specified compare channel.
 
#define NRF_RTC_ALL_CHANNELS_INT_MASK    ((uint32_t)(((1 << NRF_RTC_CC_COUNT_MAX) - 1) << RTC_INTENSET_COMPARE0_Pos))
 Macro for creating the interrupt bitmask for all compare channels.
 
#define NRF_RTC_CHANNEL_EVENT_ADDR(ch)
 Macro for obtaining the compare event for the specified channel.
 

Enumerations

enum  nrf_rtc_task_t {
  NRF_RTC_TASK_START = offsetof(NRF_RTC_Type,TASKS_START) ,
  NRF_RTC_TASK_STOP = offsetof(NRF_RTC_Type,TASKS_STOP) ,
  NRF_RTC_TASK_CLEAR = offsetof(NRF_RTC_Type,TASKS_CLEAR) ,
  NRF_RTC_TASK_TRIGGER_OVERFLOW = offsetof(NRF_RTC_Type,TASKS_TRIGOVRFLW) ,
  NRF_RTC_TASK_CAPTURE_0 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[0]) ,
  NRF_RTC_TASK_CAPTURE_1 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[1]) ,
  NRF_RTC_TASK_CAPTURE_2 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[2]) ,
  NRF_RTC_TASK_CAPTURE_3 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[3]) ,
  NRF_RTC_TASK_CAPTURE_4 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[4]) ,
  NRF_RTC_TASK_CAPTURE_5 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[5]) ,
  NRF_RTC_TASK_CAPTURE_6 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[6]) ,
  NRF_RTC_TASK_CAPTURE_7 = offsetof(NRF_RTC_Type,TASKS_CAPTURE[7])
}
 RTC tasks. More...
 
enum  nrf_rtc_event_t {
  NRF_RTC_EVENT_TICK = offsetof(NRF_RTC_Type,EVENTS_TICK) ,
  NRF_RTC_EVENT_OVERFLOW = offsetof(NRF_RTC_Type,EVENTS_OVRFLW) ,
  NRF_RTC_EVENT_COMPARE_0 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[0]) ,
  NRF_RTC_EVENT_COMPARE_1 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[1]) ,
  NRF_RTC_EVENT_COMPARE_2 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[2]) ,
  NRF_RTC_EVENT_COMPARE_3 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[3]) ,
  NRF_RTC_EVENT_COMPARE_4 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[4]) ,
  NRF_RTC_EVENT_COMPARE_5 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[5]) ,
  NRF_RTC_EVENT_COMPARE_6 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[6]) ,
  NRF_RTC_EVENT_COMPARE_7 = offsetof(NRF_RTC_Type,EVENTS_COMPARE[7])
}
 RTC events. More...
 
enum  nrf_rtc_int_t {
  NRF_RTC_INT_TICK_MASK = RTC_INTENSET_TICK_Msk ,
  NRF_RTC_INT_OVERFLOW_MASK = RTC_INTENSET_OVRFLW_Msk ,
  NRF_RTC_INT_COMPARE0_MASK = RTC_INTENSET_COMPARE0_Msk ,
  NRF_RTC_INT_COMPARE1_MASK = RTC_INTENSET_COMPARE1_Msk ,
  NRF_RTC_INT_COMPARE2_MASK = RTC_INTENSET_COMPARE2_Msk ,
  NRF_RTC_INT_COMPARE3_MASK = RTC_INTENSET_COMPARE3_Msk ,
  NRF_RTC_INT_COMPARE_0_MASK = RTC_INTENSET_COMPARE0_Msk ,
  NRF_RTC_INT_COMPARE_1_MASK = RTC_INTENSET_COMPARE1_Msk ,
  NRF_RTC_INT_COMPARE_2_MASK = RTC_INTENSET_COMPARE2_Msk ,
  NRF_RTC_INT_COMPARE_3_MASK = RTC_INTENSET_COMPARE3_Msk ,
  NRF_RTC_INT_COMPARE_4_MASK = RTC_INTENSET_COMPARE4_Msk ,
  NRF_RTC_INT_COMPARE_5_MASK = RTC_INTENSET_COMPARE5_Msk ,
  NRF_RTC_INT_COMPARE_6_MASK = RTC_INTENSET_COMPARE6_Msk ,
  NRF_RTC_INT_COMPARE_7_MASK = RTC_INTENSET_COMPARE7_Msk
}
 RTC interrupts. More...
 
enum  nrf_rtc_short_mask_t {
  NRF_RTC_SHORT_COMPARE0_CLEAR_MASK = RTC_SHORTS_COMPARE0_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE1_CLEAR_MASK = RTC_SHORTS_COMPARE1_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE2_CLEAR_MASK = RTC_SHORTS_COMPARE2_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE3_CLEAR_MASK = RTC_SHORTS_COMPARE3_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE4_CLEAR_MASK = RTC_SHORTS_COMPARE4_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE5_CLEAR_MASK = RTC_SHORTS_COMPARE5_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE6_CLEAR_MASK = RTC_SHORTS_COMPARE6_CLEAR_Msk ,
  NRF_RTC_SHORT_COMPARE7_CLEAR_MASK = RTC_SHORTS_COMPARE7_CLEAR_Msk
}
 RTC shorts. More...
 

Functions

NRF_STATIC_INLINE void nrf_rtc_cc_set (NRF_RTC_Type *p_reg, uint32_t ch, uint32_t cc_val)
 Function for setting a compare value for a channel.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_cc_get (NRF_RTC_Type const *p_reg, uint32_t ch)
 Function for returning the compare value for a channel.
 
NRF_STATIC_INLINE void nrf_rtc_int_enable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for enabling interrupts.
 
NRF_STATIC_INLINE void nrf_rtc_int_disable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for disabling interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_int_enable_check (NRF_RTC_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE void nrf_rtc_subscribe_set (NRF_RTC_Type *p_reg, nrf_rtc_task_t task, uint8_t channel)
 Function for setting the subscribe configuration for a given RTC task.
 
NRF_STATIC_INLINE void nrf_rtc_subscribe_clear (NRF_RTC_Type *p_reg, nrf_rtc_task_t task)
 Function for clearing the subscribe configuration for a given RTC task.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_subscribe_get (NRF_RTC_Type const *p_reg, nrf_rtc_task_t task)
 Function for getting the subscribe configuration for a given RTC task.
 
NRF_STATIC_INLINE void nrf_rtc_publish_set (NRF_RTC_Type *p_reg, nrf_rtc_event_t event, uint8_t channel)
 Function for setting the publish configuration for a given RTC event.
 
NRF_STATIC_INLINE void nrf_rtc_publish_clear (NRF_RTC_Type *p_reg, nrf_rtc_event_t event)
 Function for clearing the publish configuration for a given RTC event.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_publish_get (NRF_RTC_Type const *p_reg, nrf_rtc_event_t event)
 Function for getting the publish configuration for a given RTC event.
 
NRF_STATIC_INLINE bool nrf_rtc_event_check (NRF_RTC_Type const *p_reg, nrf_rtc_event_t event)
 Function for retrieving the state of the RTC event.
 
NRF_STATIC_INLINE void nrf_rtc_event_clear (NRF_RTC_Type *p_reg, nrf_rtc_event_t event)
 Function for clearing an event.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_counter_get (NRF_RTC_Type const *p_reg)
 Function for returning a counter value.
 
NRF_STATIC_INLINE void nrf_rtc_prescaler_set (NRF_RTC_Type *p_reg, uint32_t val)
 Function for setting a prescaler value.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_prescaler_get (NRF_RTC_Type const *p_reg)
 Function for getting a prescaler value.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_event_address_get (NRF_RTC_Type const *p_reg, nrf_rtc_event_t event)
 Function for returning the address of an event.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_task_address_get (NRF_RTC_Type const *p_reg, nrf_rtc_task_t task)
 Function for returning the address of a task.
 
NRF_STATIC_INLINE nrf_rtc_task_t nrf_rtc_capture_task_get (uint8_t index)
 Function for getting the CAPTURE task associated with the specified capture channel.
 
NRF_STATIC_INLINE void nrf_rtc_task_trigger (NRF_RTC_Type *p_reg, nrf_rtc_task_t task)
 Function for starting a task.
 
NRF_STATIC_INLINE void nrf_rtc_event_enable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for enabling events.
 
NRF_STATIC_INLINE void nrf_rtc_event_disable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for disabling an event.
 
NRF_STATIC_INLINE nrf_rtc_event_t nrf_rtc_compare_event_get (uint8_t index)
 Function for getting the COMPARE event associated with the specified compare channel.
 
NRF_STATIC_INLINE void nrf_rtc_shorts_enable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for enabling the specified shortcuts.
 
NRF_STATIC_INLINE void nrf_rtc_shorts_disable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for disabling the specified shortcuts.
 
NRF_STATIC_INLINE uint32_t nrf_rtc_shorts_get (NRF_RTC_Type const *p_reg)
 Function for getting the shortcut setting.
 

Detailed Description

Hardware access layer for managing the Real Time Counter (RTC) peripheral.

Macro Definition Documentation

◆ NRF_RTC_CC_CHANNEL_COUNT

#define NRF_RTC_CC_CHANNEL_COUNT ( id)
Value:
NRFX_CONCAT_3(RTC, id, _CC_NUM)
#define NRFX_CONCAT_3(p1, p2, p3)
Macro for concatenating three tokens in macro expansion.
Definition nrfx_utils.h:164

Macro for getting the number of compare channels available in a given RTC instance.

◆ NRF_RTC_CHANNEL_EVENT_ADDR

#define NRF_RTC_CHANNEL_EVENT_ADDR ( ch)
Value:
(nrf_rtc_event_t)((NRF_RTC_EVENT_COMPARE_0) + (ch) * sizeof(uint32_t))
nrf_rtc_event_t
RTC events.
Definition nrf_rtc.h:123
@ NRF_RTC_EVENT_COMPARE_0
Definition nrf_rtc.h:126

Macro for obtaining the compare event for the specified channel.

◆ NRF_RTC_CHANNEL_INT_MASK

#define NRF_RTC_CHANNEL_INT_MASK ( ch)
Value:
((uint32_t)(NRF_RTC_INT_COMPARE_0_MASK) << (ch))
@ NRF_RTC_INT_COMPARE_0_MASK
Definition nrf_rtc.h:147

Macro for creating the interrupt bitmask for the specified compare channel.

◆ NRF_RTC_FREQ_TO_PRESCALER

#define NRF_RTC_FREQ_TO_PRESCALER ( FREQ)
Value:
(uint16_t)(((NRF_RTC_INPUT_FREQ) / (FREQ)) - 1)
#define NRF_RTC_INPUT_FREQ
Input frequency of the RTC instance.
Definition nrf_rtc.h:81

Macro for converting expected frequency to prescaler setting.

◆ NRF_RTC_INST_GET

#define NRF_RTC_INST_GET ( idx)
Value:
NRFX_CONCAT(NRF_, RTC, idx)
#define NRFX_CONCAT(...)
Macro for concatenating multiple arguments.
Definition nrfx_utils.h:777

Macro getting pointer to the structure of registers of the RTC peripheral.

Parameters
[in]idxRTC instance index.
Returns
Pointer to the structure of registers of the RTC peripheral.

◆ NRF_RTC_WRAP

#define NRF_RTC_WRAP ( val)
Value:
((val) & RTC_COUNTER_COUNTER_Msk)

Macro for trimming values to the RTC bit width.

Enumeration Type Documentation

◆ nrf_rtc_event_t

RTC events.

Enumerator
NRF_RTC_EVENT_TICK 

Tick event.

NRF_RTC_EVENT_OVERFLOW 

Overflow event.

NRF_RTC_EVENT_COMPARE_0 

Compare 0 event.

NRF_RTC_EVENT_COMPARE_1 

Compare 1 event.

NRF_RTC_EVENT_COMPARE_2 

Compare 2 event.

NRF_RTC_EVENT_COMPARE_3 

Compare 3 event.

NRF_RTC_EVENT_COMPARE_4 

Compare 4 event.

NRF_RTC_EVENT_COMPARE_5 

Compare 5 event.

NRF_RTC_EVENT_COMPARE_6 

Compare 6 event.

NRF_RTC_EVENT_COMPARE_7 

Compare 7 event.

◆ nrf_rtc_int_t

RTC interrupts.

Enumerator
NRF_RTC_INT_TICK_MASK 

RTC interrupt from tick event.

NRF_RTC_INT_OVERFLOW_MASK 

RTC interrupt from overflow event.

NRF_RTC_INT_COMPARE0_MASK 

RTC interrupt from compare event on channel 0.

Deprecated
Use NRF_RTC_INT_COMPARE_0_MASK instead.
NRF_RTC_INT_COMPARE1_MASK 

RTC interrupt from compare event on channel 1.

Deprecated
Use NRF_RTC_INT_COMPARE_1_MASK instead.
NRF_RTC_INT_COMPARE2_MASK 

RTC interrupt from compare event on channel 2.

Deprecated
Use NRF_RTC_INT_COMPARE_2_MASK instead.
NRF_RTC_INT_COMPARE3_MASK 

RTC interrupt from compare event on channel 3.

Deprecated
Use NRF_RTC_INT_COMPARE_3_MASK instead.
NRF_RTC_INT_COMPARE_0_MASK 

RTC interrupt from compare event on channel 0.

NRF_RTC_INT_COMPARE_1_MASK 

RTC interrupt from compare event on channel 1.

NRF_RTC_INT_COMPARE_2_MASK 

RTC interrupt from compare event on channel 2.

NRF_RTC_INT_COMPARE_3_MASK 

RTC interrupt from compare event on channel 3.

NRF_RTC_INT_COMPARE_4_MASK 

RTC interrupt from compare event on channel 4.

NRF_RTC_INT_COMPARE_5_MASK 

RTC interrupt from compare event on channel 5.

NRF_RTC_INT_COMPARE_6_MASK 

RTC interrupt from compare event on channel 6.

NRF_RTC_INT_COMPARE_7_MASK 

RTC interrupt from compare event on channel 7.

◆ nrf_rtc_short_mask_t

RTC shorts.

Enumerator
NRF_RTC_SHORT_COMPARE0_CLEAR_MASK 

Shortcut between COMPARE0 event and CLEAR task.

NRF_RTC_SHORT_COMPARE1_CLEAR_MASK 

Shortcut between COMPARE1 event and CLEAR task.

NRF_RTC_SHORT_COMPARE2_CLEAR_MASK 

Shortcut between COMPARE2 event and CLEAR task.

NRF_RTC_SHORT_COMPARE3_CLEAR_MASK 

Shortcut between COMPARE3 event and CLEAR task.

NRF_RTC_SHORT_COMPARE4_CLEAR_MASK 

Shortcut between COMPARE4 event and CLEAR task.

NRF_RTC_SHORT_COMPARE5_CLEAR_MASK 

Shortcut between COMPARE5 event and CLEAR task.

NRF_RTC_SHORT_COMPARE6_CLEAR_MASK 

Shortcut between COMPARE6 event and CLEAR task.

NRF_RTC_SHORT_COMPARE7_CLEAR_MASK 

Shortcut between COMPARE7 event and CLEAR task.

◆ nrf_rtc_task_t

RTC tasks.

Enumerator
NRF_RTC_TASK_START 

Start.

NRF_RTC_TASK_STOP 

Stop.

NRF_RTC_TASK_CLEAR 

Clear.

NRF_RTC_TASK_TRIGGER_OVERFLOW 

Trigger overflow.

NRF_RTC_TASK_CAPTURE_0 

Capture the counter value on channel 0.

NRF_RTC_TASK_CAPTURE_1 

Capture the counter value on channel 1.

NRF_RTC_TASK_CAPTURE_2 

Capture the counter value on channel 2.

NRF_RTC_TASK_CAPTURE_3 

Capture the counter value on channel 3.

NRF_RTC_TASK_CAPTURE_4 

Capture the counter value on channel 4.

NRF_RTC_TASK_CAPTURE_5 

Capture the counter value on channel 5.

NRF_RTC_TASK_CAPTURE_6 

Capture the counter value on channel 6.

NRF_RTC_TASK_CAPTURE_7 

Capture the counter value on channel 7.

Function Documentation

◆ nrf_rtc_capture_task_get()

NRF_STATIC_INLINE nrf_rtc_task_t nrf_rtc_capture_task_get ( uint8_t index)

Function for getting the CAPTURE task associated with the specified capture channel.

Parameters
[in]indexCapture channel index.
Returns
Requested CAPTURE task.

◆ nrf_rtc_cc_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_cc_get ( NRF_RTC_Type const * p_reg,
uint32_t ch )

Function for returning the compare value for a channel.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]chChannel.
Returns
COMPARE[ch] value.

◆ nrf_rtc_cc_set()

NRF_STATIC_INLINE void nrf_rtc_cc_set ( NRF_RTC_Type * p_reg,
uint32_t ch,
uint32_t cc_val )

Function for setting a compare value for a channel.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]chChannel.
[in]cc_valCompare value to be set.

◆ nrf_rtc_compare_event_get()

NRF_STATIC_INLINE nrf_rtc_event_t nrf_rtc_compare_event_get ( uint8_t index)

Function for getting the COMPARE event associated with the specified compare channel.

Parameters
[in]indexCompare channel index.
Returns
Requested COMPARE event.

◆ nrf_rtc_counter_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_counter_get ( NRF_RTC_Type const * p_reg)

Function for returning a counter value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Counter value.

◆ nrf_rtc_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_event_address_get ( NRF_RTC_Type const * p_reg,
nrf_rtc_event_t event )

Function for returning the address of an event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventRequested event.
Returns
Address of the requested event register.

◆ nrf_rtc_event_check()

NRF_STATIC_INLINE bool nrf_rtc_event_check ( NRF_RTC_Type const * p_reg,
nrf_rtc_event_t event )

Function for retrieving the state of the RTC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrf_rtc_event_clear()

NRF_STATIC_INLINE void nrf_rtc_event_clear ( NRF_RTC_Type * p_reg,
nrf_rtc_event_t event )

Function for clearing an event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be cleared.

◆ nrf_rtc_event_disable()

NRF_STATIC_INLINE void nrf_rtc_event_disable ( NRF_RTC_Type * p_reg,
uint32_t mask )

Function for disabling an event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of event flags to be disabled.

◆ nrf_rtc_event_enable()

NRF_STATIC_INLINE void nrf_rtc_event_enable ( NRF_RTC_Type * p_reg,
uint32_t mask )

Function for enabling events.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of event flags to be enabled.

◆ nrf_rtc_int_disable()

NRF_STATIC_INLINE void nrf_rtc_int_disable ( NRF_RTC_Type * p_reg,
uint32_t mask )

Function for disabling interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_rtc_int_t values for bit masking.

◆ nrf_rtc_int_enable()

NRF_STATIC_INLINE void nrf_rtc_int_enable ( NRF_RTC_Type * p_reg,
uint32_t mask )

Function for enabling interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_rtc_int_t values for bit masking.

◆ nrf_rtc_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_rtc_int_enable_check ( NRF_RTC_Type const * p_reg,
uint32_t mask )

Function for checking if the specified interrupts are enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_rtc_int_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_rtc_prescaler_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_prescaler_get ( NRF_RTC_Type const * p_reg)

Function for getting a prescaler value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Prescaler value.

◆ nrf_rtc_prescaler_set()

NRF_STATIC_INLINE void nrf_rtc_prescaler_set ( NRF_RTC_Type * p_reg,
uint32_t val )

Function for setting a prescaler value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valValue to set the prescaler to.

◆ nrf_rtc_publish_clear()

NRF_STATIC_INLINE void nrf_rtc_publish_clear ( NRF_RTC_Type * p_reg,
nrf_rtc_event_t event )

Function for clearing the publish configuration for a given RTC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrf_rtc_publish_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_publish_get ( NRF_RTC_Type const * p_reg,
nrf_rtc_event_t event )

Function for getting the publish configuration for a given RTC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to read the configuration.
Returns
RTC publish configuration.

◆ nrf_rtc_publish_set()

NRF_STATIC_INLINE void nrf_rtc_publish_set ( NRF_RTC_Type * p_reg,
nrf_rtc_event_t event,
uint8_t channel )

Function for setting the publish configuration for a given RTC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrf_rtc_shorts_disable()

NRF_STATIC_INLINE void nrf_rtc_shorts_disable ( NRF_RTC_Type * p_reg,
uint32_t mask )

Function for disabling the specified shortcuts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskShortcuts to be disabled.

◆ nrf_rtc_shorts_enable()

NRF_STATIC_INLINE void nrf_rtc_shorts_enable ( NRF_RTC_Type * p_reg,
uint32_t mask )

Function for enabling the specified shortcuts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskShortcuts to be enabled.

◆ nrf_rtc_shorts_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_shorts_get ( NRF_RTC_Type const * p_reg)

Function for getting the shortcut setting.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Current shortcut configuration.

◆ nrf_rtc_subscribe_clear()

NRF_STATIC_INLINE void nrf_rtc_subscribe_clear ( NRF_RTC_Type * p_reg,
nrf_rtc_task_t task )

Function for clearing the subscribe configuration for a given RTC task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrf_rtc_subscribe_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_subscribe_get ( NRF_RTC_Type const * p_reg,
nrf_rtc_task_t task )

Function for getting the subscribe configuration for a given RTC task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to read the configuration.
Returns
RTC subscribe configuration.

◆ nrf_rtc_subscribe_set()

NRF_STATIC_INLINE void nrf_rtc_subscribe_set ( NRF_RTC_Type * p_reg,
nrf_rtc_task_t task,
uint8_t channel )

Function for setting the subscribe configuration for a given RTC task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrf_rtc_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_rtc_task_address_get ( NRF_RTC_Type const * p_reg,
nrf_rtc_task_t task )

Function for returning the address of a task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRequested task.
Returns
Address of the requested task register.

◆ nrf_rtc_task_trigger()

NRF_STATIC_INLINE void nrf_rtc_task_trigger ( NRF_RTC_Type * p_reg,
nrf_rtc_task_t task )

Function for starting a task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRequested task.