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 DRV_BUFFER_SIZE 200
92#define RS4855V_MAP_MIKROBUS( cfg, mikrobus ) \
93 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
94 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
95 cfg.rw = MIKROBUS( mikrobus, MIKROBUS_PWM )
#define DRV_BUFFER_SIZE
RS485 5V driver buffer size.
Definition rs4855v.h:74
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_send_command(rs4855v_t *ctx, char *command)
Send command.
err_t rs4855v_generic_read(rs4855v_t *ctx, char *data_buf, uint16_t max_len)
RS485 5V data reading function.
void rs4855v_generic_write(rs4855v_t *ctx, char *data_buf, uint16_t len)
RS485 5V data writing function.
rs4855v_return_value_t
RS485 5V Click return value data.
Definition rs4855v.h:151
@ RS4855V_OK
Definition rs4855v.h:152
@ RS4855V_ERROR
Definition rs4855v.h:153
RS485 5V Click configuration object.
Definition rs4855v.h:126
uint32_t baud_rate
Definition rs4855v.h:138
bool uart_blocking
Definition rs4855v.h:139
uart_data_bits_t data_bit
Definition rs4855v.h:140
pin_name_t tx_pin
Definition rs4855v.h:130
pin_name_t rx_pin
Definition rs4855v.h:129
uart_stop_bits_t stop_bit
Definition rs4855v.h:142
uart_parity_t parity_bit
Definition rs4855v.h:141
pin_name_t rw
Definition rs4855v.h:134
RS485 5V Click context object.
Definition rs4855v.h:105
uart_t uart
Definition rs4855v.h:112
digital_out_t rw
Definition rs4855v.h:108