Abstract interface to all CryptoAuth device types. This interface connects to the HAL implementation and abstracts the physical details of the device communication from all the upper layers of CryptoAuthLib.
More...
|
ATCA_STATUS | _atinit (ATCAIface ca_iface, ATCAHAL_t *hal) |
|
ATCA_STATUS | initATCAIface (ATCAIfaceCfg *cfg, ATCAIface ca_iface) |
| Initializer for ATCAIface objects. More...
|
|
ATCAIface | newATCAIface (ATCAIfaceCfg *cfg) |
| Constructor for ATCAIface objects. More...
|
|
ATCA_STATUS | atinit (ATCAIface ca_iface) |
| Performs the HAL initialization by calling intermediate HAL wrapper function. If using the basic API, the atcab_init() function should be called instead. More...
|
|
ATCA_STATUS | atsend (ATCAIface ca_iface, uint8_t *txdata, int txlength) |
| Sends the data to the device by calling intermediate HAL wrapper function. More...
|
|
ATCA_STATUS | atreceive (ATCAIface ca_iface, uint8_t *rxdata, uint16_t *rxlength) |
| Receives data from the device by calling intermediate HAL wrapper function. More...
|
|
ATCA_STATUS | atwake (ATCAIface ca_iface) |
| Wakes up the device by calling intermediate HAL wrapper function. If using the basic API, the atcab_wakeup() function should be used instead. More...
|
|
ATCA_STATUS | atidle (ATCAIface ca_iface) |
| Puts the device into idle state by calling intermediate HAL wrapper function. If using the basic API, the atcab_idle() function should be used instead. More...
|
|
ATCA_STATUS | atsleep (ATCAIface ca_iface) |
| Puts the device into sleep state by calling intermediate HAL wrapper function. If using the basic API, the atcab_sleep() function should be used instead. More...
|
|
ATCAIfaceCfg * | atgetifacecfg (ATCAIface ca_iface) |
| Returns the logical interface configuration for the device. More...
|
|
void * | atgetifacehaldat (ATCAIface ca_iface) |
| Returns the HAL data pointer for the device. More...
|
|
ATCA_STATUS | releaseATCAIface (ATCAIface ca_iface) |
| Instruct the HAL driver to release any resources associated with this interface. More...
|
|
void | deleteATCAIface (ATCAIface *ca_iface) |
| Instruct the HAL driver to release any resources associated with this interface, then delete the object. More...
|
|
ATCA_STATUS | atpostinit (ATCAIface ca_iface) |
|
Abstract interface to all CryptoAuth device types. This interface connects to the HAL implementation and abstracts the physical details of the device communication from all the upper layers of CryptoAuthLib.
◆ ATCA_POST_DELAY_MSEC
#define ATCA_POST_DELAY_MSEC 25 |
◆ ATCAIface
◆ ATCAIfaceType
Enumerator |
---|
ATCA_I2C_IFACE | |
ATCA_SWI_IFACE | |
ATCA_UART_IFACE | |
ATCA_SPI_IFACE | |
ATCA_HID_IFACE | |
ATCA_CUSTOM_IFACE | |
ATCA_UNKNOWN_IFACE | |
◆ _atinit()
◆ atgetifacecfg()
Returns the logical interface configuration for the device.
- Parameters
-
[in] | ca_iface | Device interface. |
- Returns
- Logical interface configuration.
◆ atgetifacehaldat()
void * atgetifacehaldat |
( |
ATCAIface |
ca_iface | ) |
|
Returns the HAL data pointer for the device.
- Parameters
-
[in] | ca_iface | Device interface. |
- Returns
- HAL data pointer.
◆ atidle()
Puts the device into idle state by calling intermediate HAL wrapper function. If using the basic API, the atcab_idle() function should be used instead.
- Parameters
-
[in] | ca_iface | Device to interact with. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ atinit()
Performs the HAL initialization by calling intermediate HAL wrapper function. If using the basic API, the atcab_init() function should be called instead.
- Parameters
-
[in] | ca_iface | Device to interact with. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ atpostinit()
◆ atreceive()
Receives data from the device by calling intermediate HAL wrapper function.
- Parameters
-
[in] | ca_iface | Device to interact with. |
[out] | rxdata | Data received will be returned here. |
[in,out] | rxlength | As input, the size of the rxdata buffer. As output, the number of bytes received. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ atsend()
Sends the data to the device by calling intermediate HAL wrapper function.
- Parameters
-
[in] | ca_iface | Device to interact with. |
[in] | txdata | Data to be transmitted to the device. |
[in] | txlength | Number of bytes to be transmitted to the device. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ atsleep()
Puts the device into sleep state by calling intermediate HAL wrapper function. If using the basic API, the atcab_sleep() function should be used instead.
- Parameters
-
[in] | ca_iface | Device to interact with. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ atwake()
Wakes up the device by calling intermediate HAL wrapper function. If using the basic API, the atcab_wakeup() function should be used instead.
- Parameters
-
[in] | ca_iface | Device to interact with. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ deleteATCAIface()
Instruct the HAL driver to release any resources associated with this interface, then delete the object.
- Parameters
-
[in] | ca_iface | Device interface. |
◆ initATCAIface()
Initializer for ATCAIface objects.
- Parameters
-
[in] | cfg | Logical configuration for the interface |
[in] | ca_iface | Interface structure to initialize. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.
◆ newATCAIface()
Constructor for ATCAIface objects.
- Parameters
-
[in] | cfg | Logical configuration for the interface |
- Returns
- New interface instance on success. NULL on failure.
◆ releaseATCAIface()
Instruct the HAL driver to release any resources associated with this interface.
- Parameters
-
[in] | ca_iface | Device interface. |
- Returns
- ATCA_SUCCESS on success, otherwise an error code.