Defines all functions of mcuxClEls_Common. More...
Defines all functions of mcuxClEls_Common.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_GetHwVersion | ( | mcuxClEls_HwVersion_t * | result | ) |
Determines the version of the underlying ELS hardware IP.
[out] | result | Pointer which will be filled with the ELS hardware version |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_GetHwState | ( | mcuxClEls_HwState_t * | result | ) |
Determines the current state of the ELS.
[out] | result | Pointer which will be filled with the ELS status information |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Enable_Async | ( | void | ) |
Enables the ELS.
Call mcuxClEls_WaitForOperation to complete the operation.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Reset_Async | ( | mcuxClEls_ResetOption_t | options | ) |
Perform a synchronous reset of the ELS.
This means that:
Call mcuxClEls_WaitForOperation to complete the operation.
[in] | options | A value indicating whether any running ELS operations shall be canceled |
MCUXCLELS_STATUS_SW_CANNOT_INTERRUPT | if a running operation prevented the reset |
MCUXCLELS_STATUS_OK_WAIT | on successful request |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_Disable | ( | void | ) |
Disable the ELS.
This is useful as a power saving mechanism.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_SetIntEnableFlags | ( | mcuxClEls_InterruptOptionEn_t | options | ) |
Set interrupt enable flags.
[in] | options | The command options, determining which interrupts should be enabled or disabled. For more information, see mcuxClEls_InterruptOptionEn_t. |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_GetIntEnableFlags | ( | mcuxClEls_InterruptOptionEn_t * | result | ) |
Get interrupt enable flags.
[out] | result | Pointer which is filled with the configuration of the interrupts enable register. |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_ResetIntFlags | ( | mcuxClEls_InterruptOptionRst_t | options | ) |
Clear the interrupt status register.
[in] | options | The command options, determining which interrupt status bits should be cleared. For more information, see mcuxClEls_InterruptOptionRst_t. |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_SetIntFlags | ( | mcuxClEls_InterruptOptionSet_t | options | ) |
Set the interrupt status register, for debug and testing purposes.
[in] | options | The command options, determining which interrupt status bits should be set. For more information, see mcuxClEls_InterruptOptionSet_t. |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_WaitForOperation | ( | mcuxClEls_ErrorHandling_t | errorHandling | ) |
Wait for an ELS operation and optionally clear the error status.
If an ELS operation is active, this function waits for completion of that operation. For this, the busy flag of ELS is polled. Additionally, this function checks and returns any applicable error indication. If no operation is active, the function returns immediately.
[in] | errorHandling | Define if error flags shall be cleared. |
MCUXCLELS_STATUS_OK | if the last operation was successful, or no operation was active |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_LimitedWaitForOperation | ( | uint32_t | counterLimit, |
mcuxClEls_ErrorHandling_t | errorHandling | ||
) |
Await the completion of an ELS operation for a limited amount of time and optionally clear the error status.
If an ELS operation is active, this function waits for completion of that operation until a counter expires. For this, the busy flag of ELS is polled. The counting mechanism behaves like a simple for-loop from counterLimit
to one. This counter does not have a well-defined relationship to real-world time. Additionally, this function checks and returns any applicable error indication. If no operation is active, the function returns immediately.
[in] | counterLimit | The limit of the wait counter. |
[in] | errorHandling | Define if error flags shall be cleared. |
MCUXCLELS_STATUS_OK | if the last operation was successful, or no operation was active |
MCUXCLELS_STATUS_SW_COUNTER_EXPIRED | if the counter expired while waiting for the operation to complete |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_ResetErrorFlags | ( | void | ) |
Resets all error flags that have been set by a previous operation.
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_GetErrorCode | ( | mcuxClEls_ErrorHandling_t | errorHandling | ) |
Get the last ELS error code and optionally clear the error status.
[in] | errorHandling | Define if error flags shall be cleared. |
MCUXCLELS_STATUS_OK | if the last operation was successful or no operation was active |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_GetErrorLevel | ( | mcuxClEls_ErrorHandling_t | errorHandling, |
uint32_t * | errorLevel | ||
) |
Get the last ELS error code and level and optionally clear the error status.
[in] | errorHandling | Define if error flags shall be cleared. |
[out] | errorLevel | Pointer to the location that will receive the value of the error level. |
MCUXCLELS_STATUS_OK | if the last operation was successful or no operation was active |
#MCUXCLELS_STATUS_ | if the last operation resulted in an error |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_SetRandomStartDelay | ( | uint32_t | delay | ) |
Set the random start delay for AES based operations.
This impacts mcuxClEls_Aead_*, mcuxClEls_Cipher_*, mcuxClEls_Cmac_*, ncpClEls_Ckdf_*, mcuxClEls_KeyImport_Async, mcuxClEls_KeyExport_Async
[in] | delay | Define the max random start delay. Acceptable values are a power of 2 minus one, starting from 0 to 1023 (0, 1, 3, 7, ..., 1023). |
MCUXCLELS_STATUS_OK | if the operation was successful |
MCUXCLELS_API mcuxClEls_Status_t mcuxClEls_GetRandomStartDelay | ( | uint32_t * | delay | ) |
Get the random start delay for AES based operations.
[out] | delay | Pointer to store random start delay configuration. |
MCUXCLELS_STATUS_OK | if the operation was successful |