CryptoAuthLib
Microchip CryptoAuthentication Library
|
ATCA Hardware abstraction layer for Windows using kit protocol over a USB CDC device. More...
#include "atca_hal.h"
#include "kit_phy.h"
#include "hal_win_kit_cdc.h"
#include "kit_protocol.h"
#include <SetupAPI.h>
#include <stdlib.h>
#include <tchar.h>
#include <stdio.h>
Functions | |
ATCA_STATUS | hal_kit_cdc_init (void *hal, ATCAIfaceCfg *cfg) |
HAL implementation of Kit USB CDC init. More... | |
ATCA_STATUS | hal_cdc_discover_buses (int i2c_buses[], int max_buses) |
discover all CDC kits available.This function is currently not implemented. this maintains a list of logical to physical bus mappings freeing the application of the a-priori knowledge More... | |
ATCA_STATUS | hal_cdc_discover_devices (int bus_num, ATCAIfaceCfg cfg[], int *found) |
discover any CryptoAuth devices on a given logical bus number.This function is currently not implemented. More... | |
ATCA_STATUS | hal_kit_cdc_post_init (ATCAIface iface) |
HAL implementation of Kit USB CDC post init. More... | |
ATCA_STATUS | kit_phy_send (ATCAIface iface, const char *txdata, int txlength) |
HAL implementation of kit protocol send .It is called by the top layer. More... | |
ATCA_STATUS | kit_phy_receive (ATCAIface iface, char *rxdata, int *rxsize) |
HAL implementation of kit protocol receive data.It is called by the top layer. More... | |
ATCA_STATUS | hal_kit_phy_num_found (int8_t *num_found) |
Number of USB CDC devices found. More... | |
ATCA_STATUS | hal_kit_cdc_send (ATCAIface iface, uint8_t *txdata, int txlength) |
HAL implementation of kit protocol send over USB CDC. More... | |
ATCA_STATUS | hal_kit_cdc_receive (ATCAIface iface, uint8_t *rxdata, uint16_t *rxsize) |
HAL implementation of kit protocol receive over USB CDC. More... | |
ATCA_STATUS | hal_kit_cdc_wake (ATCAIface iface) |
Call the wake for kit protocol over USB CDC. More... | |
ATCA_STATUS | hal_kit_cdc_idle (ATCAIface iface) |
Call the idle for kit protocol over USB CDC. More... | |
ATCA_STATUS | hal_kit_cdc_sleep (ATCAIface iface) |
Call the sleep for kit protocol over USB CDC. More... | |
ATCA_STATUS | hal_kit_cdc_release (void *hal_data) |
Close the physical port for CDC. More... | |
ATCA_STATUS | hal_kit_cdc_discover_buses (int cdc_buses[], int max_buses) |
discover cdc buses available for this hardware this maintains a list of logical to physical bus mappings freeing the application of the a-priori knowledge.This function is currently not implemented. More... | |
ATCA_STATUS | hal_kit_cdc_discover_devices (int bus_num, ATCAIfaceCfg *cfg, int *found) |
discover any CryptoAuth devices on a given logical bus number More... | |
Variables | |
atcacdc_t | _gCdc |
ATCA Hardware abstraction layer for Windows using kit protocol over a USB CDC device.
ATCA_STATUS hal_cdc_discover_buses | ( | int | i2c_buses[], |
int | max_buses | ||
) |
discover all CDC kits available.This function is currently not implemented. this maintains a list of logical to physical bus mappings freeing the application of the a-priori knowledge
[in] | i2c_buses | - an array of logical bus numbers |
[in] | max_buses | - maximum number of buses the app wants to attempt to discover |
ATCA_STATUS hal_cdc_discover_devices | ( | int | bus_num, |
ATCAIfaceCfg | cfg[], | ||
int * | found | ||
) |
discover any CryptoAuth devices on a given logical bus number.This function is currently not implemented.
[in] | bus_num | - logical bus number on which to look for CryptoAuth devices |
[out] | cfg[] | - pointer to head of an array of interface config structures which get filled in by this method |
[out] | *found | - number of devices found on this bus |
ATCA_STATUS hal_kit_cdc_discover_buses | ( | int | cdc_buses[], |
int | max_buses | ||
) |
discover cdc buses available for this hardware this maintains a list of logical to physical bus mappings freeing the application of the a-priori knowledge.This function is currently not implemented.
[in] | cdc_buses | - an array of logical bus numbers |
[in] | max_buses | - maximum number of buses the app wants to attempt to discover |
ATCA_STATUS hal_kit_cdc_discover_devices | ( | int | bus_num, |
ATCAIfaceCfg * | cfg, | ||
int * | found | ||
) |
discover any CryptoAuth devices on a given logical bus number
[in] | bus_num | - logical bus number on which to look for CryptoAuth devices |
[out] | cfg[] | - pointer to head of an array of interface config structures which get filled in by this method |
[out] | *found | - number of devices found on this bus |
ATCA_STATUS hal_kit_cdc_idle | ( | ATCAIface | iface | ) |
Call the idle for kit protocol over USB CDC.
[in] | iface | ATCAIface instance that is the interface object to send the bytes over |
ATCA_STATUS hal_kit_cdc_init | ( | void * | hal, |
ATCAIfaceCfg * | cfg | ||
) |
HAL implementation of Kit USB CDC init.
[in] | hal | pointer to HAL specific data that is maintained by this HAL |
[in] | cfg | pointer to HAL specific configuration data that is used to initialize this HAL |
ATCA_STATUS hal_kit_cdc_post_init | ( | ATCAIface | iface | ) |
HAL implementation of Kit USB CDC post init.
[in] | iface | instance |
ATCA_STATUS hal_kit_cdc_receive | ( | ATCAIface | iface, |
uint8_t * | rxdata, | ||
uint16_t * | rxsize | ||
) |
HAL implementation of kit protocol receive over USB CDC.
[in] | iface | Device to interact with. |
[out] | rxdata | Data received will be returned here. |
[in,out] | rxsize | As input, the size of the rxdata buffer. As output, the number of bytes received. |
ATCA_STATUS hal_kit_cdc_release | ( | void * | hal_data | ) |
Close the physical port for CDC.
[in] | hal_data | The hardware abstraction data specific to this HAL |
ATCA_STATUS hal_kit_cdc_send | ( | ATCAIface | iface, |
uint8_t * | txdata, | ||
int | txlength | ||
) |
HAL implementation of kit protocol send over USB CDC.
[in] | iface | instance |
[in] | txdata | pointer to bytes to send |
[in] | txlength | number of bytes to send |
ATCA_STATUS hal_kit_cdc_sleep | ( | ATCAIface | iface | ) |
Call the sleep for kit protocol over USB CDC.
[in] | iface | ATCAIface instance that is the interface object to send the bytes over |
ATCA_STATUS hal_kit_cdc_wake | ( | ATCAIface | iface | ) |
Call the wake for kit protocol over USB CDC.
[in] | iface | ATCAIface instance that is the interface object to send the bytes over |
ATCA_STATUS hal_kit_phy_num_found | ( | int8_t * | num_found | ) |
Number of USB CDC devices found.
[out] | num_found | Number of USB CDC devices found returned here |
ATCA_STATUS kit_phy_receive | ( | ATCAIface | iface, |
char * | rxdata, | ||
int * | rxsize | ||
) |
HAL implementation of kit protocol receive data.It is called by the top layer.
[in] | iface | instance |
[out] | rxdata | pointer to space to receive the data |
[in,out] | rxsize | ptr to expected number of receive bytes to request |
ATCA_STATUS kit_phy_send | ( | ATCAIface | iface, |
const char * | txdata, | ||
int | txlength | ||
) |
HAL implementation of kit protocol send .It is called by the top layer.
[in] | iface | instance |
[in] | txdata | pointer to bytes to send |
[in] | txlength | number of bytes to send |
atcacdc_t _gCdc |