Functions | |
cy_en_crypto_status_t | Cy_Crypto_Core_Enable (CRYPTO_Type *base) |
The function to enable the Crypto hardware. More... | |
cy_en_crypto_status_t | Cy_Crypto_Core_Disable (CRYPTO_Type *base) |
Disables the operation of the CRYPTO block. More... | |
cy_en_crypto_status_t | Cy_Crypto_Core_GetLibInfo (cy_en_crypto_lib_info_t *libInfo) |
Get Crypto service information. More... | |
cy_en_crypto_status_t | Cy_Crypto_Core_SetVuMemoryAddress (CRYPTO_Type *base, uint32_t const *vuMemoryAddr, uint32_t vuMemorySize) |
Sets the new memory buffer address and size. More... | |
__STATIC_INLINE uint32_t * | Cy_Crypto_Core_GetVuMemoryAddress (CRYPTO_Type *base) |
Gets Crypto memory buffer address. More... | |
uint32_t | Cy_Crypto_Core_GetVuMemorySize (CRYPTO_Type *base) |
Get Crypto memory buffer size. More... | |
void | Cy_Crypto_Core_InvertEndianness (void *inArrPtr, uint32_t byteSize) |
This function reverts byte-array memory block, like: inArr[0] <—> inArr[n] inArr[1] <—> inArr[n-1] inArr[2] <—> inArr[n-2] ........................ inArr[n/2] <—> inArr[n/2-1] More... | |
__STATIC_INLINE bool | Cy_Crypto_Core_IsEnabled (CRYPTO_Type *base) |
The function checks whether the Crypto hardware is enabled. More... | |
__STATIC_INLINE uint8_t | Cy_Crypto_Core_GetFIFODepth (CRYPTO_Type *base) |
Returns the total available number of instructions in the instruction FIFO. More... | |
__STATIC_INLINE uint8_t | Cy_Crypto_Core_GetFIFOUsed (CRYPTO_Type *base) |
Returns the number of instructions in the instruction FIFO. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_WaitForInstrFifoAvailable (CRYPTO_Type *base, uint32_t instr) |
Waits until number of entries in the instruction FIFO is less than specified number. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_WaitForFifoAvailable (CRYPTO_Type *base) |
Waits until number of entries in the instruction FIFO is less than specified in EVENT_LEVEL field in FF_CTL register, an event is generated: "event" = INSTR_FF_STATUS.USED < EVENT_LEVEL. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_WaitForReady (CRYPTO_Type *base) |
Waits until all instruction in FIFO will be completed. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_Vu_WaitForComplete (CRYPTO_Type *base) |
Waits until VU instruction will be completed. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_SetInterruptMask (CRYPTO_Type *base, uint32_t interrupts) |
Masks / unmasks multiple interrupt sources. More... | |
__STATIC_INLINE uint32_t | Cy_Crypto_Core_GetInterruptMask (CRYPTO_Type const *base) |
Reports mask / unmask multiple interrupt sources. More... | |
__STATIC_INLINE uint32_t | Cy_Crypto_Core_GetInterruptStatusMasked (CRYPTO_Type const *base) |
Reports states of multiple enabled interrupt sources. More... | |
__STATIC_INLINE uint32_t | Cy_Crypto_Core_GetInterruptStatus (CRYPTO_Type *base) |
Reports states of multiple interrupt sources. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_SetInterrupt (CRYPTO_Type *base, uint32_t interrupts) |
Sets one of more interrupt sources. More... | |
__STATIC_INLINE void | Cy_Crypto_Core_ClearInterrupt (CRYPTO_Type *base, uint32_t interrupts) |
Clears multiple interrupt sources. More... | |
void | Cy_Crypto_Core_ClearVuRegisters (CRYPTO_Type *base) |
The function to initialize the Crypto VU registers. More... | |
void | Cy_Crypto_Core_HwInit (void) |
The function to initialize the Crypto hardware. | |
cy_en_crypto_status_t Cy_Crypto_Core_Enable | ( | CRYPTO_Type * | base | ) |
The function to enable the Crypto hardware.
base | The pointer to the CRYPTO instance. |
cy_en_crypto_status_t Cy_Crypto_Core_Disable | ( | CRYPTO_Type * | base | ) |
Disables the operation of the CRYPTO block.
base | The pointer to the CRYPTO instance. |
cy_en_crypto_status_t Cy_Crypto_Core_GetLibInfo | ( | cy_en_crypto_lib_info_t * | libInfo | ) |
Get Crypto service information.
libInfo | The pointer to a variable to store gathered crypto library information. |
cy_en_crypto_status_t Cy_Crypto_Core_SetVuMemoryAddress | ( | CRYPTO_Type * | base, |
uint32_t const * | vuMemoryAddr, | ||
uint32_t | vuMemorySize | ||
) |
Sets the new memory buffer address and size.
base | The pointer to the CRYPTO instance. |
vuMemoryAddr | The memory buffer location that will be used as Crypto MEM_BUFF |
vuMemorySize | The provided memory buffer size in bytes. |
__STATIC_INLINE uint32_t * Cy_Crypto_Core_GetVuMemoryAddress | ( | CRYPTO_Type * | base | ) |
Gets Crypto memory buffer address.
base | The pointer to the CRYPTO instance. |
uint32_t Cy_Crypto_Core_GetVuMemorySize | ( | CRYPTO_Type * | base | ) |
Get Crypto memory buffer size.
base | The pointer to the CRYPTO instance. |
void Cy_Crypto_Core_InvertEndianness | ( | void * | inArrPtr, |
uint32_t | byteSize | ||
) |
This function reverts byte-array memory block, like:
inArr[0] <—> inArr[n]
inArr[1] <—> inArr[n-1]
inArr[2] <—> inArr[n-2]
........................
inArr[n/2] <—> inArr[n/2-1]
Odd or even byteSize are acceptable.
inArrPtr | The pointer to the memory whose endianness is to be inverted. |
byteSize | The length of the memory array whose endianness is to be inverted (in bytes) |
__STATIC_INLINE bool Cy_Crypto_Core_IsEnabled | ( | CRYPTO_Type * | base | ) |
The function checks whether the Crypto hardware is enabled.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE uint8_t Cy_Crypto_Core_GetFIFODepth | ( | CRYPTO_Type * | base | ) |
Returns the total available number of instructions in the instruction FIFO.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE uint8_t Cy_Crypto_Core_GetFIFOUsed | ( | CRYPTO_Type * | base | ) |
Returns the number of instructions in the instruction FIFO.
The value of this field ranges from 0 to 8
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE void Cy_Crypto_Core_WaitForInstrFifoAvailable | ( | CRYPTO_Type * | base, |
uint32_t | instr | ||
) |
Waits until number of entries in the instruction FIFO is less than specified number.
base | The pointer to the CRYPTO instance. |
instr | The number of needed available space in the instruction FIFO. |
__STATIC_INLINE void Cy_Crypto_Core_WaitForFifoAvailable | ( | CRYPTO_Type * | base | ) |
Waits until number of entries in the instruction FIFO is less than specified in EVENT_LEVEL field in FF_CTL register, an event is generated: "event" = INSTR_FF_STATUS.USED < EVENT_LEVEL.
By default EVENT_LEVEL = 0;
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE void Cy_Crypto_Core_WaitForReady | ( | CRYPTO_Type * | base | ) |
Waits until all instruction in FIFO will be completed.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE void Cy_Crypto_Core_Vu_WaitForComplete | ( | CRYPTO_Type * | base | ) |
Waits until VU instruction will be completed.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE void Cy_Crypto_Core_SetInterruptMask | ( | CRYPTO_Type * | base, |
uint32_t | interrupts | ||
) |
Masks / unmasks multiple interrupt sources.
base | The pointer to the CRYPTO instance. |
interrupts | Mask bits. See definitions above. |
__STATIC_INLINE uint32_t Cy_Crypto_Core_GetInterruptMask | ( | CRYPTO_Type const * | base | ) |
Reports mask / unmask multiple interrupt sources.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE uint32_t Cy_Crypto_Core_GetInterruptStatusMasked | ( | CRYPTO_Type const * | base | ) |
Reports states of multiple enabled interrupt sources.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE uint32_t Cy_Crypto_Core_GetInterruptStatus | ( | CRYPTO_Type * | base | ) |
Reports states of multiple interrupt sources.
base | The pointer to the CRYPTO instance. |
__STATIC_INLINE void Cy_Crypto_Core_SetInterrupt | ( | CRYPTO_Type * | base, |
uint32_t | interrupts | ||
) |
Sets one of more interrupt sources.
base | The pointer to the CRYPTO instance. |
interrupts | Source bit(s) |
__STATIC_INLINE void Cy_Crypto_Core_ClearInterrupt | ( | CRYPTO_Type * | base, |
uint32_t | interrupts | ||
) |
Clears multiple interrupt sources.
base | The pointer to the CRYPTO instance. |
interrupts | Source bit(s). See definitions above. |
void Cy_Crypto_Core_ClearVuRegisters | ( | CRYPTO_Type * | base | ) |
The function to initialize the Crypto VU registers.
base | The pointer to the CRYPTO instance. |