a5000plugntrust 2.1.0.0
|
This file contains API for A5000 Plug n Trust Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | a5000plugntrust_t |
A5000 Plug n Trust Click context object. More... | |
struct | a5000plugntrust_cfg_t |
A5000 Plug n Trust Click configuration object. More... | |
struct | a5000plugntrust_apdu_t |
APDU data object. More... | |
struct | a5000plugntrust_frame_data_t |
Communication frame data object. More... | |
struct | a5000plugntrust_atr_t |
Data after reset. More... | |
struct | a5000plugntrust_version_info_t |
Version info data. More... | |
Enumerations | |
enum | a5000plugntrust_return_value_t { A5000PLUGNTRUST_OK = 0 , A5000PLUGNTRUST_ERROR = -1 , A5000PLUGNTRUST_ERROR_TIMEOUT = -2 , A5000PLUGNTRUST_ERROR_DATA_OVF = -3 } |
A5000 Plug n Trust Click return value data. More... | |
Functions | |
void | a5000plugntrust_cfg_setup (a5000plugntrust_cfg_t *cfg) |
A5000 Plug n Trust configuration object setup function. | |
err_t | a5000plugntrust_init (a5000plugntrust_t *ctx, a5000plugntrust_cfg_t *cfg) |
A5000 Plug n Trust initialization function. | |
err_t | a5000plugntrust_apdu_write (a5000plugntrust_t *ctx, a5000plugntrust_frame_data_t *frame_data) |
Writing frame data function. | |
err_t | a5000plugntrust_apdu_read (a5000plugntrust_t *ctx, a5000plugntrust_frame_data_t *frame_data) |
Reading frame data function function. | |
err_t | a5000plugntrust_apdu_transfer (a5000plugntrust_t *ctx, a5000plugntrust_frame_data_t *frame_data) |
Write-Read frame data function. | |
void | a5000plugntrust_set_en (a5000plugntrust_t *ctx, uint8_t state) |
Set Enable pin state. | |
void | a5000plugntrust_set_tlv_u8 (uint8_t *buf, uint8_t *buf_len, uint8_t tag, uint8_t value) |
Add TLV data of 1 byte value in payload buffer. | |
void | a5000plugntrust_set_tlv_u16 (uint8_t *buf, uint8_t *buf_len, uint8_t tag, uint16_t value) |
Add TLV data of 2 bytes value in payload buffer. | |
void | a5000plugntrust_set_tlv_u16_optional (uint8_t *buf, uint8_t *buf_len, uint8_t tag, uint16_t value) |
Add TLV data of 2 bytes value in payload buffer if value is greater then 0. | |
void | a5000plugntrust_set_tlv_u32 (uint8_t *buf, uint8_t *buf_len, uint8_t tag, uint32_t value) |
Add TLV data of 4 bytes value in payload buffer. | |
err_t | a5000plugntrust_set_tlv_u8buf (uint8_t *buf, uint8_t *buf_len, uint8_t tag, uint8_t *cmd, uint32_t cmd_len) |
Add TLV data buffer in payload buffer. | |
err_t | a5000plugntrust_set_tlv_u8buf_optional (uint8_t *buf, uint8_t *buf_len, uint8_t tag, uint8_t *cmd, uint32_t cmd_len) |
Add TLV data buffer in payload buffer if TLV data buffer length greater then 0. | |
err_t | a5000plugntrust_get_tlv_u8 (uint8_t *buf, uint32_t *buf_index, uint8_t tag, uint8_t *rsp) |
Parses TLV data from payload buffer to find data for desired tag. | |
err_t | a5000plugntrust_get_tlv_u16 (uint8_t *buf, uint32_t *buf_index, uint8_t tag, uint16_t *rsp) |
Parses TLV data from payload buffer to find data for desired tag. | |
err_t | a5000plugntrust_get_tlv_u8buf (uint8_t *buf, uint32_t *buf_index, uint8_t buf_len, uint8_t tag, uint8_t *rsp, uint32_t *rsp_len) |
Parses TLV data from payload buffer to find data for desired tag. | |
uint8_t | a5000plugntrust_calculate_apdu_size (a5000plugntrust_apdu_t *apdu_data) |
Calculates APDU object size. | |
err_t | a5000plugntrust_end_apdu_session (a5000plugntrust_t *ctx) |
Sends command for ending APDU session. | |
err_t | a5000plugntrust_object_id_list (a5000plugntrust_t *ctx, uint32_t *id_list, uint8_t *list_len) |
Reads all Object ID's from Applet. | |
err_t | a5000plugntrust_sw_reset (a5000plugntrust_t *ctx, a5000plugntrust_atr_t *atr_data) |
Sends request to reset device and reads ATR data. | |
err_t | a5000plugntrust_select_applet (a5000plugntrust_t *ctx, uint8_t ns_encode, a5000plugntrust_version_info_t *ver_info) |
Selects Clicks Applet and returns info that device sends back to host. | |
err_t | a5000plugntrust_select_card_manager (a5000plugntrust_t *ctx, uint8_t rsp, uint8_t *cardmanager_rsp, uint8_t *cardmanager_rsp_len) |
Select card manager. | |
err_t | a5000plugntrust_get_free_memory (a5000plugntrust_t *ctx, uint8_t memory_type, uint16_t *free_memory) |
Reads Applet free memory. | |
err_t | a5000plugntrust_get_random_numbers (a5000plugntrust_t *ctx, uint8_t *random_buf, uint8_t buf_len) |
Get random data. | |
err_t | a5000plugntrust_check_object_exist (a5000plugntrust_t *ctx, uint32_t object_id) |
Check if object exists. | |
err_t | a5000plugntrust_delete_object (a5000plugntrust_t *ctx, uint32_t object_id) |
Delete object. | |
err_t | a5000plugntrust_read_object (a5000plugntrust_t *ctx, uint32_t object_id, uint16_t offset, uint16_t read_len, uint8_t *data_buf, uint32_t *data_len) |
Read object data. | |
err_t | a5000plugntrust_write_binary_object (a5000plugntrust_t *ctx, uint32_t object_id, uint16_t offset, uint16_t data_len, uint8_t *data_buf) |
Create/Write to binary object. | |
err_t | a5000plugntrust_get_applet_info (a5000plugntrust_t *ctx, a5000plugntrust_version_info_t *ver_info) |
Get Version info from Applet. | |
This file contains API for A5000 Plug n Trust Click Driver.