Libtropic API
SDK for the TROPIC01 secure element
Version: master (latest)
Loading...
Searching...
No Matches
libtropic_port.h File Reference

Header file with layer 1 interfaces which are defined based on host platform. More...

#include <stdlib.h>
#include "libtropic_common.h"
Include dependency graph for libtropic_port.h:
This graph shows which files directly or indirectly include this file:

Macros

#define LT_DEVICE_PATH_MAX_LEN   256
 Max length of a path to a device in the device tree.
 

Functions

lt_ret_t lt_port_init (lt_l2_state_t *s2)
 Platform defined init function. Init resources and set pins as needed.
 
lt_ret_t lt_port_deinit (lt_l2_state_t *s2)
 Platform defined deinit function. Deinit resources and clear pins as needed.
 
lt_ret_t lt_port_spi_csn_low (lt_l2_state_t *s2)
 Sets chip select pin low, platform defined function.
 
lt_ret_t lt_port_spi_csn_high (lt_l2_state_t *s2)
 Sets chip select pin high, platform defined function.
 
lt_ret_t lt_port_spi_transfer (lt_l2_state_t *s2, uint8_t offset, uint16_t tx_len, uint32_t timeout_ms)
 Does L1 transfer, platform defined function.
 
lt_ret_t lt_port_delay (lt_l2_state_t *s2, uint32_t ms)
 Platform defined function for delay, specifies what host platform should do when libtropic's functions need some delay.
 
lt_ret_t lt_port_delay_on_int (lt_l2_state_t *s2, uint32_t ms)
 Platform defined function used to specify reading of an interrupt pin, used as a signal that chip has a response.
 
lt_ret_t lt_port_random_bytes (lt_l2_state_t *s2, void *buff, size_t count)
 Fill buffer with random bytes, platform defined function.
 

Detailed Description

License
For the license see file LICENSE.txt file in the root directory of this source tree.