libtropic
C library for TROPIC01 chip
libtropic API helpers

These functions are usually wrappers around one or more TROPIC01 commands, beside lt_ret_verbose() and lt_print_bytes(). More...

Macros

#define CHIP_ID_FIELD_MAX_SIZE   35
 Upper bound for CHIP_ID fields as hex string (used in lt_print_chip_id()).
 

Functions

const char * lt_ret_verbose (lt_ret_t ret)
 Prints out a name of the returned value. More...
 
lt_ret_t lt_write_whole_R_config (lt_handle_t *h, const struct lt_config_t *config)
 Writes the whole R-Config with the passed config. More...
 
lt_ret_t lt_read_whole_R_config (lt_handle_t *h, struct lt_config_t *config)
 Reads all of the R-Config objects into config. More...
 
lt_ret_t lt_read_whole_I_config (lt_handle_t *h, struct lt_config_t *config)
 Reads all of the I-Config objects into config. More...
 
lt_ret_t lt_write_whole_I_config (lt_handle_t *h, const struct lt_config_t *config)
 Writes the whole I-Config with the passed config. More...
 
lt_ret_t lt_verify_chip_and_start_secure_session (lt_handle_t *h, uint8_t *shipriv, uint8_t *shipub, uint8_t pkey_index)
 Establishes a secure channel between host MCU and TROPIC01. More...
 
lt_ret_t lt_print_bytes (const uint8_t *bytes, const uint16_t length, char *out_buf, uint16_t out_buf_size)
 Prints bytes in hex format to the given output buffer. More...
 
lt_ret_t lt_print_chip_id (const struct lt_chip_id_t *chip_id, int(*print_func)(const char *format,...))
 Interprets fields of CHIP_ID and prints them using the passed printf-like function. More...
 
lt_ret_t lt_do_mutable_fw_update (lt_handle_t *h, const uint8_t *update_data, const uint16_t update_data_size, bank_id_t bank_id)
 Performs mutable firmware update on ABAB and ACAB silicon revisions. More...
 

Variables

struct lt_config_obj_desc_t cfg_desc_table [LT_CONFIG_OBJ_CNT]
 Helper structure, holding string name and address for each configuration object.
 

Detailed Description