SEcube
SEcube Open Source Library - Host
|
This file contains L0 functions and structures. More...
Go to the source code of this file.
Data Structures | |
struct | se3_device_info_ |
SEcube Device Information structure. More... | |
struct | se3_device_ |
SEcube Device structure. More... | |
struct | se3_disco_it_ |
Discovery iterator. More... | |
Typedefs | |
typedef struct se3_device_info_ | se3_device_info |
SEcube Device Information structure. | |
typedef struct se3_device_ | se3_device |
SEcube Device structure. | |
typedef struct se3_disco_it_ | se3_disco_it |
Discovery iterator. | |
Functions | |
uint16_t | L0_TXRX (se3_device *device, uint16_t req_cmd, uint16_t req_cmdflags, uint16_t req_len, const uint8_t *req_data, uint16_t *resp_status, uint16_t *resp_len, uint8_t *resp_data) |
Main function for communicating with SEcube device. More... | |
uint16_t | L0_echo (se3_device *device, const uint8_t *data_in, uint16_t data_in_len, uint8_t *data_out) |
Echo service. More... | |
uint16_t | L0_factoryinit (se3_device *device, const uint8_t *serialno) |
Initialise SEcube device. More... | |
uint16_t | L0_open (se3_device *dev, se3_device_info *dev_info, uint32_t timeout) |
Open SEcube device. More... | |
void | L0_close (se3_device *dev) |
Close SEcube device. More... | |
bool | L0_discover_serialno (uint8_t *serialno, se3_device_info *device) |
Discover Serial Number information. More... | |
void | L0_discover_init (se3_disco_it *it) |
Initialise discovery iterator. More... | |
bool | L0_discover_next (se3_disco_it *it) |
Increment discovery iterator. More... | |
This file contains L0 functions and structures.
void L0_close | ( | se3_device * | dev | ) |
Close SEcube device.
[in] | dev | pointer to SEcube device structure |
void L0_discover_init | ( | se3_disco_it * | it | ) |
Initialise discovery iterator.
[in] | it | iterator |
bool L0_discover_next | ( | se3_disco_it * | it | ) |
Increment discovery iterator.
[in] | it | iterator |
Details
bool L0_discover_serialno | ( | uint8_t * | serialno, |
se3_device_info * | device | ||
) |
Discover Serial Number information.
[in] | serialno | Serial Number of SEcube device |
[in] | device | pointer to SEcube device structure |
uint16_t L0_echo | ( | se3_device * | device, |
const uint8_t * | data_in, | ||
uint16_t | data_in_len, | ||
uint8_t * | data_out | ||
) |
Echo service.
[in] | device | pointer to SEcube device structure |
[in] | data_in | Data to be sent |
[in] | data_in_len | Length of input data |
[in] | data_out | Data to be sent |
Details
uint16_t L0_factoryinit | ( | se3_device * | device, |
const uint8_t * | serialno | ||
) |
Initialise SEcube device.
[in] | device | pointer to SEcube device structure |
[in] | serialno | Serial Number to be set on SEcube device |
Before using the SEcube device, this function must be called. It can be used just once-
uint16_t L0_open | ( | se3_device * | dev, |
se3_device_info * | dev_info, | ||
uint32_t | timeout | ||
) |
Open SEcube device.
[in] | dev | pointer to SEcube device structure |
[in] | dev_info | Device Information structure |
[in] | timeout | timeout in ms |
uint16_t L0_TXRX | ( | se3_device * | device, |
uint16_t | req_cmd, | ||
uint16_t | req_cmdflags, | ||
uint16_t | req_len, | ||
const uint8_t * | req_data, | ||
uint16_t * | resp_status, | ||
uint16_t * | resp_len, | ||
uint8_t * | resp_data | ||
) |
Main function for communicating with SEcube device.
[in] | device | pointer to SEcube device structure |
[in] | req_cmd | Command to be executed |
[in] | req_cmdflags | Flag options for the command |
[in] | req_len | Length of the request |
[in] | req_data | array containing the request |
[in] | resp_status | Response status (received response or not) |
[in] | resp_len | Length of the response |
[in] | resp_data | array containing the response |
The function receive payload data from upper levels; segment the data and write it to the device.
resp_len | in: maximum size of resp_data, out: effective size of resp_data |