CryptoAuthLib v3.7.6
Microchip CryptoAuthentication Library
 
Loading...
Searching...
No Matches
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...
 

Macros

#define ATSHA204A   (0U)
 The supported Device type in Cryptoauthlib library.
 
#define ATECC108A   (1U)
 
#define ATECC508A   (2U)
 
#define ATECC608A   (3U)
 
#define ATECC608B   (3U)
 
#define ATECC608   (3U)
 
#define ATSHA206A   (4U)
 
#define TA100   (0x10U)
 
#define TA101   (0x11U)
 
#define ECC204   (0x20U)
 
#define TA010   (0x21U)
 
#define ECC206   (0x22U)
 
#define RNG90   (0x23U)
 
#define SHA104   (0x24U)
 
#define SHA105   (0x25U)
 
#define SHA106   (0x26U)
 
#define ATCA_DEV_UNKNOWN   (0x7EU)
 
#define ATCA_DEV_INVALID   (0x7FU)
 

Typedefs

typedef void(* ctx_cb) (void *ctx)
 Callback function to clean up the session context.
 
typedef struct atca_deviceATCADevice
 
typedef uint8_t ATCADeviceType
 

Enumerations

enum  ATCADeviceState { ATCA_DEVICE_STATE_UNKNOWN = 0 , ATCA_DEVICE_STATE_SLEEP , ATCA_DEVICE_STATE_IDLE , ATCA_DEVICE_STATE_ACTIVE }
 ATCADeviceState says about device state.
 

Functions

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

Detailed Description

ATCADevice object - composite of command and interface objects.

Function Documentation

◆ 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.