CryptoAuthLib
Microchip CryptoAuthentication Library
ATCADevice (atca_)

ATCADevice object - composite of command and interface objects. More...

Data Structures

struct  atca_device
 atca_device is the C object backing ATCADevice. See the atca_device.h file for details on the ATCADevice methods. More...
 

Typedefs

typedef struct atca_deviceATCADevice
 

Enumerations

enum  ATCADeviceType {
  ATSHA204A, ATECC108A, ATECC508A, ATECC608A,
  ATCA_DEV_UNKNOWN = 0x20
}
 The supported Device type in Cryptoauthlib library. More...
 

Functions

ATCADevice newATCADevice (ATCAIfaceCfg *cfg)
 constructor for a Microchip CryptoAuth device More...
 
void deleteATCADevice (ATCADevice *ca_dev)
 destructor for a device NULLs reference after object is freed More...
 
ATCA_STATUS initATCADevice (ATCAIfaceCfg *cfg, ATCADevice ca_dev)
 Initializer for an Microchip CryptoAuth device. More...
 
ATCACommand atGetCommands (ATCADevice dev)
 returns a reference to the ATCACommand object for the device More...
 
ATCAIface atGetIFace (ATCADevice dev)
 returns a reference to the ATCAIface interface object for the device More...
 
ATCA_STATUS releaseATCADevice (ATCADevice ca_dev)
 Release any resources associated with the device. More...
 

Detailed Description

ATCADevice object - composite of command and interface objects.

Typedef Documentation

◆ ATCADevice

typedef struct atca_device* ATCADevice

Enumeration Type Documentation

◆ ATCADeviceType

The supported Device type in Cryptoauthlib library.

Enumerator
ATSHA204A 
ATECC108A 
ATECC508A 
ATECC608A 
ATCA_DEV_UNKNOWN 

Function Documentation

◆ atGetCommands()

ATCACommand atGetCommands ( ATCADevice  dev)

returns a reference to the ATCACommand object for the device

Parameters
[in]devreference to a device
Returns
reference to the ATCACommand object for the device

◆ atGetIFace()

ATCAIface atGetIFace ( ATCADevice  dev)

returns a reference to the ATCAIface interface object for the device

Parameters
[in]devreference to a device
Returns
reference to the ATCAIface object for the device

◆ deleteATCADevice()

void deleteATCADevice ( ATCADevice ca_dev)

destructor for a device NULLs reference after object is freed

Parameters
[in]ca_devpointer to a reference to a device

◆ initATCADevice()

ATCA_STATUS initATCADevice ( ATCAIfaceCfg cfg,
ATCADevice  ca_dev 
)

Initializer for an Microchip CryptoAuth device.

Parameters
[in]cfgpointer to an interface configuration object
[in,out]ca_devAs input, pre-allocated structure to be initialized. mCommands and mIface members should point to existing structures to be initialized.
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ newATCADevice()

ATCADevice newATCADevice ( ATCAIfaceCfg cfg)

constructor for a Microchip CryptoAuth device

Parameters
[in]cfgInterface configuration object
Returns
Reference to a new ATCADevice on success. NULL on failure.

◆ releaseATCADevice()

ATCA_STATUS releaseATCADevice ( ATCADevice  ca_dev)

Release any resources associated with the device.

Parameters
[in]ca_devDevice to release
Returns
ATCA_SUCCESS on success, otherwise an error code.