CryptoAuthLib
Microchip CryptoAuthentication Library
hal_swi_uart.c File Reference

ATCA Hardware abstraction layer for SWI over UART drivers. More...

#include <string.h>
#include <stdio.h>
#include "atca_hal.h"
#include "hal_swi_uart.h"
#include "atca_device.h"
#include "atca_execution.h"

Functions

ATCA_STATUS hal_swi_discover_buses (int swi_buses[], int max_buses)
 discover swi buses available for this hardware this maintains a list of logical to physical bus mappings freeing the application.This function is currently not supported. of the a-priori knowledge More...
 
ATCA_STATUS hal_swi_discover_devices (int bus_num, ATCAIfaceCfg cfg[], int *found)
 discover any CryptoAuth devices on a given logical bus number.This function is curently not supported. More...
 
ATCA_STATUS hal_swi_init (void *hal, ATCAIfaceCfg *cfg)
 hal_swi_init manages requests to initialize a physical interface. It manages use counts so when an interface has released the physical layer, it will disable the interface for some other use. You can have multiple ATCAIFace instances using the same bus, and you can have multiple ATCAIFace instances on multiple swi buses, so hal_swi_init manages these things and ATCAIFace is abstracted from the physical details. More...
 
ATCA_STATUS hal_swi_post_init (ATCAIface iface)
 HAL implementation of SWI post init. More...
 
ATCA_STATUS hal_swi_send_flag (ATCAIface iface, uint8_t data)
 HAL implementation of SWI send one byte over UART. More...
 
ATCA_STATUS hal_swi_send (ATCAIface iface, uint8_t *txdata, int txlength)
 Send byte(s) via SWI. More...
 
ATCA_STATUS hal_swi_receive (ATCAIface iface, uint8_t *rxdata, uint16_t *rxlength)
 Receive byte(s) via SWI. More...
 
ATCA_STATUS hal_swi_wake (ATCAIface iface)
 Send Wake flag via SWI. More...
 
ATCA_STATUS hal_swi_idle (ATCAIface iface)
 Send Idle flag via SWI. More...
 
ATCA_STATUS hal_swi_sleep (ATCAIface iface)
 Send Sleep flag via SWI. More...
 
ATCA_STATUS hal_swi_release (void *hal_data)
 Manages reference count on given bus and releases resource if no more reference(s) exist. More...
 

Detailed Description

ATCA Hardware abstraction layer for SWI over UART drivers.