Hardware access layer (HAL) for managing the Advanced Encryption Standard (AES) Electronic Codebook (ECB) peripheral. More...
Enumerations | |
enum | nrf_ecb_task_t { NRF_ECB_TASK_STARTECB = offsetof(NRF_ECB_Type, TASKS_STARTECB) , NRF_ECB_TASK_START = offsetof(NRF_ECB_Type, TASKS_START) , NRF_ECB_TASK_STOPECB = offsetof(NRF_ECB_Type, TASKS_STOPECB) , NRF_ECB_TASK_STOP = offsetof(NRF_ECB_Type, TASKS_STOP) } |
ECB tasks. More... | |
enum | nrf_ecb_event_t { NRF_ECB_EVENT_ENDECB = offsetof(NRF_ECB_Type, EVENTS_ENDECB) , NRF_ECB_EVENT_ERRORECB = offsetof(NRF_ECB_Type, EVENTS_ERRORECB) , NRF_ECB_EVENT_END = offsetof(NRF_ECB_Type, EVENTS_END) , NRF_ECB_EVENT_ERROR = offsetof(NRF_ECB_Type, EVENTS_ERROR) } |
ECB events. More... | |
enum | nrf_ecb_int_mask_t { NRF_ECB_INT_ENDECB_MASK = ECB_INTENSET_ENDECB_Msk , NRF_ECB_INT_ERRORECB_MASK = ECB_INTENSET_ERRORECB_Msk , NRF_ECB_INT_END_MASK = ECB_INTENSET_END_Msk , NRF_ECB_INT_ERROR_MASK = ECB_INTENSET_ERROR_Msk } |
ECB interrupts. More... | |
Functions | |
NRF_STATIC_INLINE void | nrf_ecb_task_trigger (NRF_ECB_Type *p_reg, nrf_ecb_task_t task) |
Function for activating the specified ECB task. | |
NRF_STATIC_INLINE uint32_t | nrf_ecb_task_address_get (NRF_ECB_Type const *p_reg, nrf_ecb_task_t task) |
Function for getting the address of the specified ECB task register. | |
NRF_STATIC_INLINE void | nrf_ecb_event_clear (NRF_ECB_Type *p_reg, nrf_ecb_event_t event) |
Function for clearing the specified ECB event. | |
NRF_STATIC_INLINE bool | nrf_ecb_event_check (NRF_ECB_Type const *p_reg, nrf_ecb_event_t event) |
Function for retrieving the state of the ECB event. | |
NRF_STATIC_INLINE uint32_t | nrf_ecb_event_address_get (NRF_ECB_Type const *p_reg, nrf_ecb_event_t event) |
Function for getting the address of the specified ECB event register. | |
NRF_STATIC_INLINE void | nrf_ecb_int_enable (NRF_ECB_Type *p_reg, uint32_t mask) |
Function for enabling the specified interrupts. | |
NRF_STATIC_INLINE void | nrf_ecb_int_disable (NRF_ECB_Type *p_reg, uint32_t mask) |
Function for disabling the specified interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_ecb_int_enable_check (NRF_ECB_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE void | nrf_ecb_data_pointer_set (NRF_ECB_Type *p_reg, void const *p_buffer) |
Function for setting the pointer to the ECB data buffer. | |
NRF_STATIC_INLINE void * | nrf_ecb_data_pointer_get (NRF_ECB_Type const *p_reg) |
Function for getting the pointer to the ECB data buffer. | |
NRF_STATIC_INLINE void | nrf_ecb_key_set (NRF_ECB_Type *p_reg, uint32_t const *p_key) |
Function for setting the AES key. | |
NRF_STATIC_INLINE void | nrf_ecb_in_ptr_set (NRF_ECB_Type *p_reg, nrf_vdma_job_t const *p_job) |
Function for setting the pointer to a job list containing unencrypted ECB data structure in Encryption mode or encrypted ECB data structure in Decryption mode. | |
NRF_STATIC_INLINE nrf_vdma_job_t * | nrf_ecb_in_ptr_get (NRF_ECB_Type const *p_reg) |
Function for getting the pointer to job list containing unencrypted ECB data structure in Encryption mode or encrypted ECB data structure in Decryption mode. | |
NRF_STATIC_INLINE uint32_t | nrf_ecb_in_amount_get (NRF_ECB_Type const *p_reg) |
Function for getting number of bytes read from the input data, not including the job list structure. | |
NRF_STATIC_INLINE void | nrf_ecb_out_ptr_set (NRF_ECB_Type *p_reg, nrf_vdma_job_t const *p_job) |
Function for setting the pointer to a job list containing encrypted ECB data structure in Encryption mode or decrypted ECB data structure in Decryption mode. | |
NRF_STATIC_INLINE nrf_vdma_job_t * | nrf_ecb_out_ptr_get (NRF_ECB_Type const *p_reg) |
Function for getting the pointer to a job list containing encrypted ECB data structure in Encryption mode or decrypted ECB data structure in Decryption mode. | |
NRF_STATIC_INLINE uint32_t | nrf_ecb_out_amount_get (NRF_ECB_Type const *p_reg) |
Function for getting number of bytes available in the output data, not including the job list structure. | |
NRF_STATIC_INLINE void | nrf_ecb_subscribe_set (NRF_ECB_Type *p_reg, nrf_ecb_task_t task, uint8_t channel) |
Function for setting the subscribe configuration for a given ECB task. | |
NRF_STATIC_INLINE void | nrf_ecb_subscribe_clear (NRF_ECB_Type *p_reg, nrf_ecb_task_t task) |
Function for clearing the subscribe configuration for a given ECB task. | |
NRF_STATIC_INLINE void | nrf_ecb_publish_set (NRF_ECB_Type *p_reg, nrf_ecb_event_t event, uint8_t channel) |
Function for setting the publish configuration for a given ECB event. | |
NRF_STATIC_INLINE void | nrf_ecb_publish_clear (NRF_ECB_Type *p_reg, nrf_ecb_event_t event) |
Function for clearing the publish configuration for a given ECB event. | |
Hardware access layer (HAL) for managing the Advanced Encryption Standard (AES) Electronic Codebook (ECB) peripheral.
enum nrf_ecb_event_t |
ECB events.
enum nrf_ecb_int_mask_t |
enum nrf_ecb_task_t |
NRF_STATIC_INLINE void * nrf_ecb_data_pointer_get | ( | NRF_ECB_Type const * | p_reg | ) |
Function for getting the pointer to the ECB data buffer.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_ecb_data_pointer_set | ( | NRF_ECB_Type * | p_reg, |
void const * | p_buffer | ||
) |
Function for setting the pointer to the ECB data buffer.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_buffer | Pointer to the ECB data buffer. |
NRF_STATIC_INLINE uint32_t nrf_ecb_event_address_get | ( | NRF_ECB_Type const * | p_reg, |
nrf_ecb_event_t | event | ||
) |
Function for getting the address of the specified ECB event register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Requested event. |
NRF_STATIC_INLINE bool nrf_ecb_event_check | ( | NRF_ECB_Type const * | p_reg, |
nrf_ecb_event_t | event | ||
) |
Function for retrieving the state of the ECB event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to be checked. |
true | The event has been generated. |
false | The event has not been generated. |
NRF_STATIC_INLINE void nrf_ecb_event_clear | ( | NRF_ECB_Type * | p_reg, |
nrf_ecb_event_t | event | ||
) |
Function for clearing the specified ECB event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to clear. |
NRF_STATIC_INLINE uint32_t nrf_ecb_in_amount_get | ( | NRF_ECB_Type const * | p_reg | ) |
Function for getting number of bytes read from the input data, not including the job list structure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE nrf_vdma_job_t * nrf_ecb_in_ptr_get | ( | NRF_ECB_Type const * | p_reg | ) |
Function for getting the pointer to job list containing unencrypted ECB data structure in Encryption mode or encrypted ECB data structure in Decryption mode.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_ecb_in_ptr_set | ( | NRF_ECB_Type * | p_reg, |
nrf_vdma_job_t const * | p_job | ||
) |
Function for setting the pointer to a job list containing unencrypted ECB data structure in Encryption mode or encrypted ECB data structure in Decryption mode.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_job | Pointer to a job list. |
NRF_STATIC_INLINE void nrf_ecb_int_disable | ( | NRF_ECB_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_ecb_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_ecb_int_enable | ( | NRF_ECB_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_ecb_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_ecb_int_enable_check | ( | NRF_ECB_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_ecb_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_ecb_key_set | ( | NRF_ECB_Type * | p_reg, |
uint32_t const * | p_key | ||
) |
Function for setting the AES key.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_key | Pointer to the AES 128-bit key value. The key shall be stored in big endian byte order. |
NRF_STATIC_INLINE uint32_t nrf_ecb_out_amount_get | ( | NRF_ECB_Type const * | p_reg | ) |
Function for getting number of bytes available in the output data, not including the job list structure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE nrf_vdma_job_t * nrf_ecb_out_ptr_get | ( | NRF_ECB_Type const * | p_reg | ) |
Function for getting the pointer to a job list containing encrypted ECB data structure in Encryption mode or decrypted ECB data structure in Decryption mode.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_ecb_out_ptr_set | ( | NRF_ECB_Type * | p_reg, |
nrf_vdma_job_t const * | p_job | ||
) |
Function for setting the pointer to a job list containing encrypted ECB data structure in Encryption mode or decrypted ECB data structure in Decryption mode.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | p_job | Pointer to a job list. |
NRF_STATIC_INLINE void nrf_ecb_publish_clear | ( | NRF_ECB_Type * | p_reg, |
nrf_ecb_event_t | event | ||
) |
Function for clearing the publish configuration for a given ECB 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_ecb_publish_set | ( | NRF_ECB_Type * | p_reg, |
nrf_ecb_event_t | event, | ||
uint8_t | channel | ||
) |
Function for setting the publish configuration for a given ECB 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 void nrf_ecb_subscribe_clear | ( | NRF_ECB_Type * | p_reg, |
nrf_ecb_task_t | task | ||
) |
Function for clearing the subscribe configuration for a given ECB 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_ecb_subscribe_set | ( | NRF_ECB_Type * | p_reg, |
nrf_ecb_task_t | task, | ||
uint8_t | channel | ||
) |
Function for setting the subscribe configuration for a given ECB 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_ecb_task_address_get | ( | NRF_ECB_Type const * | p_reg, |
nrf_ecb_task_t | task | ||
) |
Function for getting the address of the specified ECB task register.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Requested task. |
NRF_STATIC_INLINE void nrf_ecb_task_trigger | ( | NRF_ECB_Type * | p_reg, |
nrf_ecb_task_t | task | ||
) |
Function for activating the specified ECB task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be activated. |