CryptoAuthLib v3.7.6
Microchip CryptoAuthentication Library
 
Loading...
Searching...
No Matches
hal_swi_gpio.c File Reference

ATCA Hardware abstraction layer for 1WIRE or SWI over GPIO. More...

#include "cryptoauthlib.h"
#include "hal_swi_gpio.h"

Functions

ATCA_STATUS hal_swi_gpio_init (ATCAIface iface, ATCAIfaceCfg *cfg)
 initialize an GPIO interface using given config
 
ATCA_STATUS hal_swi_gpio_post_init (ATCAIface iface)
 HAL implementation of GPIO post init.
 
ATCA_STATUS hal_swi_gpio_send (ATCAIface iface, uint8_t word_address, uint8_t *txdata, int txlength)
 HAL implementation of bit banging send over Harmony.
 
ATCA_STATUS hal_swi_gpio_receive (ATCAIface iface, uint8_t word_address, uint8_t *rxdata, uint16_t *rxlength)
 HAL implementation of bit banging receive from HARMONY.
 
ATCA_STATUS hal_swi_gpio_control (ATCAIface iface, uint8_t option, void *param, size_t paramlen)
 Perform control operations.
 
ATCA_STATUS hal_swi_gpio_release (void *hal_data)
 releases resource if no more communication
 

Detailed Description

ATCA Hardware abstraction layer for 1WIRE or SWI over GPIO.

Function Documentation

◆ hal_swi_gpio_control()

ATCA_STATUS hal_swi_gpio_control ( ATCAIface  iface,
uint8_t  option,
void *  param,
size_t  paramlen 
)

Perform control operations.

Parameters
[in]ifaceInterface to interact with.
[in]optionControl parameter identifier
[in]paramOptional pointer to parameter value
[in]paramlenLength of the parameter
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ hal_swi_gpio_init()

ATCA_STATUS hal_swi_gpio_init ( ATCAIface  iface,
ATCAIfaceCfg cfg 
)

initialize an GPIO interface using given config

Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ hal_swi_gpio_post_init()

ATCA_STATUS hal_swi_gpio_post_init ( ATCAIface  iface)

HAL implementation of GPIO post init.

Parameters
[in]ifaceATCAIface instance
Returns
ATCA_SUCCESS

◆ hal_swi_gpio_receive()

ATCA_STATUS hal_swi_gpio_receive ( ATCAIface  iface,
uint8_t  word_address,
uint8_t *  rxdata,
uint16_t *  rxlength 
)

HAL implementation of bit banging receive from HARMONY.

Parameters
[in]ifaceDevice to interact with.
[in]word_addressdevice transaction type
[out]rxdataData received will be returned here.
[in,out]rxlengthAs input, the size of the rxdata buffer. As output, the number of bytes received.
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ hal_swi_gpio_release()

ATCA_STATUS hal_swi_gpio_release ( void *  hal_data)

releases resource if no more communication

Parameters
[in]hal_data- opaque pointer to hal data structure - known only to the HAL implementation
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ hal_swi_gpio_send()

ATCA_STATUS hal_swi_gpio_send ( ATCAIface  iface,
uint8_t  word_address,
uint8_t *  txdata,
int  txlength 
)

HAL implementation of bit banging send over Harmony.

Parameters
[in]ifaceinstance
[in]word_addressdevice transaction type
[in]txdatapointer to space to bytes to send
[in]txlengthnumber of bytes to send
Returns
ATCA_SUCCESS on success, otherwise an error code.