Hardware access layer for managing the Accelerated Address Resolver (AAR) peripheral. More...
Enumerations | |
enum | nrf_aar_event_t { NRF_AAR_EVENT_END = offsetof(NRF_AAR_Type, EVENTS_END) , NRF_AAR_EVENT_RESOLVED = offsetof(NRF_AAR_Type, EVENTS_RESOLVED) , NRF_AAR_EVENT_NOTRESOLVED = offsetof(NRF_AAR_Type, EVENTS_NOTRESOLVED) } |
AAR events. More... | |
enum | nrf_aar_int_mask_t { NRF_AAR_INT_END_MASK = AAR_INTENSET_END_Msk , NRF_AAR_INT_RESOLVED_MASK = AAR_INTENSET_RESOLVED_Msk , NRF_AAR_INT_NOTRESOLVED_MASK = AAR_INTENSET_NOTRESOLVED_Msk } |
AAR interrupts. More... | |
enum | nrf_aar_task_t { NRF_AAR_TASK_START = offsetof(NRF_AAR_Type, TASKS_START) , NRF_AAR_TASK_STOP = offsetof(NRF_AAR_Type, TASKS_STOP) } |
AAR tasks. More... | |
Functions | |
NRF_STATIC_INLINE bool | nrf_aar_event_check (NRF_AAR_Type const *p_reg, nrf_aar_event_t event) |
Function for retrieving the state of the AAR event. | |
NRF_STATIC_INLINE void | nrf_aar_event_clear (NRF_AAR_Type *p_reg, nrf_aar_event_t event) |
Function for clearing the specified AAR event. | |
NRF_STATIC_INLINE uint32_t | nrf_aar_event_address_get (NRF_AAR_Type const *p_reg, nrf_aar_event_t event) |
Function for getting the address of the specified AAR event register. | |
NRF_STATIC_INLINE void | nrf_aar_int_enable (NRF_AAR_Type *p_reg, uint32_t mask) |
Function for enabling the specified interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_aar_int_enable_check (NRF_AAR_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE void | nrf_aar_int_disable (NRF_AAR_Type *p_reg, uint32_t mask) |
Function for disabling the specified interrupts. | |
NRF_STATIC_INLINE void | nrf_aar_task_trigger (NRF_AAR_Type *p_reg, nrf_aar_task_t task) |
Function for starting an AAR task. | |
NRF_STATIC_INLINE uint32_t | nrf_aar_task_address_get (NRF_AAR_Type const *p_reg, nrf_aar_task_t task) |
Function for getting the address of a specific AAR task register. | |
NRF_STATIC_INLINE void | nrf_aar_enable (NRF_AAR_Type *p_reg) |
Function for enabling AAR. | |
NRF_STATIC_INLINE void | nrf_aar_disable (NRF_AAR_Type *p_reg) |
Function for disabling AAR. | |
NRF_STATIC_INLINE void | nrf_aar_irk_pointer_set (NRF_AAR_Type *p_reg, uint8_t const *irk_ptr) |
Function for setting the pointer to the Identity Resolving Keys (IRK) data structure. | |
NRF_STATIC_INLINE uint8_t const * | nrf_aar_irk_pointer_get (NRF_AAR_Type const *p_reg) |
Function for getting the pointer to the Identity Resolving Keys data structure. | |
NRF_STATIC_INLINE void | nrf_aar_irk_number_set (NRF_AAR_Type *p_reg, uint8_t irk_num) |
Function for setting the number of keys available in the Identity Resolving Keys data structure. | |
NRF_STATIC_INLINE uint8_t | nrf_aar_irk_number_get (NRF_AAR_Type const *p_reg) |
Function for getting the number of keys available in the Identity Resolving Keys data structure. | |
NRF_STATIC_INLINE void | nrf_aar_addr_pointer_set (NRF_AAR_Type *p_reg, uint8_t const *addr_ptr) |
Function for setting the pointer to the resolvable address. | |
NRF_STATIC_INLINE uint8_t const * | nrf_aar_addr_pointer_get (NRF_AAR_Type const *p_reg) |
Function for getting the pointer to the resolvable address. | |
NRF_STATIC_INLINE void | nrf_aar_scratch_pointer_set (NRF_AAR_Type *p_reg, uint8_t *scratch_ptr) |
Function for setting the pointer to the scratch data area. | |
NRF_STATIC_INLINE uint8_t * | nrf_aar_scratch_pointer_get (NRF_AAR_Type const *p_reg) |
Function for getting the pointer to the scratch data area. | |
NRF_STATIC_INLINE uint8_t | nrf_aar_resolution_status_get (NRF_AAR_Type const *p_reg) |
Function for getting the index of the Identity Resolving Key that was used the last time an address was resolved. | |
NRF_STATIC_INLINE void | nrf_aar_subscribe_set (NRF_AAR_Type *p_reg, nrf_aar_task_t task, uint8_t channel) |
Function for setting the subscribe configuration for a given AAR task. | |
NRF_STATIC_INLINE void | nrf_aar_subscribe_clear (NRF_AAR_Type *p_reg, nrf_aar_task_t task) |
Function for clearing the subscribe configuration for a given AAR task. | |
NRF_STATIC_INLINE void | nrf_aar_publish_set (NRF_AAR_Type *p_reg, nrf_aar_event_t event, uint8_t channel) |
Function for setting the publish configuration for a given AAR event. | |
NRF_STATIC_INLINE void | nrf_aar_publish_clear (NRF_AAR_Type *p_reg, nrf_aar_event_t event) |
Function for clearing the publish configuration for a given AAR event. | |
Hardware access layer for managing the Accelerated Address Resolver (AAR) peripheral.
enum nrf_aar_event_t |
enum nrf_aar_int_mask_t |
enum nrf_aar_task_t |
NRF_STATIC_INLINE uint8_t const * nrf_aar_addr_pointer_get | ( | NRF_AAR_Type const * | p_reg | ) |
Function for getting the pointer to the resolvable address.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_aar_addr_pointer_set | ( | NRF_AAR_Type * | p_reg, |
uint8_t const * | addr_ptr | ||
) |
Function for setting the pointer to the resolvable address.
The resolvable address must consist of 6 bytes.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | addr_ptr | Pointer to the address to resolve using the available IRK keys. Must point to the Data RAM region. |
NRF_STATIC_INLINE void nrf_aar_disable | ( | NRF_AAR_Type * | p_reg | ) |
Function for disabling AAR.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_aar_enable | ( | NRF_AAR_Type * | p_reg | ) |
Function for enabling AAR.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_aar_event_address_get | ( | NRF_AAR_Type const * | p_reg, |
nrf_aar_event_t | event | ||
) |
Function for getting the address of the specified AAR event register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to get the address of. |
NRF_STATIC_INLINE bool nrf_aar_event_check | ( | NRF_AAR_Type const * | p_reg, |
nrf_aar_event_t | event | ||
) |
Function for retrieving the state of the AAR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be checked. |
true | Event is set. |
false | Event is not set. |
NRF_STATIC_INLINE void nrf_aar_event_clear | ( | NRF_AAR_Type * | p_reg, |
nrf_aar_event_t | event | ||
) |
Function for clearing the specified AAR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be cleared. |
NRF_STATIC_INLINE void nrf_aar_int_disable | ( | NRF_AAR_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling the specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_aar_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_aar_int_enable | ( | NRF_AAR_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling the specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_aar_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_aar_int_enable_check | ( | NRF_AAR_Type const * | p_reg, |
uint32_t | mask | ||
) |
Function for checking if the specified interrupts are enabled.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be checked. Use nrf_aar_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint8_t nrf_aar_irk_number_get | ( | NRF_AAR_Type const * | p_reg | ) |
Function for getting the number of keys available in the Identity Resolving Keys data structure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_aar_irk_number_set | ( | NRF_AAR_Type * | p_reg, |
uint8_t | irk_num | ||
) |
Function for setting the number of keys available in the Identity Resolving Keys data structure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | irk_num | Number of keys available in the IRK data structure. Maximum is 16. Must correspond to the size of the provided IRK data structure. |
NRF_STATIC_INLINE uint8_t const * nrf_aar_irk_pointer_get | ( | NRF_AAR_Type const * | p_reg | ) |
Function for getting the pointer to the Identity Resolving Keys data structure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_aar_irk_pointer_set | ( | NRF_AAR_Type * | p_reg, |
uint8_t const * | irk_ptr | ||
) |
Function for setting the pointer to the Identity Resolving Keys (IRK) data structure.
The size of the provided data structure must correspond to the number of keys available. Each key occupies 16 bytes.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | irk_ptr | Pointer to the IRK data structure. Must point to the Data RAM region. |
NRF_STATIC_INLINE void nrf_aar_publish_clear | ( | NRF_AAR_Type * | p_reg, |
nrf_aar_event_t | event | ||
) |
Function for clearing the publish configuration for a given AAR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_aar_publish_set | ( | NRF_AAR_Type * | p_reg, |
nrf_aar_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the publish configuration for a given AAR event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event for which to set the configuration. |
[in] | channel | Channel through which to publish the event. |
NRF_STATIC_INLINE uint8_t nrf_aar_resolution_status_get | ( | NRF_AAR_Type const * | p_reg | ) |
Function for getting the index of the Identity Resolving Key that was used the last time an address was resolved.
This function can be used to get the IRK index that matched the resolvable address, provided that NRF_AAR_EVENT_RESOLVED occured. Otherwise, it will return the index of the last IRK stored in the IRK data structure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint8_t * nrf_aar_scratch_pointer_get | ( | NRF_AAR_Type const * | p_reg | ) |
Function for getting the pointer to the scratch data area.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_aar_scratch_pointer_set | ( | NRF_AAR_Type * | p_reg, |
uint8_t * | scratch_ptr | ||
) |
Function for setting the pointer to the scratch data area.
The scratch data area is used for temporary storage during the address resolution procedure. A space of minimum 3 bytes must be reserved for the scratch data area.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | scratch_ptr | Pointer to the scratch data area. Must point to the Data RAM region. |
NRF_STATIC_INLINE void nrf_aar_subscribe_clear | ( | NRF_AAR_Type * | p_reg, |
nrf_aar_task_t | task | ||
) |
Function for clearing the subscribe configuration for a given AAR task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to clear the configuration. |
NRF_STATIC_INLINE void nrf_aar_subscribe_set | ( | NRF_AAR_Type * | p_reg, |
nrf_aar_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the subscribe configuration for a given AAR task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task for which to set the configuration. |
[in] | channel | Channel through which to subscribe events. |
NRF_STATIC_INLINE uint32_t nrf_aar_task_address_get | ( | NRF_AAR_Type const * | p_reg, |
nrf_aar_task_t | task | ||
) |
Function for getting the address of a specific AAR task register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Requested AAR task. |
NRF_STATIC_INLINE void nrf_aar_task_trigger | ( | NRF_AAR_Type * | p_reg, |
nrf_aar_task_t | task | ||
) |
Function for starting an AAR task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be activated. |