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 RS4858_TX_DRV_BUFFER_SIZE 100
75#define RS4858_RX_DRV_BUFFER_SIZE 300
93#define RS4858_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
95 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
96 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST )
#define RS4858_RX_DRV_BUFFER_SIZE
Definition rs4858.h:75
#define RS4858_TX_DRV_BUFFER_SIZE
RS485 8 driver buffer size.
Definition rs4858.h:74
void rs4858_enable_device(rs4858_t *ctx)
RS485 8 enable the device function.
err_t rs4858_init(rs4858_t *ctx, rs4858_cfg_t *cfg)
RS485 8 initialization function.
void rs4858_disable_device(rs4858_t *ctx)
RS485 8 disable the device function.
void rs4858_cfg_setup(rs4858_cfg_t *cfg)
RS485 8 configuration object setup function.
err_t rs4858_generic_write(rs4858_t *ctx, uint8_t *data_in, uint16_t len)
RS485 8 data writing function.
void rs4858_default_cfg(rs4858_t *ctx)
RS485 8 default configuration function.
err_t rs4858_generic_read(rs4858_t *ctx, uint8_t *data_out, uint16_t len)
RS485 8 data reading function.
rs4858_return_value_t
RS485 8 Click return value data.
Definition rs4858.h:146
@ RS4858_OK
Definition rs4858.h:147
@ RS4858_ERROR
Definition rs4858.h:148
RS485 8 Click configuration object.
Definition rs4858.h:124
uint32_t baud_rate
Definition rs4858.h:133
bool uart_blocking
Definition rs4858.h:134
uart_data_bits_t data_bit
Definition rs4858.h:135
pin_name_t tx_pin
Definition rs4858.h:127
pin_name_t rx_pin
Definition rs4858.h:126
uart_stop_bits_t stop_bit
Definition rs4858.h:137
pin_name_t en
Definition rs4858.h:130
uart_parity_t parity_bit
Definition rs4858.h:136
RS485 8 Click context object.
Definition rs4858.h:106
uart_t uart
Definition rs4858.h:111
digital_out_t en
Definition rs4858.h:108