Implements an execution handler that executes a given command on a device and returns the results. More...
#include "cryptoauthlib.h"
Functions | |
ATCA_STATUS | calib_get_execution_time (uint8_t opcode, ATCADevice device) |
return the typical execution time for the given command | |
ATCA_STATUS | calib_execute_send (ATCADevice device, uint8_t word_address, uint8_t *txdata, uint16_t txlength) |
ATCA_STATUS | calib_execute_receive (ATCADevice device, uint8_t device_address, uint8_t *rxdata, uint16_t *rxlength) |
ATCA_STATUS | calib_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. | |
Implements an execution handler that executes a given command on a device and returns the results.
This implementation wraps Polling and No polling (simple wait) schemes into a single method and use it across the library. Polling is used by default, however, by defining the ATCA_NO_POLL symbol the code will instead wait an estimated max execution time before requesting the result.
ATCA_STATUS calib_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.
[in,out] | packet | As input, the packet to be sent. As output, the data buffer in the packet structure will contain the response. |
[in] | device | CryptoAuthentication device to send the command to. |
ATCA_STATUS calib_get_execution_time | ( | uint8_t | opcode, |
ATCADevice | device | ||
) |
return the typical execution time for the given command
[in] | opcode | Opcode value of the command |
[in] | ca_cmd | Command object for which the execution times are associated |