CryptoAuthLib
Microchip CryptoAuthentication Library
kit_protocol.c File Reference

Microchip Crypto Auth hardware interface object. More...

#include <stdlib.h>
#include <stdio.h>
#include "kit_phy.h"
#include "kit_protocol.h"
#include "basic/atca_helpers.h"

Macros

#define KIT_MAX_SCAN_COUNT   4
 
#define KIT_MAX_TX_BUF   32
 

Functions

char * strnchr (const char *s, size_t count, int c)
 
char kit_id_from_devtype (ATCADeviceType devtype)
 
ATCA_STATUS kit_init (ATCAIface iface)
 HAL implementation of kit protocol init. This function calls back to the physical protocol to send the bytes. More...
 
ATCA_STATUS kit_send (ATCAIface iface, const uint8_t *txdata, int txlength)
 HAL implementation of kit protocol send. This function calls back to the physical protocol to send the bytes. More...
 
ATCA_STATUS kit_receive (ATCAIface iface, uint8_t *rxdata, uint16_t *rxsize)
 HAL implementation to receive bytes and unwrap from kit protocol. This function calls back to the physical protocol to receive the bytes. More...
 
ATCA_STATUS kit_wake (ATCAIface iface)
 Call the wake for kit protocol. More...
 
ATCA_STATUS kit_idle (ATCAIface iface)
 Call the idle for kit protocol. More...
 
ATCA_STATUS kit_sleep (ATCAIface iface)
 Call the sleep for kit protocol. More...
 
ATCA_STATUS kit_wrap_cmd (const uint8_t *txdata, int txlen, char *pkitcmd, int *nkitcmd, char target)
 Wrap binary bytes in ascii kit protocol. More...
 
ATCA_STATUS kit_parse_rsp (const char *pkitbuf, int nkitbuf, uint8_t *kitstatus, uint8_t *rxdata, int *datasize)
 Parse the response ascii from the kit. More...
 

Detailed Description

Microchip Crypto Auth hardware interface object.