CryptoAuthLib
Microchip CryptoAuthentication Library
atca_basic.c File Reference

CryptoAuthLib Basic API methods. These methods provide a simpler way to access the core crypto methods. More...

#include "atca_basic.h"
#include "host/atca_host.h"

Macros

#define MAX_BUSES   4
 

Functions

ATCA_STATUS atcab_version (char *ver_str)
 basic API methods are all prefixed with atcab_ (CryptoAuthLib Basic) the fundamental premise of the basic API is it is based on a single interface instance and that instance is global, so all basic API commands assume that one global device is the one to operate on. More...
 
ATCA_STATUS atcab_init (ATCAIfaceCfg *cfg)
 Creates a global ATCADevice object used by Basic API. More...
 
ATCA_STATUS atcab_init_device (ATCADevice ca_device)
 Initialize the global ATCADevice object to point to one of your choosing for use with all the atcab_ basic API. More...
 
ATCA_STATUS atcab_release (void)
 release (free) the global ATCADevice instance. This must be called in order to release or free up the interface. More...
 
ATCADevice atcab_get_device (void)
 Get the global device object. More...
 
ATCADeviceType atcab_get_device_type (void)
 Get the current device type. More...
 
ATCA_STATUS atcab_wakeup (void)
 wakeup the CryptoAuth device More...
 
ATCA_STATUS atcab_idle (void)
 idle the CryptoAuth device More...
 
ATCA_STATUS atcab_sleep (void)
 invoke sleep on the CryptoAuth device More...
 
ATCA_STATUS atcab_cfg_discover (ATCAIfaceCfg cfg_array[], int max_ifaces)
 auto discovery of crypto auth devices More...
 
ATCA_STATUS _atcab_exit (void)
 common cleanup code which idles the device after any operation More...
 
ATCA_STATUS atcab_get_addr (uint8_t zone, uint16_t slot, uint8_t block, uint8_t offset, uint16_t *addr)
 Compute the address given the zone, slot, block, and offset. More...
 
ATCA_STATUS atcab_get_zone_size (uint8_t zone, uint16_t slot, size_t *size)
 Gets the size of the specified zone in bytes. More...
 

Variables

const char atca_version [] = { "20190304" }
 
ATCADevice _gDevice = NULL
 

Detailed Description

CryptoAuthLib Basic API methods. These methods provide a simpler way to access the core crypto methods.

Macro Definition Documentation

◆ MAX_BUSES

#define MAX_BUSES   4

Variable Documentation

◆ atca_version

const char atca_version[] = { "20190304" }