|
SmartSnippets DA1459x SDK
|
AES/Hash Engine. More...
Files | |
| file | hw_aes_hash.h |
| Definition of API for the AES/HASH Engine Low Level Driver. | |
Typedefs | |
| typedef void(* | hw_aes_hash_cb) (uint32_t status) |
| AES/Hash callback. More... | |
Enumerations | |
| enum | HW_AES_HASH_STATUS |
| AES/HASH engine status. | |
| enum | HW_AES_HASH_IRQ_MASK |
| Masks of AES/HASH Engine Interrupt sources. More... | |
Functions | |
| __STATIC_INLINE void | hw_aes_hash_set_input_data_mode (bool wait_more_input) |
| Set AES/HASH engine input data mode. More... | |
| __STATIC_INLINE bool | hw_aes_hash_get_input_data_mode (void) |
| Get AES/HASH engine input data mode. More... | |
| __STATIC_INLINE void | hw_aes_hash_set_input_data_len (uint32_t len) |
| Set the input data length. More... | |
| __STATIC_INLINE uint32_t | hw_aes_hash_get_input_data_len (void) |
| Get the input data length. More... | |
| __STATIC_INLINE bool | hw_aes_hash_waiting_for_input_data (void) |
| Check whether the AES/Hash Engine is waiting for more input data or not. More... | |
| void | hw_aes_hash_set_input_data_addr (uint32_t inp_data_addr) |
| Set the address of the Input Data. More... | |
| void | hw_aes_hash_set_output_data_addr (uint32_t out_data_addr) |
| Set the address of the Output Data. More... | |
| HW_AES_HASH_STATUS | hw_aes_hash_get_status (void) |
| Get the status of the AES/HASH engine. More... | |
| __STATIC_INLINE void | hw_aes_hash_enable_clock (void) |
| Enable AES/HASH engine clock. More... | |
| __STATIC_INLINE void | hw_aes_hash_disable_clock (void) |
| Disable AES/HASH engine clock. More... | |
| __STATIC_INLINE bool | hw_aes_hash_clock_is_enabled (void) |
| Check whether the AES/HASH engine clock is enabled or not. More... | |
| __ALWAYS_RETAINED_CODE bool | hw_aes_hash_is_active (void) |
| AES/Hash is active. More... | |
| __STATIC_INLINE void | hw_aes_hash_start (void) |
| Start AES/HASH engine operation. More... | |
| void | hw_aes_hash_deinit (void) |
| De-initialize AES/HASH crypto engine. More... | |
| void | hw_aes_hash_interrupt_enable (hw_aes_hash_cb cb) |
| Enable interrupt for AES/HASH crypto engine. More... | |
| void | hw_aes_hash_interrupt_disable (void) |
| Disable interrupt for AES/HASH crypto engine. More... | |
AES/Hash Engine.
| typedef void(* hw_aes_hash_cb) (uint32_t status) |
AES/Hash callback.
This function is called by the AES/Hash driver when the interrupt is fired.
| enum HW_AES_HASH_IRQ_MASK |
Masks of AES/HASH Engine Interrupt sources.
Use these enumerator values to detect which interrupt source triggered the Crypto_Handler by masking the status variable of the IRQ callback with them, as indicated by the next example:
| __STATIC_INLINE bool hw_aes_hash_clock_is_enabled | ( | void | ) |
Check whether the AES/HASH engine clock is enabled or not.
| void hw_aes_hash_deinit | ( | void | ) |
De-initialize AES/HASH crypto engine.
This function disables the AES/HASH engine interrupt, clears any pending interrupt request and disables the AES/HASH engine clock.
| __STATIC_INLINE void hw_aes_hash_disable_clock | ( | void | ) |
Disable AES/HASH engine clock.
| __STATIC_INLINE void hw_aes_hash_enable_clock | ( | void | ) |
Enable AES/HASH engine clock.
| __STATIC_INLINE uint32_t hw_aes_hash_get_input_data_len | ( | void | ) |
Get the input data length.
| __STATIC_INLINE bool hw_aes_hash_get_input_data_mode | ( | void | ) |
Get AES/HASH engine input data mode.
| HW_AES_HASH_STATUS hw_aes_hash_get_status | ( | void | ) |
Get the status of the AES/HASH engine.
| void hw_aes_hash_interrupt_disable | ( | void | ) |
Disable interrupt for AES/HASH crypto engine.
This function disables the crypto engine interrupt in the NVIC controller, disables the AES/HASH engine interrupt source and clears any registered callback function.
| void hw_aes_hash_interrupt_enable | ( | hw_aes_hash_cb | cb | ) |
Enable interrupt for AES/HASH crypto engine.
This function enables the crypto engine interrupt in the NVIC controller, enables the AES/HASH engine interrupt source, and registers a callback function to serve the pending interrupt requests.
| [in] | cb | Callback to serve the crypto engine's interrupt requests. |
| __ALWAYS_RETAINED_CODE bool hw_aes_hash_is_active | ( | void | ) |
AES/Hash is active.
Check whether the AES/Hash engine is active or not.
Usually this function is called inside a loop in order to poll whether an AES operation has been completed or not. Consequently, if it resides in the XiP flash memory and the data to be processed by the AES crypto engine reside there as well, the continuous call of the function through the AHB-CPUC bus might block the engine from fetching the required data via AHB-DMA bus, actually if the instruction cache is disabled, leading the AES operation to get blocked forever. To prevent this situation, this function is always retained in SysRAM.
| void hw_aes_hash_set_input_data_addr | ( | uint32_t | inp_data_addr | ) |
Set the address of the Input Data.
| [in] | inp_data_addr | Address of the Input Data |
| __STATIC_INLINE void hw_aes_hash_set_input_data_len | ( | uint32_t | len | ) |
Set the input data length.
| [in] | len | Input data length |
| __STATIC_INLINE void hw_aes_hash_set_input_data_mode | ( | bool | wait_more_input | ) |
Set AES/HASH engine input data mode.
| [in] | wait_more_input | If true, the AES/HASH engine expects more input data to be received, thus when the current input data has been processed, it waits for incoming data by setting the corresponding flag (CRYPTO_WAIT_FOR_IN). If false, the current input data is considered as the last one and the output data is written to the memory. |
| void hw_aes_hash_set_output_data_addr | ( | uint32_t | out_data_addr | ) |
Set the address of the Output Data.
| [in] | out_data_addr | The output data address. |
| __STATIC_INLINE void hw_aes_hash_start | ( | void | ) |
Start AES/HASH engine operation.
Start an AES/HASH operation depending on the configuration of the AES/HASH Engine.
| __STATIC_INLINE bool hw_aes_hash_waiting_for_input_data | ( | void | ) |
Check whether the AES/Hash Engine is waiting for more input data or not.
1.8.16