usbuart
2.0.0.0
|
Functions | |
void | usbuart_cfg_setup (usbuart_cfg_t *cfg) |
Config Object Initialization function. More... | |
USBUART_RETVAL | usbuart_init (usbuart_t *ctx, usbuart_cfg_t *cfg) |
Initialization function. More... | |
void | usbuart_generic_write (usbuart_t *ctx, char *data_buf, uint16_t len) |
Generic write function. More... | |
int32_t | usbuart_generic_read (usbuart_t *ctx, char *data_buf, uint16_t max_len) |
Generic read function. More... | |
void | usbuart_pwr_ctrl (usbuart_t *ctx, uint8_t state) |
Power control. More... | |
void | usbuart_set_cts (usbuart_t *ctx, uint8_t state) |
Set CTS (Clear to send) More... | |
void | usbuart_set_mode (usbuart_t *ctx, uint8_t mode) |
Set device mode. More... | |
uint8_t | usbuart_get_rts (usbuart_t *ctx) |
Set device mode. More... | |
void | usbuart_send_command (usbuart_t *ctx, char *command) |
Function for send command. More... | |
void usbuart_cfg_setup | ( | usbuart_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
int32_t usbuart_generic_read | ( | usbuart_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
Generic read function.
usbuart | Click object. |
data_buf | Data buffer for read data. |
max_len | The maximum length of data that can be read. |
void usbuart_generic_write | ( | usbuart_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
Generic write function.
usbuart | Click object. |
data_buf | Data buffer for sends. |
len | Number of bytes for sends. |
uint8_t usbuart_get_rts | ( | usbuart_t * | ctx | ) |
Set device mode.
ctx | Click object. |
USBUART_RETVAL usbuart_init | ( | usbuart_t * | ctx, |
usbuart_cfg_t * | cfg | ||
) |
Initialization function.
usbuart | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void usbuart_pwr_ctrl | ( | usbuart_t * | ctx, |
uint8_t | state | ||
) |
Power control.
ctx | Click object. |
state | PWR pin state |
void usbuart_send_command | ( | usbuart_t * | ctx, |
char * | command | ||
) |
Function for send command.
ctx | Click object. |
command | Data to be send. |
void usbuart_set_cts | ( | usbuart_t * | ctx, |
uint8_t | state | ||
) |
Set CTS (Clear to send)
ctx | Click object. |
state | CTS pin state |
void usbuart_set_mode | ( | usbuart_t * | ctx, |
uint8_t | mode | ||
) |
Set device mode.
ctx | Click object. |
mode | Device mode (Sleep or Normal) |