rs232 2.0.0.0
Public function

Functions

void rs232_cfg_setup (rs232_cfg_t *cfg)
 Config Object Initialization function.
 
RS232_RETVAL rs232_init (rs232_t *ctx, rs232_cfg_t *cfg)
 Initialization function.
 
void rs232_generic_write (rs232_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t rs232_generic_read (rs232_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
uint8_t rs232_get_cts_state (rs232_t *ctx)
 Get CTS pin state (Clear to send)
 
void rs232_set_rts_state (rs232_t *ctx, uint8_t state)
 Set RTS pin state.
 

Detailed Description

Function Documentation

◆ rs232_cfg_setup()

void rs232_cfg_setup ( rs232_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.

◆ rs232_generic_read()

int32_t rs232_generic_read ( rs232_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

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

◆ rs232_generic_write()

void rs232_generic_write ( rs232_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

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

◆ rs232_get_cts_state()

uint8_t rs232_get_cts_state ( rs232_t * ctx)

Get CTS pin state (Clear to send)

Parameters
ctxClick object.
Returns
CTS pin state

◆ rs232_init()

RS232_RETVAL rs232_init ( rs232_t * ctx,
rs232_cfg_t * cfg )

Initialization function.

Parameters
rs232Click object.
cfgClick configuration structure.

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

◆ rs232_set_rts_state()

void rs232_set_rts_state ( rs232_t * ctx,
uint8_t state )

Set RTS pin state.

Parameters
ctxClick object.
stateRTS (Request to send) pin state