usbuart  2.0.0.0
Functions
Public function

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...
 
uint16_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...
 

Detailed Description

Function Documentation

◆ usbuart_cfg_setup()

void usbuart_cfg_setup ( usbuart_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ usbuart_generic_read()

uint16_t usbuart_generic_read ( usbuart_t ctx,
char *  data_buf,
uint16_t  max_len 
)

Generic read function.

Parameters
usbuartClick object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

◆ usbuart_generic_write()

void usbuart_generic_write ( usbuart_t ctx,
char *  data_buf,
uint16_t  len 
)

Generic write function.

Parameters
usbuartClick object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

◆ usbuart_get_rts()

uint8_t usbuart_get_rts ( usbuart_t ctx)

Set device mode.

Parameters
ctxClick object.
Returns
RTS (Request to send) pin state

◆ usbuart_init()

USBUART_RETVAL usbuart_init ( usbuart_t ctx,
usbuart_cfg_t cfg 
)

Initialization function.

Parameters
usbuartClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ usbuart_pwr_ctrl()

void usbuart_pwr_ctrl ( usbuart_t ctx,
uint8_t  state 
)

Power control.

Parameters
ctxClick object.
statePWR pin state

◆ usbuart_send_command()

void usbuart_send_command ( usbuart_t ctx,
char *  command 
)

Function for send command.

Parameters
ctxClick object.
commandData to be send.

◆ usbuart_set_cts()

void usbuart_set_cts ( usbuart_t ctx,
uint8_t  state 
)

Set CTS (Clear to send)

Parameters
ctxClick object.
stateCTS pin state

◆ usbuart_set_mode()

void usbuart_set_mode ( usbuart_t ctx,
uint8_t  mode 
)

Set device mode.

Parameters
ctxClick object.
modeDevice mode (Sleep or Normal)