CryptoAuthLib
Microchip CryptoAuthentication Library
|
#include <stdio.h>
#include <string.h>
#include <driver/i2c.h>
#include "hal/atca_hal.h"
#include "esp_err.h"
#include "esp_log.h"
Data Structures | |
struct | atcaI2Cmaster |
this is the hal_data for ATCA HAL created using ASF More... | |
Macros | |
#define | SDA_PIN 16 |
#define | SCL_PIN 17 |
#define | ACK_CHECK_EN 0x1 |
#define | ACK_CHECK_DIS 0x0 |
#define | ACK_VAL 0x0 |
#define | NACK_VAL 0x1 |
#define | LOG_LOCAL_LEVEL ESP_LOG_INFO |
#define | MAX_I2C_BUSES 2 |
Typedefs | |
typedef struct atcaI2Cmaster | ATCAI2CMaster_t |
Functions | |
void | hal_i2c_change_baud (ATCAIface iface, uint32_t speed) |
ATCA_STATUS | hal_i2c_init (void *hal, ATCAIfaceCfg *cfg) |
ATCA_STATUS | hal_i2c_post_init (ATCAIface iface) |
ATCA_STATUS | hal_i2c_send (ATCAIface iface, uint8_t *txdata, int txlength) |
ATCA_STATUS | hal_i2c_receive (ATCAIface iface, uint8_t *rxdata, uint16_t *rxlength) |
ATCA_STATUS | hal_i2c_release (void *hal_data) |
ATCA_STATUS | hal_i2c_wake (ATCAIface iface) |
ATCA_STATUS | hal_i2c_idle (ATCAIface iface) |
ATCA_STATUS | hal_i2c_sleep (ATCAIface iface) |
ATCA_STATUS | hal_i2c_discover_buses (int i2c_buses[], int max_buses) |
ATCA_STATUS | hal_i2c_discover_devices (int bus_num, ATCAIfaceCfg *cfg, int *found) |
Variables | |
ATCAI2CMaster_t * | i2c_hal_data [MAX_I2C_BUSES] |
int | i2c_bus_ref_ct = 0 |
i2c_config_t | conf |
const char * | TAG = "HAL_I2C" |
#define ACK_CHECK_DIS 0x0 |
I2C master will not check ack from slave
#define ACK_CHECK_EN 0x1 |
I2C master will check ack from slave
#define ACK_VAL 0x0 |
I2C ack value
#define LOG_LOCAL_LEVEL ESP_LOG_INFO |
#define MAX_I2C_BUSES 2 |
#define NACK_VAL 0x1 |
I2C nack value
#define SCL_PIN 17 |
#define SDA_PIN 16 |
typedef struct atcaI2Cmaster ATCAI2CMaster_t |
void hal_i2c_change_baud | ( | ATCAIface | iface, |
uint32_t | speed | ||
) |
ATCA_STATUS hal_i2c_discover_buses | ( | int | i2c_buses[], |
int | max_buses | ||
) |
ATCA_STATUS hal_i2c_discover_devices | ( | int | bus_num, |
ATCAIfaceCfg * | cfg, | ||
int * | found | ||
) |
ATCA_STATUS hal_i2c_idle | ( | ATCAIface | iface | ) |
ATCA_STATUS hal_i2c_init | ( | void * | hal, |
ATCAIfaceCfg * | cfg | ||
) |
ATCA_STATUS hal_i2c_post_init | ( | ATCAIface | iface | ) |
ATCA_STATUS hal_i2c_receive | ( | ATCAIface | iface, |
uint8_t * | rxdata, | ||
uint16_t * | rxlength | ||
) |
ATCA_STATUS hal_i2c_release | ( | void * | hal_data | ) |
ATCA_STATUS hal_i2c_send | ( | ATCAIface | iface, |
uint8_t * | txdata, | ||
int | txlength | ||
) |
ATCA_STATUS hal_i2c_sleep | ( | ATCAIface | iface | ) |
ATCA_STATUS hal_i2c_wake | ( | ATCAIface | iface | ) |
i2c_config_t conf |
int i2c_bus_ref_ct = 0 |
ATCAI2CMaster_t* i2c_hal_data[MAX_I2C_BUSES] |
const char* TAG = "HAL_I2C" |