KIT protocol intepreter. More...
#include <ctype.h>
#include "ascii_kit_host.h"
#include "hal/kit_protocol.h"
#include "talib/talib_fce.h"
Functions | |
ATCA_STATUS | kit_host_init_phy (atca_hal_kit_phy_t *phy, ATCAIface iface) |
Initializes a phy structure with a cryptoauthlib hal adapter. | |
ATCA_STATUS | kit_host_init (ascii_kit_host_context_t *ctx, ATCAIfaceCfg *iface[], const size_t iface_count, const atca_hal_kit_phy_t *phy, const uint32_t flags) |
Initializes the kit protocol parser context. | |
size_t | kit_host_format_response (uint8_t *response, size_t rlen, ATCA_STATUS status, uint8_t *data, size_t dlen) |
Format the status and data into the kit protocol response format. | |
ATCA_STATUS | kit_host_process_cmd (ascii_kit_host_context_t *ctx, const kit_host_map_entry_t *cmd_list, int argc, char *argv[], uint8_t *response, size_t *rlen) |
Iterate through a command list to match the given command and then will execute it. | |
ATCA_STATUS | kit_host_process_ta (ascii_kit_host_context_t *ctx, int argc, char *argv[], uint8_t *response, size_t *rlen) |
ATCA_STATUS | kit_host_process_line (ascii_kit_host_context_t *ctx, uint8_t *input_line, size_t ilen, uint8_t *response, size_t *rlen) |
Parse a line as a kit protocol command. The kit protocol is printable ascii and each line ends with a newline character. | |
void | kit_host_task (ascii_kit_host_context_t *ctx) |
Non returning kit protocol runner using the configured physical interface that was provided when the context was initialized. | |
KIT protocol intepreter.
ATCA_STATUS kit_host_init | ( | ascii_kit_host_context_t * | ctx, |
ATCAIfaceCfg * | iface[], | ||
const size_t | iface_count, | ||
const atca_hal_kit_phy_t * | phy, | ||
const uint32_t | flags | ||
) |
Initializes the kit protocol parser context.
ctx | Kit protocol parser context |
iface | List of device configurations which will be used |
iface_count | Number of configurations provided |
phy | Kit protocol physical adapter |
flags | Option Flags |
ATCA_STATUS kit_host_init_phy | ( | atca_hal_kit_phy_t * | phy, |
ATCAIface | iface | ||
) |
Initializes a phy structure with a cryptoauthlib hal adapter.