CryptoAuthLib
Microchip CryptoAuthentication Library
|
ATCA Hardware abstraction layer for PIC32MX695F512H I2C over plib drivers. More...
#include <plib.h>
#include <stdio.h>
#include <string.h>
#include "hal/atca_hal.h"
#include "hal/hal_pic32mx695f512h_i2c.h"
Functions | |
void | i2c_write (I2C_MODULE i2c_id, uint8_t address, uint8_t *data, int len) |
ATCA_STATUS | i2c_read (I2C_MODULE i2c_id, uint8_t address, uint8_t *data, uint16_t len) |
ATCA_STATUS | hal_i2c_discover_buses (int i2c_buses[], int max_buses) |
discover i2c buses available for this hardware this maintains a list of logical to physical bus mappings freeing the application of the prior knowledge More... | |
ATCA_STATUS | hal_i2c_discover_devices (int bus_num, ATCAIfaceCfg cfg[], int *found) |
discover any CryptoAuth devices on a given logical bus number More... | |
ATCA_STATUS | hal_i2c_init (void *hal, ATCAIfaceCfg *cfg) |
initialize an I2C interface using given config More... | |
ATCA_STATUS | hal_i2c_post_init (ATCAIface iface) |
HAL implementation of I2C post init. More... | |
ATCA_STATUS | hal_i2c_send (ATCAIface iface, uint8_t *txdata, int txlength) |
HAL implementation of I2C send over ASF. More... | |
ATCA_STATUS | hal_i2c_receive (ATCAIface iface, uint8_t *rxdata, uint16_t *rxlength) |
HAL implementation of I2C receive function for ASF I2C. More... | |
void | change_i2c_speed (ATCAIface iface, uint32_t speed) |
method to change the bus speed of I2C More... | |
ATCA_STATUS | hal_i2c_wake (ATCAIface iface) |
wake up CryptoAuth device using I2C bus More... | |
ATCA_STATUS | hal_i2c_idle (ATCAIface iface) |
idle CryptoAuth device using I2C bus More... | |
ATCA_STATUS | hal_i2c_sleep (ATCAIface iface) |
sleep CryptoAuth device using I2C bus More... | |
ATCA_STATUS | hal_i2c_release (void *hal_data) |
manages reference count on given bus and releases resource if no more refences exist More... | |
ATCA Hardware abstraction layer for PIC32MX695F512H I2C over plib drivers.
This code is structured in two parts. Part 1 is the connection of the ATCA HAL API to the physical I2C implementation. Part 2 is the xxx I2C primitives to set up the interface.
Prerequisite: