ft
2.0.0.0
|
Functions | |
void | ft_cfg_setup (ft_cfg_t *cfg) |
Config Object Initialization function. More... | |
FT_RETVAL | ft_init (ft_t *ctx, ft_cfg_t *cfg) |
Initialization function. More... | |
void | ft_default_cfg (ft_t *ctx) |
Click Default Configuration function. More... | |
void | ft_generic_write (ft_t *ctx, char *data_buf, uint16_t len) |
Generic write function. More... | |
int32_t | ft_generic_read (ft_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. More... | |
void | ft_set_rst_pin (ft_t *ctx, uint8_t state) |
Set RST pin state. More... | |
void | ft_send_package (ft_t *ctx, uint8_t *data_buf, uint16_t len, uint8_t queue) |
Sends full package to other module. More... | |
uint8_t | ft_get_data_status (ft_t *ctx) |
Gets current status of data. More... | |
uint16_t | ft_get_data (ft_t *ctx, uint8_t *data_buf) |
Gets new received data. More... | |
void | ft_isr_parser (ft_t *ctx, uint8_t rsp_data) |
Collecting and preserving data received via uart interrupt routine. More... | |
void ft_cfg_setup | ( | ft_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void ft_default_cfg | ( | ft_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Ft click.
int32_t ft_generic_read | ( | ft_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
Generic read function.
ctx | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
@description This function read data of maximum length.
void ft_generic_write | ( | ft_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
@description This function write specific number of data.
uint16_t ft_get_data | ( | ft_t * | ctx, |
uint8_t * | data_buf | ||
) |
Gets new received data.
ctx | Click object. |
data_buf | Pointer to the buffer in which the received data will be stored |
@description Use this function for read received data
uint8_t ft_get_data_status | ( | ft_t * | ctx | ) |
Gets current status of data.
ctx | Click object. |
@description Use this function for gets current status of data
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void ft_isr_parser | ( | ft_t * | ctx, |
uint8_t | rsp_data | ||
) |
Collecting and preserving data received via uart interrupt routine.
ctx | Click object. |
rsp_data | One byte data that received via uart |
@description Used this function for collect and preser new data
void ft_send_package | ( | ft_t * | ctx, |
uint8_t * | data_buf, | ||
uint16_t | len, | ||
uint8_t | queue | ||
) |
Sends full package to other module.
ctx | Click object. |
data_buf | Buffer with data that will be sends |
len | Number of data in the data buffer |
queue | Queue value for this package |
@description Use this function for send data to other module
[0] - Header data [ '@' - 0x40 ] [1] - Header data [ '@' - 0x40 ] [2] - Package lenth LSB [3] - Package lenth MSB [4] - Package queue - param(queue) [ 5 -> param( len ) ] - Data for sends [ param( data_buf ) ] [ param( len ) + 1 ] - CRC data LSB [ param( len ) + 2 ] - CRC data MSB
void ft_set_rst_pin | ( | ft_t * | ctx, |
uint8_t | state | ||
) |
Set RST pin state.
ctx | Click object. |
state | RST pin state [ 0 or 1 ] |
@description Use this function for set new RST pin state