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 MBUSSLAVE_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
68 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX )
75#define MBUSSLAVE_RETVAL uint8_t
77#define MBUSSLAVE_OK 0x00
78#define MBUSSLAVE_INIT_ERROR 0xFF
85#define DRV_RX_BUFFER_SIZE 500
#define DRV_RX_BUFFER_SIZE
Definition mbusslave.h:85
#define MBUSSLAVE_RETVAL
Definition mbusslave.h:75
MBUSSLAVE_RETVAL mbusslave_init(mbusslave_t *ctx, mbusslave_cfg_t *cfg)
Initialization function.
void mbusslave_cfg_setup(mbusslave_cfg_t *cfg)
Config Object Initialization function.
int32_t mbusslave_generic_read(mbusslave_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
void mbusslave_generic_write(mbusslave_t *ctx, char *data_buf, uint16_t len)
Generic write function.
uint8_t mbusslave_error_t
Error type.
Definition mbusslave.h:131
Click configuration structure definition.
Definition mbusslave.h:112
uint32_t baud_rate
Definition mbusslave.h:120
bool uart_blocking
Definition mbusslave.h:121
uart_data_bits_t data_bit
Definition mbusslave.h:122
pin_name_t tx_pin
Definition mbusslave.h:116
pin_name_t rx_pin
Definition mbusslave.h:115
uart_stop_bits_t stop_bit
Definition mbusslave.h:124
uart_parity_t parity_bit
Definition mbusslave.h:123
Click ctx object definition.
Definition mbusslave.h:98
uart_t uart
Definition mbusslave.h:101