CryptoAuthLib v3.7.6
Microchip CryptoAuthentication Library
 
Loading...
Searching...
No Matches
atca_hal.h File Reference

low-level HAL - methods used to setup indirection to physical layer interface More...

#include <stdlib.h>
#include "atca_config.h"
#include "atca_status.h"
#include "atca_iface.h"

Data Structures

struct  atca_hal_kit_phy_t
 
struct  atca_hal_shm_t
 

Macros

#define ATCA_POLLING_INIT_TIME_MSEC   1
 
#define ATCA_POLLING_FREQUENCY_TIME_MSEC   2
 
#define ATCA_POLLING_MAX_TIME_MSEC   2500
 
#define ATCA_HAL_CONTROL_WAKE   (0U)
 Execute the hardware specific wake - generally only for kits.
 
#define ATCA_HAL_CONTROL_IDLE   (1U)
 Execute the hardware specific idle - generally only for kits.
 
#define ATCA_HAL_CONTROL_SLEEP   (2U)
 Execute the hardware specific sleep - generally only for kits.
 
#define ATCA_HAL_CONTROL_RESET   (3U)
 Execute the hardware specific reset - generally only for kits.
 
#define ATCA_HAL_CONTROL_SELECT   (4U)
 Select the device - assert CS, open device, etc.
 
#define ATCA_HAL_CONTROL_DESELECT   (5U)
 Select the device - de-assert CS, release device, etc.
 
#define ATCA_HAL_CHANGE_BAUD   (6U)
 Change the datarate of the phy.
 
#define ATCA_HAL_FLUSH_BUFFER   (7U)
 If the phy has a buffer make sure all bytes are transmitted.
 
#define ATCA_HAL_CONTROL_DIRECTION   (8U)
 Set the PIN mode (in vs out)
 

Typedefs

typedef void * hal_mutex_t
 Generic mutex type definition for most systems.
 

Functions

ATCA_STATUS hal_iface_init (ATCAIfaceCfg *cfg, ATCAHAL_t **hal, ATCAHAL_t **phy)
 Standard HAL API for ATCA to initialize a physical interface.
 
ATCA_STATUS hal_iface_release (ATCAIfaceType iface_type, void *hal_data)
 releases a physical interface, HAL knows how to interpret hal_data
 
ATCA_STATUS hal_check_wake (const uint8_t *response, int response_size)
 Utility function for hal_wake to check the reply.
 
void atca_delay_ms (uint32_t ms)
 Timer API for legacy implementations.
 
void atca_delay_us (uint32_t delay)
 This function delays for a number of microseconds.
 
void hal_delay_ms (uint32_t delay)
 Timer API implemented at the HAL level.
 
void hal_delay_us (uint32_t delay)
 This function delays for a number of microseconds.
 
ATCA_STATUS hal_create_mutex (void **ppMutex, const char *pName)
 Optional hal interfaces.
 
ATCA_STATUS hal_init_mutex (void *pMutex, bool shared)
 
ATCA_STATUS hal_destroy_mutex (void *pMutex)
 
ATCA_STATUS hal_lock_mutex (void *pMutex)
 
ATCA_STATUS hal_unlock_mutex (void *pMutex)
 
ATCA_STATUS hal_alloc_shared (void **pShared, size_t size, const char *pName, bool *initialized)
 
ATCA_STATUS hal_free_shared (void *pShared, size_t size)
 
ATCA_STATUS hal_iface_register_hal (ATCAIfaceType iface_type, ATCAHAL_t *hal, ATCAHAL_t **old_hal, ATCAHAL_t *phy, ATCAHAL_t **old_phy)
 Register/Replace a HAL with a.
 
uint8_t hal_is_command_word (uint8_t word_address)
 Utility function for hal_wake to check the reply.
 

Detailed Description

low-level HAL - methods used to setup indirection to physical layer interface