Hardware access layer for managing the AES CCM peripheral. More...
Data Structures | |
struct | nrf_ccm_config_t |
CCM configuration. More... | |
Enumerations | |
enum | nrf_ccm_task_t { NRF_CCM_TASK_KSGEN = offsetof(NRF_CCM_Type, TASKS_KSGEN), NRF_CCM_TASK_CRYPT = offsetof(NRF_CCM_Type, TASKS_CRYPT), NRF_CCM_TASK_STOP = offsetof(NRF_CCM_Type, TASKS_STOP), NRF_CCM_TASK_RATEOVERRIDE = offsetof(NRF_CCM_Type, TASKS_RATEOVERRIDE) } |
CCM tasks. More... | |
enum | nrf_ccm_event_t { NRF_CCM_EVENT_ENDKSGEN = offsetof(NRF_CCM_Type, EVENTS_ENDKSGEN), NRF_CCM_EVENT_ENDCRYPT = offsetof(NRF_CCM_Type, EVENTS_ENDCRYPT), NRF_CCM_EVENT_ERROR = offsetof(NRF_CCM_Type, EVENTS_ERROR) } |
CCM events. More... | |
enum | nrf_ccm_int_mask_t { NRF_CCM_INT_ENDKSGEN_MASK = CCM_INTENSET_ENDKSGEN_Msk, NRF_CCM_INT_ENDCRYPT_MASK = CCM_INTENSET_ENDCRYPT_Msk, NRF_CCM_INT_ERROR_MASK = CCM_INTENSET_ERROR_Msk } |
CCM interrupts. More... | |
enum | nrf_ccm_mode_t { NRF_CCM_MODE_ENCRYPTION = CCM_MODE_MODE_Encryption, NRF_CCM_MODE_DECRYPTION = CCM_MODE_MODE_Decryption } |
CCM modes of operation. More... | |
enum | nrf_ccm_datarate_t { NRF_CCM_DATARATE_1M = CCM_MODE_DATARATE_1Mbit, NRF_CCM_DATARATE_2M = CCM_MODE_DATARATE_2Mbit, NRF_CCM_DATARATE_125K = CCM_MODE_DATARATE_125Kbps, NRF_CCM_DATARATE_500K = CCM_MODE_DATARATE_500Kbps } |
CCM data rates. More... | |
enum | nrf_ccm_length_t { NRF_CCM_LENGTH_DEFAULT = CCM_MODE_LENGTH_Default, NRF_CCM_LENGTH_EXTENDED = CCM_MODE_LENGTH_Extended } |
CCM packet length options. More... | |
Functions | |
__STATIC_INLINE void | nrf_ccm_task_trigger (NRF_CCM_Type *p_reg, nrf_ccm_task_t task) |
Function for activating a specific CCM task. More... | |
__STATIC_INLINE uint32_t | nrf_ccm_task_address_get (NRF_CCM_Type const *p_reg, nrf_ccm_task_t task) |
Function for getting the address of a specific CCM task register. More... | |
__STATIC_INLINE void | nrf_ccm_event_clear (NRF_CCM_Type *p_reg, nrf_ccm_event_t event) |
Function for clearing a specific CCM event. More... | |
__STATIC_INLINE bool | nrf_ccm_event_check (NRF_CCM_Type const *p_reg, nrf_ccm_event_t event) |
Function for checking the state of a specific CCM event. More... | |
__STATIC_INLINE uint32_t | nrf_ccm_event_address_get (NRF_CCM_Type const *p_reg, nrf_ccm_event_t event) |
Function for getting the address of a specific CCM event register. More... | |
__STATIC_INLINE void | nrf_ccm_int_enable (NRF_CCM_Type *p_reg, uint32_t mask) |
Function for enabling specified interrupts. More... | |
__STATIC_INLINE void | nrf_ccm_int_disable (NRF_CCM_Type *p_reg, uint32_t mask) |
Function for disabling specified interrupts. More... | |
__STATIC_INLINE bool | nrf_ccm_int_enable_check (NRF_CCM_Type const *p_reg, nrf_ccm_int_mask_t ccm_int) |
Function for retrieving the state of a given interrupt. More... | |
__STATIC_INLINE void | nrf_ccm_enable (NRF_CCM_Type *p_reg) |
Function for enabling the CCM peripheral. More... | |
__STATIC_INLINE void | nrf_ccm_disable (NRF_CCM_Type *p_reg) |
Function for disabling the CCM peripheral. More... | |
__STATIC_INLINE void | nrf_ccm_configure (NRF_CCM_Type *p_reg, nrf_ccm_config_t const *p_config) |
Function for setting the CCM peripheral configuration. More... | |
__STATIC_INLINE void | nrf_ccm_maxpacketsize_set (NRF_CCM_Type *p_reg, uint8_t size) |
Function for setting the length of key-stream generated when the packet length is configured as extended. More... | |
__STATIC_INLINE bool | nrf_ccm_micstatus_get (NRF_CCM_Type const *p_reg) |
Function for getting the MIC check result. More... | |
__STATIC_INLINE void | nrf_ccm_cnfptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_data) |
Function for setting the pointer to the data structure holding the AES key and the CCM NONCE vector. More... | |
__STATIC_INLINE uint32_t * | nrf_ccm_cnfptr_get (NRF_CCM_Type const *p_reg) |
Function for getting the pointer to the data structure holding the AES key and the CCM NONCE vector. More... | |
__STATIC_INLINE void | nrf_ccm_inptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_data) |
Function for setting the input data pointer. More... | |
__STATIC_INLINE uint32_t * | nrf_ccm_inptr_get (NRF_CCM_Type const *p_reg) |
Function for getting the input data pointer. More... | |
__STATIC_INLINE void | nrf_ccm_outptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_data) |
Function for setting the output data pointer. More... | |
__STATIC_INLINE uint32_t * | nrf_ccm_outptr_get (NRF_CCM_Type const *p_reg) |
Function for getting the output data pointer. More... | |
__STATIC_INLINE void | nrf_ccm_scratchptr_set (NRF_CCM_Type *p_reg, uint32_t const *p_area) |
Function for setting the pointer to the scratch area used for temporary storage. More... | |
__STATIC_INLINE uint32_t * | nrf_ccm_stratchptr_get (NRF_CCM_Type const *p_reg) |
Function for getting the pointer to the scratch area. More... | |
__STATIC_INLINE void | nrf_ccm_datarate_override_set (NRF_CCM_Type *p_reg, nrf_ccm_datarate_t datarate) |
Function for setting the data rate override value. More... | |
Hardware access layer for managing the AES CCM peripheral.
enum nrf_ccm_datarate_t |
enum nrf_ccm_event_t |
enum nrf_ccm_int_mask_t |
enum nrf_ccm_length_t |
enum nrf_ccm_mode_t |
enum nrf_ccm_task_t |
__STATIC_INLINE uint32_t* nrf_ccm_cnfptr_get | ( | NRF_CCM_Type const * | p_reg | ) |
Function for getting the pointer to the data structure holding the AES key and the CCM NONCE vector.
[in] | p_reg | Pointer to the peripheral registers structure. |
__STATIC_INLINE void nrf_ccm_cnfptr_set | ( | NRF_CCM_Type * | p_reg, |
uint32_t const * | p_data | ||
) |
Function for setting the pointer to the data structure holding the AES key and the CCM NONCE vector.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | p_data | Pointer to the data structure. |
__STATIC_INLINE void nrf_ccm_configure | ( | NRF_CCM_Type * | p_reg, |
nrf_ccm_config_t const * | p_config | ||
) |
Function for setting the CCM peripheral configuration.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | p_config | Pointer to the structure with configuration to be set. |
__STATIC_INLINE void nrf_ccm_datarate_override_set | ( | NRF_CCM_Type * | p_reg, |
nrf_ccm_datarate_t | datarate | ||
) |
Function for setting the data rate override value.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | datarate | Override value to be applied when the RATEOVERRIDE task is triggered. |
__STATIC_INLINE void nrf_ccm_disable | ( | NRF_CCM_Type * | p_reg | ) |
Function for disabling the CCM peripheral.
[in] | p_reg | Pointer to the peripheral registers structure. |
__STATIC_INLINE void nrf_ccm_enable | ( | NRF_CCM_Type * | p_reg | ) |
Function for enabling the CCM peripheral.
[in] | p_reg | Pointer to the peripheral registers structure. |
__STATIC_INLINE uint32_t nrf_ccm_event_address_get | ( | NRF_CCM_Type const * | p_reg, |
nrf_ccm_event_t | event | ||
) |
Function for getting the address of a specific CCM event register.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | event | Requested event. |
__STATIC_INLINE bool nrf_ccm_event_check | ( | NRF_CCM_Type const * | p_reg, |
nrf_ccm_event_t | event | ||
) |
Function for checking the state of a specific CCM event.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | event | Event to check. |
true | If the event is set. |
false | If the event is not set. |
__STATIC_INLINE void nrf_ccm_event_clear | ( | NRF_CCM_Type * | p_reg, |
nrf_ccm_event_t | event | ||
) |
Function for clearing a specific CCM event.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | event | Event to clear. |
__STATIC_INLINE uint32_t* nrf_ccm_inptr_get | ( | NRF_CCM_Type const * | p_reg | ) |
Function for getting the input data pointer.
[in] | p_reg | Pointer to the peripheral registers structure. |
__STATIC_INLINE void nrf_ccm_inptr_set | ( | NRF_CCM_Type * | p_reg, |
uint32_t const * | p_data | ||
) |
Function for setting the input data pointer.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | p_data | Input data pointer. |
__STATIC_INLINE void nrf_ccm_int_disable | ( | NRF_CCM_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling specified interrupts.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | mask | Interrupts to disable. |
__STATIC_INLINE void nrf_ccm_int_enable | ( | NRF_CCM_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling specified interrupts.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | mask | Interrupts to enable. |
__STATIC_INLINE bool nrf_ccm_int_enable_check | ( | NRF_CCM_Type const * | p_reg, |
nrf_ccm_int_mask_t | ccm_int | ||
) |
Function for retrieving the state of a given interrupt.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | ccm_int | Interrupt to check. |
true | If the interrupt is enabled. |
false | If the interrupt is not enabled. |
__STATIC_INLINE void nrf_ccm_maxpacketsize_set | ( | NRF_CCM_Type * | p_reg, |
uint8_t | size | ||
) |
Function for setting the length of key-stream generated when the packet length is configured as extended.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | size | Maximum length of the key-stream. |
__STATIC_INLINE bool nrf_ccm_micstatus_get | ( | NRF_CCM_Type const * | p_reg | ) |
Function for getting the MIC check result.
[in] | p_reg | Pointer to the peripheral registers structure. |
true | If the MIC check passed. |
false | If the MIC check failed. |
__STATIC_INLINE uint32_t* nrf_ccm_outptr_get | ( | NRF_CCM_Type const * | p_reg | ) |
Function for getting the output data pointer.
[in] | p_reg | Pointer to the peripheral registers structure. |
__STATIC_INLINE void nrf_ccm_outptr_set | ( | NRF_CCM_Type * | p_reg, |
uint32_t const * | p_data | ||
) |
Function for setting the output data pointer.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | p_data | Output data pointer. |
__STATIC_INLINE void nrf_ccm_scratchptr_set | ( | NRF_CCM_Type * | p_reg, |
uint32_t const * | p_area | ||
) |
Function for setting the pointer to the scratch area used for temporary storage.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | p_area | Pointer to the scratch area. |
__STATIC_INLINE uint32_t* nrf_ccm_stratchptr_get | ( | NRF_CCM_Type const * | p_reg | ) |
Function for getting the pointer to the scratch area.
[in] | p_reg | Pointer to the peripheral registers structure. |
__STATIC_INLINE uint32_t nrf_ccm_task_address_get | ( | NRF_CCM_Type const * | p_reg, |
nrf_ccm_task_t | task | ||
) |
Function for getting the address of a specific CCM task register.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | task | Requested task. |
__STATIC_INLINE void nrf_ccm_task_trigger | ( | NRF_CCM_Type * | p_reg, |
nrf_ccm_task_t | task | ||
) |
Function for activating a specific CCM task.
[in] | p_reg | Pointer to the peripheral registers structure. |
[in] | task | Task to activate. |