ft 2.0.0.0
|
Functions | |
void | ft_cfg_setup (ft_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | ft_init (ft_t *ctx, ft_cfg_t *cfg) |
Initialization function. | |
void | ft_generic_write (ft_t *ctx, uint8_t *data_buf, uint16_t len) |
Generic write function. | |
int32_t | ft_generic_read (ft_t *ctx, uint8_t *data_buf, uint16_t max_len) |
Generic read function. | |
void | ft_set_rst_pin (ft_t *ctx, uint8_t state) |
Set RST pin state. | |
void | ft_send_package (ft_t *ctx, uint8_t *data_buf, uint16_t len, uint8_t queue) |
Sends full package to other module. | |
uint8_t | ft_get_data_status (ft_t *ctx) |
Gets current status of data. | |
uint16_t | ft_get_data (ft_t *ctx, uint8_t *data_buf) |
Gets new received data. | |
void | ft_isr_parser (ft_t *ctx, uint8_t rsp_data) |
Collecting and preserving data received via uart interrupt routine. | |
void ft_cfg_setup | ( | ft_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
int32_t ft_generic_read | ( | ft_t * | ctx, |
uint8_t * | 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. |
This function read data of maximum length.
void ft_generic_write | ( | ft_t * | ctx, |
uint8_t * | data_buf, | ||
uint16_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
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 |
Use this function to read received data
uint8_t ft_get_data_status | ( | ft_t * | ctx | ) |
Gets current status of data.
ctx | Click object. |
Use this function to get current status of data
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
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 |
Used this function to collect and preserve 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 |
Use this function to 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 ] |
Use this function to set new RST pin state