ATCA Hardware abstraction layer for SPI over Harmony PLIB. More...
#include <string.h>#include <stdio.h>#include "atca_config.h"#include "cryptoauthlib.h"#include "atca_hal.h"#include "atca_device.h"#include "definitions.h"#include "talib/talib_defines.h"#include "talib/talib_fce.h"Functions | |
| ATCA_STATUS | hal_spi_discover_buses (int spi_buses[], int max_buses) |
| discover spi buses available for this hardware this maintains a list of logical to physical bus mappings freeing the application of the a-priori knowledge | |
| ATCA_STATUS | hal_spi_discover_devices (int bus_num, ATCAIfaceCfg cfg[], int *found) |
| discover any TA10x devices on a given logical bus number | |
| ATCA_STATUS | hal_spi_init (ATCAIface iface, ATCAIfaceCfg *cfg) |
| initialize an SPI interface using given config | |
| ATCA_STATUS | hal_spi_post_init (ATCAIface iface) |
| HAL implementation of SPI post init. | |
| ATCA_STATUS | hal_spi_select (ATCAIface iface) |
| HAL implementation to assert the device chip select. | |
| ATCA_STATUS | hal_spi_deselect (ATCAIface iface) |
| HAL implementation to deassert the device chip select. | |
| ATCA_STATUS | hal_spi_send (ATCAIface iface, uint8_t word_address, uint8_t *txdata, int txlength) |
| HAL implementation of SPI send over Harmony. | |
| ATCA_STATUS | hal_spi_receive (ATCAIface iface, uint8_t word_address, uint8_t *rxdata, uint16_t *rxlength) |
| HAL implementation of SPI receive function for HARMONY SPI. | |
| ATCA_STATUS | hal_spi_control (ATCAIface iface, uint8_t option, void *param, size_t paramlen) |
| Perform control operations for the kit protocol. | |
| ATCA_STATUS | hal_spi_release (void *hal_data) |
| manages reference count on given bus and releases resource if no more refences exist | |
ATCA Hardware abstraction layer for SPI over Harmony PLIB.
This code is structured in two parts. Part 1 is the connection of the ATCA HAL API to the physical SPI implementation. Part 2 is the Harmony SPI primitives to set up the interface.
Prerequisite: add SERCOM SPI Master Interrupt support to application in Mplab Harmony 3