rs485isolator3 2.1.0.0
RS485 Isolator 3 Click Driver

API for configuring and manipulating RS485 Isolator 3 Click driver. More...

Topics

 RS485 Isolator 3 Device Settings
 Settings for registers of RS485 Isolator 3 Click driver.
 
 RS485 Isolator 3 MikroBUS Map
 MikroBUS pin mapping of RS485 Isolator 3 Click driver.
 

Functions

void rs485isolator3_cfg_setup (rs485isolator3_cfg_t *cfg)
 RS485 Isolator 3 configuration object setup function.
 
err_t rs485isolator3_init (rs485isolator3_t *ctx, rs485isolator3_cfg_t *cfg)
 RS485 Isolator 3 initialization function.
 
void rs485isolator3_default_cfg (rs485isolator3_t *ctx)
 RS485 Isolator 3 default configuration function.
 
err_t rs485isolator3_generic_write (rs485isolator3_t *ctx, char *data_in, uint16_t len)
 RS485 Isolator 3 data writing function.
 
err_t rs485isolator3_generic_read (rs485isolator3_t *ctx, char *data_out, uint16_t len)
 RS485 Isolator 3 data reading function.
 
void rs485isolator3_enable_receiver_input (rs485isolator3_t *ctx)
 RS485 Isolator 3 enable receiver input function.
 
void rs485isolator3_disable_receiver_input (rs485isolator3_t *ctx)
 RS485 Isolator 3 disable receiver input function.
 
void rs485isolator3_enable_output (rs485isolator3_t *ctx)
 RS485 Isolator 3 enable output function.
 
void rs485isolator3_disable_output (rs485isolator3_t *ctx)
 RS485 Isolator 3 disable output function.
 
void rs485isolator3_inverted_inputs (rs485isolator3_t *ctx)
 RS485 Isolator 3 invert output function.
 
void rs485isolator3_not_inverted_inputs (rs485isolator3_t *ctx)
 RS485 Isolator 3 not invert output function.
 
err_t rs485isolator3_send_bit_by_bit (rs485isolator3_t *ctx, char *command)
 RS485 Isolator 3 send data function.
 

Detailed Description

API for configuring and manipulating RS485 Isolator 3 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

◆ rs485isolator3_cfg_setup()

void rs485isolator3_cfg_setup ( rs485isolator3_cfg_t * cfg)

RS485 Isolator 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ rs485isolator3_default_cfg()

void rs485isolator3_default_cfg ( rs485isolator3_t * ctx)

RS485 Isolator 3 default configuration function.

This function executes a default configuration of RS485 Isolator 3 click board.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ rs485isolator3_disable_output()

void rs485isolator3_disable_output ( rs485isolator3_t * ctx)

RS485 Isolator 3 disable output function.

This function disable output.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rs485isolator3_disable_receiver_input()

void rs485isolator3_disable_receiver_input ( rs485isolator3_t * ctx)

RS485 Isolator 3 disable receiver input function.

This function disables receiver input.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rs485isolator3_enable_output()

void rs485isolator3_enable_output ( rs485isolator3_t * ctx)

RS485 Isolator 3 enable output function.

This function enables output.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rs485isolator3_enable_receiver_input()

void rs485isolator3_enable_receiver_input ( rs485isolator3_t * ctx)

RS485 Isolator 3 enable receiver input function.

This function enables receiver input.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rs485isolator3_generic_read()

err_t rs485isolator3_generic_read ( rs485isolator3_t * ctx,
char * data_out,
uint16_t len )

RS485 Isolator 3 data reading function.

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

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]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.

◆ rs485isolator3_generic_write()

err_t rs485isolator3_generic_write ( rs485isolator3_t * ctx,
char * data_in,
uint16_t len )

RS485 Isolator 3 data writing function.

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

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ rs485isolator3_init()

err_t rs485isolator3_init ( rs485isolator3_t * ctx,
rs485isolator3_cfg_t * cfg )

RS485 Isolator 3 initialization function.

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

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

◆ rs485isolator3_inverted_inputs()

void rs485isolator3_inverted_inputs ( rs485isolator3_t * ctx)

RS485 Isolator 3 invert output function.

This function is used to invert the A and B receiver inputs to correct for reversed cable installation.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rs485isolator3_not_inverted_inputs()

void rs485isolator3_not_inverted_inputs ( rs485isolator3_t * ctx)

RS485 Isolator 3 not invert output function.

This function is used if the cable invert function is not used.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ rs485isolator3_send_bit_by_bit()

err_t rs485isolator3_send_bit_by_bit ( rs485isolator3_t * ctx,
char * command )

RS485 Isolator 3 send data function.

This function is used to send data bit by bit with 100 mS delay.

Parameters
[in]ctx: Click context object. See rs485isolator3_t object definition for detailed explanation.
[in]command: Data buffer for sending.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.