42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
66#define RS4856_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
68 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
69 cfg.re = MIKROBUS( mikrobus, MIKROBUS_CS ); \
70 cfg.de = MIKROBUS( mikrobus, MIKROBUS_INT )
77#define RS4856_RETVAL uint8_t
80#define RS4856_INIT_ERROR 0xFF
87#define DRV_RX_BUFFER_SIZE 500
94#define RS4856_PIN_STATE_LOW 0
95#define RS4856_PIN_STATE_HIGH 1
#define DRV_RX_BUFFER_SIZE
Definition rs4856.h:87
#define RS4856_RETVAL
Definition rs4856.h:77
int16_t rs4856_generic_read(rs4856_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
void rs4856_generic_write(rs4856_t *ctx, char *data_buf, uint16_t len)
Generic write function.
void rs4856_de_pin_set(rs4856_t *ctx, uint8_t pin_state)
Sets DE pin to high or low state.
void rs4856_re_pin_set(rs4856_t *ctx, uint8_t pin_state)
Sets RE pin to high or low state.
void rs4856_cfg_setup(rs4856_cfg_t *cfg)
Config Object Initialization function.
void rs4856_send_command(rs4856_t *ctx, char *command)
RS4856_RETVAL rs4856_init(rs4856_t *ctx, rs4856_cfg_t *cfg)
Initialization function.
uint8_t rs4856_error_t
Error type.
Definition rs4856.h:151
Click configuration structure definition.
Definition rs4856.h:127
uint32_t baud_rate
Definition rs4856.h:140
pin_name_t re
Definition rs4856.h:135
bool uart_blocking
Definition rs4856.h:141
uart_data_bits_t data_bit
Definition rs4856.h:142
pin_name_t tx_pin
Definition rs4856.h:131
pin_name_t de
Definition rs4856.h:136
pin_name_t rx_pin
Definition rs4856.h:130
uart_stop_bits_t stop_bit
Definition rs4856.h:144
uart_parity_t parity_bit
Definition rs4856.h:143
Click ctx object definition.
Definition rs4856.h:108
digital_out_t re
Definition rs4856.h:111
uart_t uart
Definition rs4856.h:116
digital_out_t de
Definition rs4856.h:112