rs4855v 2.0.0.0
RS485 5V Click Driver

API for configuring and manipulating RS485 5V Click driver. More...

Topics

 RS485 5V Device Settings
 Settings for registers of RS485 5V Click driver.
 
 RS485 5V MikroBUS Map
 MikroBUS pin mapping of RS485 5V Click driver.
 

Functions

void rs4855v_cfg_setup (rs4855v_cfg_t *cfg)
 RS485 5V configuration object setup function.
 
err_t rs4855v_init (rs4855v_t *ctx, rs4855v_cfg_t *cfg)
 RS485 5V initialization function.
 
void rs4855v_generic_write (rs4855v_t *ctx, char *data_buf, uint16_t len)
 RS485 5V data writing function.
 
err_t rs4855v_generic_read (rs4855v_t *ctx, char *data_buf, uint16_t max_len)
 RS485 5V data reading function.
 
void rs4855v_send_command (rs4855v_t *ctx, char *command)
 Send command.
 

Detailed Description

API for configuring and manipulating RS485 5V Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ rs4855v_cfg_setup()

void rs4855v_cfg_setup ( rs4855v_cfg_t * cfg)

RS485 5V configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See rs4855v_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ rs4855v_generic_read()

err_t rs4855v_generic_read ( rs4855v_t * ctx,
char * data_buf,
uint16_t max_len )

RS485 5V data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See rs4855v_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer.
See #err_t definition for detailed explanation.
Note
None.

◆ rs4855v_generic_write()

void rs4855v_generic_write ( rs4855v_t * ctx,
char * data_buf,
uint16_t len )

RS485 5V data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See rs4855v_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
Nothing.
Note
None.

◆ rs4855v_init()

err_t rs4855v_init ( rs4855v_t * ctx,
rs4855v_cfg_t * cfg )

RS485 5V initialization function.

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

Parameters
[out]ctx: Click context object. See rs4855v_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See rs4855v_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rs4855v_send_command()

void rs4855v_send_command ( rs4855v_t * ctx,
char * command )

Send command.

This function sends a command by using UART serial interface.

Parameters
ctxClick object.
commandCommand to be sent.