CryptoAuthLib
Microchip CryptoAuthentication Library
atca_execution.h File Reference

Defines an execution handler that executes a given command on a device and returns the results. More...

#include "atca_status.h"
#include "atca_command.h"
#include "atca_device.h"

Go to the source code of this file.

Macros

#define ATCA_UNSUPPORTED_CMD   ((uint16_t)0xFFFF)
 

Functions

ATCA_STATUS atca_execute_command (ATCAPacket *packet, ATCADevice device)
 Wakes up device, sends the packet, waits for command completion, receives response, and puts the device into the idle state. More...
 

Detailed Description

Defines an execution handler that executes a given command on a device and returns the results.

The basic flow is to wake the device, send the command, wait/poll for completion, and finally receives the response from the device and does basic checks before returning to caller.

This handler supports the ATSHA and ATECC device family.

Macro Definition Documentation

◆ ATCA_UNSUPPORTED_CMD

#define ATCA_UNSUPPORTED_CMD   ((uint16_t)0xFFFF)

Function Documentation

◆ atca_execute_command()

ATCA_STATUS atca_execute_command ( ATCAPacket packet,
ATCADevice  device 
)

Wakes up device, sends the packet, waits for command completion, receives response, and puts the device into the idle state.

Parameters
[in,out]packetAs input, the packet to be sent. As output, the data buffer in the packet structure will contain the response.
[in]deviceCryptoAuthentication device to send the command to.
Returns
ATCA_SUCCESS on success, otherwise an error code.