28#ifndef RS485ISOLATOR3_H
29#define RS485ISOLATOR3_H
39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
74#define RS485ISOLATOR3_TX_DRV_BUFFER_SIZE 100
75#define RS485ISOLATOR3_RX_DRV_BUFFER_SIZE 300
93#define RS485ISOLATOR3_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
95 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
96 cfg.re = MIKROBUS( mikrobus, MIKROBUS_RST ); \
97 cfg.de = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
98 cfg.inv = MIKROBUS( mikrobus, MIKROBUS_INT );
#define RS485ISOLATOR3_TX_DRV_BUFFER_SIZE
RS485 Isolator 3 driver buffer size.
Definition rs485isolator3.h:74
#define RS485ISOLATOR3_RX_DRV_BUFFER_SIZE
Definition rs485isolator3.h:75
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_default_cfg(rs485isolator3_t *ctx)
RS485 Isolator 3 default configuration function.
err_t rs485isolator3_send_bit_by_bit(rs485isolator3_t *ctx, char *command)
RS485 Isolator 3 send data function.
void rs485isolator3_cfg_setup(rs485isolator3_cfg_t *cfg)
RS485 Isolator 3 configuration object setup 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_disable_receiver_input(rs485isolator3_t *ctx)
RS485 Isolator 3 disable receiver input function.
err_t rs485isolator3_init(rs485isolator3_t *ctx, rs485isolator3_cfg_t *cfg)
RS485 Isolator 3 initialization function.
void rs485isolator3_enable_output(rs485isolator3_t *ctx)
RS485 Isolator 3 enable output function.
err_t rs485isolator3_generic_write(rs485isolator3_t *ctx, char *data_in, uint16_t len)
RS485 Isolator 3 data writing function.
void rs485isolator3_not_inverted_inputs(rs485isolator3_t *ctx)
RS485 Isolator 3 not invert output function.
rs485isolator3_return_value_t
RS485 Isolator 3 Click return value data.
Definition rs485isolator3.h:152
@ RS485ISOLATOR3_OK
Definition rs485isolator3.h:153
@ RS485ISOLATOR3_ERROR
Definition rs485isolator3.h:154
RS485 Isolator 3 Click configuration object.
Definition rs485isolator3.h:128
uint32_t baud_rate
Definition rs485isolator3.h:139
pin_name_t re
Definition rs485isolator3.h:134
bool uart_blocking
Definition rs485isolator3.h:140
uart_data_bits_t data_bit
Definition rs485isolator3.h:141
pin_name_t inv
Definition rs485isolator3.h:136
pin_name_t tx_pin
Definition rs485isolator3.h:131
pin_name_t de
Definition rs485isolator3.h:135
pin_name_t rx_pin
Definition rs485isolator3.h:130
uart_stop_bits_t stop_bit
Definition rs485isolator3.h:143
uart_parity_t parity_bit
Definition rs485isolator3.h:142
RS485 Isolator 3 Click context object.
Definition rs485isolator3.h:108
digital_out_t re
Definition rs485isolator3.h:110
digital_out_t inv
Definition rs485isolator3.h:112
uart_t uart
Definition rs485isolator3.h:115
digital_out_t de
Definition rs485isolator3.h:111