nrfx 3.3
Data Structures | Functions
RTC HALY

Hardware access layer with cache and barrier support for managing the RTC peripheral. More...

Data Structures

struct  nrfy_rtc_config_t
 Structure for RTC configuration. More...
 

Functions

NRFY_STATIC_INLINE void nrfy_rtc_periph_configure (NRF_RTC_Type *p_reg, nrfy_rtc_config_t const *p_config)
 Function for configuring the RTC.
 
NRFY_STATIC_INLINE void nrfy_rtc_int_init (NRF_RTC_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable)
 Function for initializing the specified RTC interrupts.
 
NRFY_STATIC_INLINE void nrfy_rtc_int_uninit (NRF_RTC_Type *p_reg)
 Function for uninitializing the RTC interrupts.
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_events_process (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for processing the specified RTC events.
 
NRFY_STATIC_INLINE void nrfy_rtc_stop (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for stopping the RTC.
 
NRFY_STATIC_INLINE void nrfy_rtc_event_int_clear_enable (NRF_RTC_Type *p_reg, nrf_rtc_event_t event, bool enable)
 Function for enabling the RTC event and optionally associated interrupt.
 
NRFY_STATIC_INLINE void nrfy_rtc_event_int_disable (NRF_RTC_Type *p_reg, uint32_t mask)
 Function for disabling the RTC events and corresponding interrupts.
 
NRFY_STATIC_INLINE void nrfy_rtc_cc_set (NRF_RTC_Type *p_reg, uint32_t ch, uint32_t cc_val)
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_cc_get (NRF_RTC_Type const *p_reg, uint32_t ch)
 
NRFY_STATIC_INLINE void nrfy_rtc_int_enable (NRF_RTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_rtc_int_disable (NRF_RTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_int_enable_check (NRF_RTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_rtc_subscribe_set (NRF_RTC_Type *p_reg, nrf_rtc_task_t task, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_rtc_subscribe_clear (NRF_RTC_Type *p_reg, nrf_rtc_task_t task)
 
NRFY_STATIC_INLINE void nrfy_rtc_publish_set (NRF_RTC_Type *p_reg, nrf_rtc_event_t event, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_rtc_publish_clear (NRF_RTC_Type *p_reg, nrf_rtc_event_t event)
 
NRFY_STATIC_INLINE bool nrfy_rtc_event_check (NRF_RTC_Type *p_reg, nrf_rtc_event_t event)
 
NRFY_STATIC_INLINE void nrfy_rtc_event_clear (NRF_RTC_Type *p_reg, nrf_rtc_event_t event)
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_counter_get (NRF_RTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_rtc_prescaler_set (NRF_RTC_Type *p_reg, uint32_t val)
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_prescaler_get (NRF_RTC_Type const *p_reg)
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_event_address_get (NRF_RTC_Type const *p_reg, nrf_rtc_event_t event)
 
NRFY_STATIC_INLINE uint32_t nrfy_rtc_task_address_get (NRF_RTC_Type const *p_reg, nrf_rtc_task_t task)
 
NRFY_STATIC_INLINE void nrfy_rtc_task_trigger (NRF_RTC_Type *p_reg, nrf_rtc_task_t task)
 
NRFY_STATIC_INLINE nrf_rtc_task_t nrfy_rtc_capture_task_get (uint8_t index)
 
NRFY_STATIC_INLINE void nrfy_rtc_event_enable (NRF_RTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_rtc_event_disable (NRF_RTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE nrf_rtc_event_t nrfy_rtc_compare_event_get (uint8_t index)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the RTC peripheral.

Function Documentation

◆ nrfy_rtc_capture_task_get()

NRFY_STATIC_INLINE nrf_rtc_task_t nrfy_rtc_capture_task_get ( uint8_t  index)
See also
nrf_rtc_capture_task_get Function for getting the CAPTURE task associated with the specified capture channel.
Parameters
[in]indexCapture channel index.
Returns
Requested CAPTURE task.

◆ nrfy_rtc_cc_get()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_cc_get ( NRF_RTC_Type const *  p_reg,
uint32_t  ch 
)
See also
nrf_rtc_cc_get 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.

◆ nrfy_rtc_cc_set()

NRFY_STATIC_INLINE void nrfy_rtc_cc_set ( NRF_RTC_Type *  p_reg,
uint32_t  ch,
uint32_t  cc_val 
)
See also
nrf_rtc_cc_set 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.

◆ nrfy_rtc_compare_event_get()

NRFY_STATIC_INLINE nrf_rtc_event_t nrfy_rtc_compare_event_get ( uint8_t  index)
See also
nrf_rtc_compare_event_get Function for getting the COMPARE event associated with the specified compare channel.
Parameters
[in]indexCompare channel index.
Returns
Requested COMPARE event.

◆ nrfy_rtc_counter_get()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_counter_get ( NRF_RTC_Type const *  p_reg)
See also
nrf_rtc_counter_get Function for returning a counter value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Counter value.

◆ nrfy_rtc_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_event_address_get ( NRF_RTC_Type const *  p_reg,
nrf_rtc_event_t  event 
)
See also
nrf_rtc_event_address_get 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.

◆ nrfy_rtc_event_check()

NRFY_STATIC_INLINE bool nrfy_rtc_event_check ( NRF_RTC_Type *  p_reg,
nrf_rtc_event_t  event 
)
See also
nrf_rtc_event_check 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.

◆ nrfy_rtc_event_clear()

NRFY_STATIC_INLINE void nrfy_rtc_event_clear ( NRF_RTC_Type *  p_reg,
nrf_rtc_event_t  event 
)
See also
nrf_rtc_event_clear Function for clearing an event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be cleared.

◆ nrfy_rtc_event_disable()

NRFY_STATIC_INLINE void nrfy_rtc_event_disable ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_rtc_event_disable 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.

◆ nrfy_rtc_event_enable()

NRFY_STATIC_INLINE void nrfy_rtc_event_enable ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_rtc_event_enable Function for enabling events.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of event flags to be enabled.

◆ nrfy_rtc_event_int_clear_enable()

NRFY_STATIC_INLINE void nrfy_rtc_event_int_clear_enable ( NRF_RTC_Type *  p_reg,
nrf_rtc_event_t  event,
bool  enable 
)

Function for enabling the RTC event and optionally associated interrupt.

Note
Event is implicitly cleared before enabling the associated interrupt.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be enabled.
[in]enableTrue if associated interrupt is to be enabled, false otherwise.

◆ nrfy_rtc_event_int_disable()

NRFY_STATIC_INLINE void nrfy_rtc_event_int_disable ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the RTC events and corresponding interrupts.

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

◆ nrfy_rtc_events_process()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_events_process ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)

Function for processing the specified RTC events.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
Returns
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().

◆ nrfy_rtc_int_disable()

NRFY_STATIC_INLINE void nrfy_rtc_int_disable ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_rtc_int_disable 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.

◆ nrfy_rtc_int_enable()

NRFY_STATIC_INLINE void nrfy_rtc_int_enable ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_rtc_int_enable 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.

◆ nrfy_rtc_int_enable_check()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_int_enable_check ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_rtc_int_enable_check 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.

◆ nrfy_rtc_int_init()

NRFY_STATIC_INLINE void nrfy_rtc_int_init ( NRF_RTC_Type *  p_reg,
uint32_t  mask,
uint8_t  irq_priority,
bool  enable 
)

Function for initializing the specified RTC interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if interrupts are to be enabled, false otherwise.

◆ nrfy_rtc_int_uninit()

NRFY_STATIC_INLINE void nrfy_rtc_int_uninit ( NRF_RTC_Type *  p_reg)

Function for uninitializing the RTC interrupts.

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

◆ nrfy_rtc_periph_configure()

NRFY_STATIC_INLINE void nrfy_rtc_periph_configure ( NRF_RTC_Type *  p_reg,
nrfy_rtc_config_t const *  p_config 
)

Function for configuring the RTC.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the peripheral configuration structure.

◆ nrfy_rtc_prescaler_get()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_prescaler_get ( NRF_RTC_Type const *  p_reg)
See also
nrf_rtc_prescaler_get Function for getting a prescaler value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Prescaler value.

◆ nrfy_rtc_prescaler_set()

NRFY_STATIC_INLINE void nrfy_rtc_prescaler_set ( NRF_RTC_Type *  p_reg,
uint32_t  val 
)
See also
nrf_rtc_prescaler_set 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.

◆ nrfy_rtc_publish_clear()

NRFY_STATIC_INLINE void nrfy_rtc_publish_clear ( NRF_RTC_Type *  p_reg,
nrf_rtc_event_t  event 
)
See also
nrf_rtc_publish_clear 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.

◆ nrfy_rtc_publish_set()

NRFY_STATIC_INLINE void nrfy_rtc_publish_set ( NRF_RTC_Type *  p_reg,
nrf_rtc_event_t  event,
uint8_t  channel 
)
See also
nrf_rtc_publish_set 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.

◆ nrfy_rtc_stop()

NRFY_STATIC_INLINE void nrfy_rtc_stop ( NRF_RTC_Type *  p_reg,
uint32_t  mask 
)

Function for stopping the RTC.

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

◆ nrfy_rtc_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_rtc_subscribe_clear ( NRF_RTC_Type *  p_reg,
nrf_rtc_task_t  task 
)
See also
nrf_rtc_subscribe_clear 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.

◆ nrfy_rtc_subscribe_set()

NRFY_STATIC_INLINE void nrfy_rtc_subscribe_set ( NRF_RTC_Type *  p_reg,
nrf_rtc_task_t  task,
uint8_t  channel 
)
See also
nrf_rtc_subscribe_set 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.

◆ nrfy_rtc_task_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_rtc_task_address_get ( NRF_RTC_Type const *  p_reg,
nrf_rtc_task_t  task 
)
See also
nrf_rtc_task_address_get 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.

◆ nrfy_rtc_task_trigger()

NRFY_STATIC_INLINE void nrfy_rtc_task_trigger ( NRF_RTC_Type *  p_reg,
nrf_rtc_task_t  task 
)
See also
nrf_rtc_task_trigger Function for starting a task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRequested task.

Documentation feedback | Developer Zone | Subscribe | Updated