MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClResource_Functions

Defines all functions of mcuxClResource. More...

Functions

mcuxClResource_Status_t mcuxClResource_init (mcuxClResource_Context_t *pResourceCtx, mcuxClResource_MutexAcquire_Callback_t pMutexAcquire, mcuxClResource_MutexRelease_Callback_t pMutexRelease)
 Resource context initialization function.
mcuxClResource_Status_t mcuxClResource_handle_interrupt (const mcuxClResource_Context_t *pResourceCtx, mcuxClResource_Interrupt_t interrupt)
 Resource interrupt handler.

Detailed Description

Defines all functions of mcuxClResource.

Function Documentation

◆ mcuxClResource_init()

Resource context initialization function.

This function performs the initialization of the resource context. There should generally only be one (global) resource context.

Parameters
pResourceCtxPointer to the global resource context
pMutexAcquireCallback to be used for acquiring a mutex.
pMutexReleaseCallback to be used for releasing a mutex.
Returns
status
Return values
MCUXCLRESOURCE_STATUS_OKResource context has been initialized successfully
MCUXCLRESOURCE_STATUS_ERRORError occurred during resource initializing

◆ mcuxClResource_handle_interrupt()

mcuxClResource_Status_t mcuxClResource_handle_interrupt ( const mcuxClResource_Context_t * pResourceCtx,
mcuxClResource_Interrupt_t interrupt )

Resource interrupt handler.

This function performs the interrupt handling for the given resource to wrap-up an operation after the interrupt of the resource was triggered. The user callback, which is installed in the session that performed the non-blocking operation, will be triggered by this function if the crypto operation finished successfully.

Attention
This function shall not be called directly in interrupt service routines (ISR) of the resources, but rather after the ISR has been triggered. Do not clear any error bits in the respective resources before calling this function, as the error status bits are read and handled/translated by Clib to wrap-up the operation.
In case of any detected error or fault, the installed user callback is not triggered.
Parameters
pResourceCtxPointer to the global resource context
interruptThe interrupt to be handled.
Returns
status
Return values
MCUXCLRESOURCE_STATUS_OKResource operation successful
MCUXCLRESOURCE_STATUS_ERRORError occurred during Resource operation
Examples
mcuxClCipherModes_Cbc_Aes128_Multipart_PaddingZero_Dma_NonBlocking_example.c, mcuxClCipherModes_Cbc_Aes128_Oneshot_Dma_NonBlocking_example.c, mcuxClCipherModes_Ctr_Aes128_Multipart_Dma_NonBlocking_example.c, mcuxClCipherModes_Ctr_Aes128_Oneshot_Dma_NonBlocking_example.c, mcuxClCipherModes_Ecb_Aes128_Multipart_PaddingZero_Dma_NonBlocking_MultipleProcess_example.c, mcuxClCipherModes_Ecb_Aes128_Multipart_PaddingZero_Dma_NonBlocking_example.c, mcuxClCipherModes_Ecb_Aes128_Oneshot_Dma_NonBlocking_example.c, mcuxClHashModes_sha256_oneshot_dma_nonBlocking_example.c, mcuxClHashModes_sha256_streaming_dma_nonBlocking_example.c, mcuxClMacModes_Cmac_Aes128_Compute_Dma_NonBlocking_example.c, and mcuxClMacModes_Cmac_Aes128_Multipart_Dma_NonBlocking_example.c.