Peripheral Instance Management: CRYPTOCryptography Hardware Acceleration Plugins

Detailed Description

Resource management functions for the CRYPTO peripheral.

Macros

#define CRYPTO_MANAGEMENT_SAVE_DDATA0   (0x1U << 3)
 
#define CRYPTO_MANAGEMENT_SAVE_DDATA1   (0x1U << 4)
 
#define CRYPTO_MANAGEMENT_SAVE_DDATA2   (0x1U << 5)
 
#define CRYPTO_MANAGEMENT_SAVE_DDATA3   (0x1U << 6)
 
#define CRYPTO_MANAGEMENT_SAVE_DDATA4   (0x1U << 7)
 
#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ0   (0x1U)
 
#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ1   (0x2U)
 
#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ2   (0x3U)
 
#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ3   (0x4U)
 
#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ4   (0x5U)
 

Functions

CRYPTO_TypeDef * crypto_management_acquire (void)
 Get ownership of a CRYPTO peripheral.
 
CRYPTO_TypeDef * crypto_management_acquire_default (void)
 Get ownership of the default CRYPTO peripheral.
 
void crypto_management_release (CRYPTO_TypeDef *device)
 Release ownership of a CRYPTO peripheral.
 
CRYPTO_TypeDef * crypto_management_acquire_preemption (uint32_t regmask)
 Acquire preempting ownership of a CRYPTO peripheral. NOTE: this function is not meant for general use, it is not thread-safe, and must be called form the highest priority thread/interrupt allowed to use mbed TLS.
 
void crypto_management_release_preemption (CRYPTO_TypeDef *device)
 Releasing preempting ownership of a CRYPTO peripheral. NOTE: this function is not meant for general use, it is not thread-safe, and must be called form the highest priority thread/interrupt allowed to use mbed TLS.
 

Macro Definition Documentation

#define CRYPTO_MANAGEMENT_SAVE_DDATA0   (0x1U << 3)

Save DDATA0 register when preempting

Definition at line 53 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_DDATA1   (0x1U << 4)

Save DDATA1 register when preempting

Definition at line 55 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_DDATA2   (0x1U << 5)

Save DDATA2 register when preempting

Definition at line 57 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_DDATA3   (0x1U << 6)

Save DDATA3 register when preempting

Definition at line 59 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_DDATA4   (0x1U << 7)

Save DDATA4 register when preempting

Definition at line 61 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ0   (0x1U)

Save SEQ0 register when preempting

Definition at line 63 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ1   (0x2U)

Save SEQ0 through SEQ1 register when preempting

Definition at line 65 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ2   (0x3U)

Save SEQ0 through SEQ2 register when preempting

Definition at line 67 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ3   (0x4U)

Save SEQ0 through SEQ3 register when preempting

Definition at line 69 of file crypto_management.h.

#define CRYPTO_MANAGEMENT_SAVE_UPTO_SEQ4   (0x5U)

Save SEQ0 through SEQ4 register when preempting

Definition at line 71 of file crypto_management.h.

Function Documentation

CRYPTO_TypeDef* crypto_management_acquire ( void  )

Get ownership of a CRYPTO peripheral.

Returns
Handle of assigned CRYPTO peripheral
CRYPTO_TypeDef* crypto_management_acquire_default ( void  )

Get ownership of the default CRYPTO peripheral.

Returns
Handle of default CRYPTO peripheral
CRYPTO_TypeDef* crypto_management_acquire_preemption ( uint32_t  regmask)

Acquire preempting ownership of a CRYPTO peripheral. NOTE: this function is not meant for general use, it is not thread-safe, and must be called form the highest priority thread/interrupt allowed to use mbed TLS.

Parameters
regmaskBitmask of CRYPTO_MANAGEMENT_ defines instructing what parts of the device state will be clobbered during preemption.
Returns
Handle of assigned CRYPTO peripheral
void crypto_management_release ( CRYPTO_TypeDef *  device)

Release ownership of a CRYPTO peripheral.

Parameters
deviceHandle of CRYPTO peripheral to be released
void crypto_management_release_preemption ( CRYPTO_TypeDef *  device)

Releasing preempting ownership of a CRYPTO peripheral. NOTE: this function is not meant for general use, it is not thread-safe, and must be called form the highest priority thread/interrupt allowed to use mbed TLS.

Parameters
deviceHandle of preempted CRYPTO peripheral to be released