39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
73#define RS4857_TX_DRV_BUFFER_SIZE 100
74#define RS4857_RX_DRV_BUFFER_SIZE 300
92#define RS4857_MAP_MIKROBUS( cfg, mikrobus ) \
93 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
94 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
95 cfg.de = MIKROBUS( mikrobus, MIKROBUS_AN ); \
96 cfg.re = MIKROBUS( mikrobus, MIKROBUS_RST ); \
97 cfg.ret = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
98 cfg.tet = MIKROBUS( mikrobus, MIKROBUS_INT )
#define RS4857_TX_DRV_BUFFER_SIZE
RS485 7 driver buffer size.
Definition rs4857.h:73
#define RS4857_RX_DRV_BUFFER_SIZE
Definition rs4857.h:74
err_t rs4857_generic_write(rs4857_t *ctx, char *data_in, uint16_t len)
RS485 7 data writing function.
void rs4857_termination_xy_enable(rs4857_t *ctx)
RS485 7 Y-Z termination enable function.
void rs4857_driver_disable(rs4857_t *ctx)
RS485 7 disable the driver function.
void rs4857_termination_xy_disable(rs4857_t *ctx)
RS485 7 Y-Z termination disable function.
void rs4857_receiver_enable(rs4857_t *ctx)
RS485 7 enables the receiver function.
void rs4857_termination_ab_disable(rs4857_t *ctx)
RS485 7 A-B termination disable function.
err_t rs4857_generic_read(rs4857_t *ctx, char *data_out, uint16_t len)
RS485 7 data reading function.
void rs4857_driver_enable(rs4857_t *ctx)
RS485 7 enables the driver function.
void rs4857_termination_ab_enable(rs4857_t *ctx)
RS485 7 A-B termination enable function.
void rs4857_cfg_setup(rs4857_cfg_t *cfg)
RS485 7 configuration object setup function.
err_t rs4857_init(rs4857_t *ctx, rs4857_cfg_t *cfg)
RS485 7 initialization function.
void rs4857_receiver_disable(rs4857_t *ctx)
RS485 7 disable the receiver function.
rs4857_return_value_t
RS485 7 Click return value data.
Definition rs4857.h:154
@ RS4857_ERROR
Definition rs4857.h:156
@ RS4857_OK
Definition rs4857.h:155
RS485 7 Click configuration object.
Definition rs4857.h:129
uint32_t baud_rate
Definition rs4857.h:141
pin_name_t re
Definition rs4857.h:136
bool uart_blocking
Definition rs4857.h:142
pin_name_t tet
Definition rs4857.h:138
uart_data_bits_t data_bit
Definition rs4857.h:143
pin_name_t tx_pin
Definition rs4857.h:132
pin_name_t de
Definition rs4857.h:135
pin_name_t rx_pin
Definition rs4857.h:131
uart_stop_bits_t stop_bit
Definition rs4857.h:145
pin_name_t ret
Definition rs4857.h:137
uart_parity_t parity_bit
Definition rs4857.h:144
RS485 7 Click context object.
Definition rs4857.h:108
digital_out_t re
Definition rs4857.h:111
digital_out_t tet
Definition rs4857.h:113
uart_t uart
Definition rs4857.h:116
digital_out_t de
Definition rs4857.h:110
digital_out_t ret
Definition rs4857.h:112