FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aes_internal.c File Reference

Functions

static void __pi_aes_null_handler (void *arg)
 
static void __pi_aes_event_handler (void *arg)
 
static int32_t __pi_aes_conf_apply (struct aes_itf_data_s *itf_data)
 
static void __pi_aes_crypt_start (struct aes_itf_data_s *itf_data)
 
static void __pi_aes_event_handler_internal (struct aes_itf_data_s *itf_data)
 
void __pi_aes_stop_fifo_mode (struct aes_config_data_s *conf_data)
 stop the fifo mode and resume normal mode More...
 
void __pi_aes_conf_init (struct pi_aes_conf *conf)
 Init aes configuration structure. More...
 
int32_t __pi_aes_open (struct pi_aes_conf *conf, struct aes_config_data_s **device_data)
 Open aes device. More...
 
void __pi_aes_close (struct aes_config_data_s *conf_data)
 Close aes device. More...
 
int32_t __pi_aes_crypt_async (struct aes_config_data_s *conf_data, uint8_t is_encrypt, void *src, void *dst, uint16_t len, pi_task_t *task)
 launch an encrypt/decrypt operation More...
 

Variables

static struct aes_itf_data_sg_aes_itf_data [UDMA_NB_AES]
 

Function Documentation

void __pi_aes_conf_init ( struct pi_aes_conf *  conf)
Parameters
confPointer to aes conf.

Referenced by pi_aes_conf_init().

int32_t __pi_aes_crypt_async ( struct aes_config_data_s conf_data,
uint8_t  is_encrypt,
void *  src,
void *  dst,
uint16_t  len,
pi_task_t task 
)
Parameters
conf_dataPointer to driver data.
is_encryptif flag is set, then operation is an encryption else it is a decryption.
srcSource data
dstDestination data
lenData length
taskPointer to struct pi_task.

References __aes_drv_fifo_enqueue(), __pi_aes_crypt_start(), AES_TRACE, pi_task_t::data, disable_irq(), aes_itf_data_s::end_task, aes_config_data_s::itf_data, and restore_irq().

Referenced by pi_aes_decrypt_async(), and pi_aes_encrypt_async().

static void __pi_aes_event_handler ( void *  arg)
static
static void __pi_aes_null_handler ( void *  arg)
static

Referenced by __pi_aes_open().

void __pi_aes_stop_fifo_mode ( struct aes_config_data_s conf_data)
Parameters
conf_dataPointer to driver data.

References __pi_aes_event_handler_internal(), and aes_config_data_s::itf_data.

Referenced by pi_aes_ioctl().

Variable Documentation

struct aes_itf_data_s* g_aes_itf_data[UDMA_NB_AES]
static