42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
67#define MBUSMASTER_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
69 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX )
76#define MBUSMASTER_RETVAL uint8_t
78#define MBUSMASTER_OK 0x00
79#define MBUSMASTER_INIT_ERROR 0xFF
86#define DRV_RX_BUFFER_SIZE 500
#define DRV_RX_BUFFER_SIZE
Definition mbusmaster.h:86
#define MBUSMASTER_RETVAL
Definition mbusmaster.h:76
void mbusmaster_generic_write(mbusmaster_t *ctx, char *data_buf, uint16_t len)
Generic write function.
MBUSMASTER_RETVAL mbusmaster_init(mbusmaster_t *ctx, mbusmaster_cfg_t *cfg)
Initialization function.
int32_t mbusmaster_generic_read(mbusmaster_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
void mbusmaster_cfg_setup(mbusmaster_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition mbusmaster.h:117
uint32_t baud_rate
Definition mbusmaster.h:125
bool uart_blocking
Definition mbusmaster.h:126
uart_data_bits_t data_bit
Definition mbusmaster.h:127
pin_name_t tx_pin
Definition mbusmaster.h:121
pin_name_t rx_pin
Definition mbusmaster.h:120
uart_stop_bits_t stop_bit
Definition mbusmaster.h:129
uart_parity_t parity_bit
Definition mbusmaster.h:128
Click ctx object definition.
Definition mbusmaster.h:101
uart_t uart
Definition mbusmaster.h:106