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_default_cfg (usbuart_t *ctx)
 Click Default Configuration function. More...
 
void usbuart_generic_multi_write (usbuart_t *ctx, usbuart_data_t *data_buf, uart_length_t len)
 Generic multi write function. More...
 
void usbuart_generic_multi_read (usbuart_t *ctx, usbuart_data_t *data_buf, uart_length_t len)
 Generic multi read function. More...
 
usbuart_data_t usbuart_generic_single_read (usbuart_t *ctx)
 Generic single read function. More...
 
void usbuart_generic_single_write (usbuart_t *ctx, usbuart_data_t tx_data)
 Generic single write 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...
 

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_default_cfg()

void usbuart_default_cfg ( usbuart_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for USB_UART click.

◆ usbuart_generic_multi_read()

void usbuart_generic_multi_read ( usbuart_t ctx,
usbuart_data_t data_buf,
uart_length_t  len 
)

Generic multi read function.

Parameters
ctxClick object.
data_bufOutput data buffer.
lenNumber of the bytes in data buffer.

@description This function reads data.

◆ usbuart_generic_multi_write()

void usbuart_generic_multi_write ( usbuart_t ctx,
usbuart_data_t data_buf,
uart_length_t  len 
)

Generic multi write function.

Parameters
ctxClick object.
data_bufInput data buffer
lenNumber of the bytes in the data buffer

@description This function writes data.

◆ usbuart_generic_single_read()

usbuart_data_t usbuart_generic_single_read ( usbuart_t ctx)

Generic single read function.

Parameters
ctxClick object.
Returns
one byte data

@description This function read one byte data.

◆ usbuart_generic_single_write()

void usbuart_generic_single_write ( usbuart_t ctx,
usbuart_data_t  tx_data 
)

Generic single write function.

Parameters
ctxClick object.
tx_dataInput data

@description This function write one byte data.

◆ 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_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)