CC3200 Peripheral Driver Library User's Guide
1.2.0
|
Functions | |
void | DESConfigSet (uint32_t ui32Base, uint32_t ui32Config) |
void | DESKeySet (uint32_t ui32Base, uint8_t *pui8Key) |
bool | DESIVSet (uint32_t ui32Base, uint8_t *pui8IVdata) |
void | DESDataLengthSet (uint32_t ui32Base, uint32_t ui32Length) |
bool | DESDataReadNonBlocking (uint32_t ui32Base, uint8_t *pui8Dest, uint8_t ui8Length) |
void | DESDataRead (uint32_t ui32Base, uint8_t *pui8Dest, uint8_t ui8Length) |
bool | DESDataWriteNonBlocking (uint32_t ui32Base, uint8_t *pui8Src, uint8_t ui8Length) |
void | DESDataWrite (uint32_t ui32Base, uint8_t *pui8Src, uint8_t ui8Length) |
bool | DESDataProcess (uint32_t ui32Base, uint8_t *pui8Src, uint8_t *pui8Dest, uint32_t ui32Length) |
uint32_t | DESIntStatus (uint32_t ui32Base, bool bMasked) |
void | DESIntEnable (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | DESIntDisable (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | DESIntClear (uint32_t ui32Base, uint32_t ui32IntFlags) |
void | DESIntRegister (uint32_t ui32Base, void(*pfnHandler)(void)) |
void | DESIntUnregister (uint32_t ui32Base) |
void | DESDMAEnable (uint32_t ui32Base, uint32_t ui32Flags) |
void | DESDMADisable (uint32_t ui32Base, uint32_t ui32Flags) |
void DESConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Config | ||
) |
Configures the DES module for operation.
ui32Base | is the base address of the DES module. |
ui32Config | is the configuration of the DES module. |
This function configures the DES module for operation.
The ui32Config parameter is a bit-wise OR of a number of configuration flags. The valid flags are grouped below based on their function.
The direction of the operation is specified with one of the following two flags. Only one is permitted.
The operational mode of the DES engine is specified with one of the following flags. Only one is permitted.
The selection of single DES or triple DES is specified with one of the following two flags. Only one is permitted.
void DESDataLengthSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Length | ||
) |
Sets the crytographic data length in the DES module.
ui32Base | is the base address of the DES module. |
ui32Length | is the length of the data in bytes. |
This function writes the cryptographic data length into the DES module. When this register is written, the engine is triggersed to start using this context.
bool DESDataProcess | ( | uint32_t | ui32Base, |
uint8_t * | pui8Src, | ||
uint8_t * | pui8Dest, | ||
uint32_t | ui32Length | ||
) |
Processes blocks of data through the DES module.
ui32Base | is the base address of the DES module. |
pui8Src | is a pointer to an array of words that contains the source data for processing. |
pui8Dest | is a pointer to an array of words consisting of the processed data. |
ui32Length | is the length of the cryptographic data in bytes. It must be a multiple of eight. |
This function takes the data contained in the pui8Src array and processes it using the DES engine. The resulting data is stored in the pui8Dest array. The function blocks until all of the data has been processed. If processing is successful, the function returns true.
void DESDataRead | ( | uint32_t | ui32Base, |
uint8_t * | pui8Dest, | ||
uint8_t | ui8Length | ||
) |
Reads plaintext/ciphertext from data registers with blocking.
ui32Base | is the base address of the DES module. |
pui8Dest | is a pointer to an array of bytes. |
ui8Length | the length can be from 1 to 8 |
This function waits until the DES module is finished and encrypted or decrypted data is ready. The output data is then stored in the pui8Dest array.
bool DESDataReadNonBlocking | ( | uint32_t | ui32Base, |
uint8_t * | pui8Dest, | ||
uint8_t | ui8Length | ||
) |
Reads plaintext/ciphertext from data registers without blocking
ui32Base | is the base address of the DES module. |
pui8Dest | is a pointer to an array of 2 words. |
ui8Length | the length can be from 1 to 8 |
This function returns true if the data was ready when the function was called. If the data was not ready, false is returned.
void DESDataWrite | ( | uint32_t | ui32Base, |
uint8_t * | pui8Src, | ||
uint8_t | ui8Length | ||
) |
Writes plaintext/ciphertext to data registers without blocking
ui32Base | is the base address of the DES module. |
pui8Src | is a pointer to an array of bytes. |
ui8Length | the length can be from 1 to 8 |
This function waits until the DES module is ready before writing the data contained in the pui8Src array.
bool DESDataWriteNonBlocking | ( | uint32_t | ui32Base, |
uint8_t * | pui8Src, | ||
uint8_t | ui8Length | ||
) |
Writes plaintext/ciphertext to data registers without blocking
ui32Base | is the base address of the DES module. |
pui8Src | is a pointer to an array of 2 words. |
ui8Length | the length can be from 1 to 8 |
This function returns false if the DES module is not ready to accept data. It returns true if the data was written successfully.
void DESDMADisable | ( | uint32_t | ui32Base, |
uint32_t | ui32Flags | ||
) |
Disables DMA request sources in the DES module.
ui32Base | is the base address of the DES module. |
ui32Flags | is a bit mask of the DMA requests to be disabled. |
This function disables DMA request sources in the DES module. The ui32Flags parameter should be the logical OR of any of the following:
void DESDMAEnable | ( | uint32_t | ui32Base, |
uint32_t | ui32Flags | ||
) |
Enables DMA request sources in the DES module.
ui32Base | is the base address of the DES module. |
ui32Flags | is a bit mask of the DMA requests to be enabled. |
This function enables DMA request sources in the DES module. The ui32Flags parameter should be the logical OR of any of the following:
void DESIntClear | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Clears interrupts in the DES module.
ui32Base | is the base address of the DES module. |
ui32IntFlags | is a bit mask of the interrupts to be disabled. |
This function disables interrupt sources in the DES module. ui32IntFlags should be a logical OR of one or more of the following values:
void DESIntDisable | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Disables interrupts in the DES module.
ui32Base | is the base address of the DES module. |
ui32IntFlags | is a bit mask of the interrupts to be disabled. |
This function disables interrupt sources in the DES module. ui32IntFlags should be a logical OR of one or more of the following values:
void DESIntEnable | ( | uint32_t | ui32Base, |
uint32_t | ui32IntFlags | ||
) |
Enables interrupts in the DES module.
ui32Base | is the base address of the DES module. |
ui32IntFlags | is a bit mask of the interrupts to be enabled. |
ui32IntFlags should be a logical OR of one or more of the following values:
void DESIntRegister | ( | uint32_t | ui32Base, |
void(*)(void) | pfnHandler | ||
) |
Registers an interrupt handler for the DES module.
ui32Base | is the base address of the DES module. |
pfnHandler | is a pointer to the function to be called when the enabled DES interrupts occur. |
This function registers the interrupt handler in the interrupt vector table, and enables DES interrupts on the interrupt controller; specific DES interrupt sources must be enabled using DESIntEnable(). The interrupt handler being registered must clear the source of the interrupt using DESIntClear().
If the application is using a static interrupt vector table stored in flash, then it is not necessary to register the interrupt handler this way. Instead, IntEnable() should be used to enable DES interrupts on the interrupt controller.
uint32_t DESIntStatus | ( | uint32_t | ui32Base, |
bool | bMasked | ||
) |
Returns the current interrupt status of the DES module.
ui32Base | is the base address of the DES module. |
bMasked | is false if the raw interrupt status is required and true if the masked interrupt status is required. |
This function gets the current interrupt status of the DES module. The value returned is a logical OR of the following values:
void DESIntUnregister | ( | uint32_t | ui32Base | ) |
Unregisters an interrupt handler for the DES module.
ui32Base | is the base address of the DES module. |
This function unregisters the previously registered interrupt handler and disables the interrupt in the interrupt controller.
bool DESIVSet | ( | uint32_t | ui32Base, |
uint8_t * | pui8IVdata | ||
) |
Sets the initialization vector in the DES module.
ui32Base | is the base address of the DES module. |
pui8IVdata | is a pointer to an array of 64 bits (2 words) of data to be written into the initialization vectors registers. |
This function sets the initialization vector in the DES module. It returns true if the registers were successfully written. If the context registers cannot be written at the time the function was called, then false is returned.
void DESKeySet | ( | uint32_t | ui32Base, |
uint8_t * | pui8Key | ||
) |
Sets the key used for DES operations.
ui32Base | is the base address of the DES module. |
pui8Key | is a pointer to an array that holds the key |
This function sets the key used for DES operations.
pui8Key should be 64 bits long (2 words) if single DES is being used or 192 bits (6 words) if triple DES is being used.