rs2322 2.0.0.0
Public function

Functions

void rs2322_cfg_setup (rs2322_cfg_t *cfg)
 Config Object Initialization function.
 
RS2322_RETVAL rs2322_init (rs2322_t *ctx, rs2322_cfg_t *cfg)
 Initialization function.
 
void rs2322_generic_write (rs2322_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int16_t rs2322_generic_read (rs2322_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void rs2322_set_dcd (rs2322_t *ctx, uint8_t state)
 This function sets DCD pin state.
 
void rs2322_set_cts (rs2322_t *ctx, uint8_t state)
 This function sets CTS pin state.
 
void rs2322_set_ri (rs2322_t *ctx, uint8_t state)
 This function sets RI pin state.
 
uint8_t rs2322_get_rts (rs2322_t *ctx)
 This function get RST pin state.
 
uint8_t rs2322_get_dtr (rs2322_t *ctx)
 This function get DTR pin state.
 
void rs2322_send_command (rs2322_t *ctx, char *command)
 Function for send command.
 

Detailed Description

Function Documentation

◆ rs2322_cfg_setup()

void rs2322_cfg_setup ( rs2322_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.

◆ rs2322_generic_read()

int16_t rs2322_generic_read ( rs2322_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

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

◆ rs2322_generic_write()

void rs2322_generic_write ( rs2322_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

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

◆ rs2322_get_dtr()

uint8_t rs2322_get_dtr ( rs2322_t * ctx)

This function get DTR pin state.

Parameters
ctxClick object.

@description Ready to receive.

◆ rs2322_get_rts()

uint8_t rs2322_get_rts ( rs2322_t * ctx)

This function get RST pin state.

Parameters
ctxClick object.

@description Ready to send.

◆ rs2322_init()

RS2322_RETVAL rs2322_init ( rs2322_t * ctx,
rs2322_cfg_t * cfg )

Initialization function.

Parameters
rs2322Click object.
cfgClick configuration structure.

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

◆ rs2322_send_command()

void rs2322_send_command ( rs2322_t * ctx,
char * command )

Function for send command.

Parameters
ctxClick object.
commandData to be send.

◆ rs2322_set_cts()

void rs2322_set_cts ( rs2322_t * ctx,
uint8_t state )

This function sets CTS pin state.

Parameters
ctxClick object.
stateSet state.

@description Clear to send.

◆ rs2322_set_dcd()

void rs2322_set_dcd ( rs2322_t * ctx,
uint8_t state )

This function sets DCD pin state.

Parameters
ctxClick object.
stateSet state.

@description Carrier Receiving Indication.

◆ rs2322_set_ri()

void rs2322_set_ri ( rs2322_t * ctx,
uint8_t state )

This function sets RI pin state.

Parameters
ctxClick object.
stateSet state.

@description Ring indication.