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 UARTMUX4_TX_DRV_BUFFER_SIZE 100
75#define UARTMUX4_RX_DRV_BUFFER_SIZE 300
93#define UARTMUX4_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
95 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
96 cfg.sw = MIKROBUS( mikrobus, MIKROBUS_RST )
#define UARTMUX4_RX_DRV_BUFFER_SIZE
Definition uartmux4.h:75
#define UARTMUX4_TX_DRV_BUFFER_SIZE
UART MUX 4 driver buffer size.
Definition uartmux4.h:74
err_t uartmux4_init(uartmux4_t *ctx, uartmux4_cfg_t *cfg)
UART MUX 4 initialization function.
void uartmux4_cfg_setup(uartmux4_cfg_t *cfg)
UART MUX 4 configuration object setup function.
void uartmux4_enable_uart1(uartmux4_t *ctx)
UART MUX 4 enable the UART 1 function.
void uartmux4_enable_uart2(uartmux4_t *ctx)
UART MUX 4 enable the UART 2 function.
err_t uartmux4_generic_write(uartmux4_t *ctx, uint8_t *data_in, uint16_t len)
UART MUX 4 data writing function.
err_t uartmux4_generic_read(uartmux4_t *ctx, uint8_t *data_out, uint16_t len)
UART MUX 4 data reading function.
UART MUX 4 Click configuration object.
Definition uartmux4.h:124
uint32_t baud_rate
Definition uartmux4.h:133
bool uart_blocking
Definition uartmux4.h:134
uart_data_bits_t data_bit
Definition uartmux4.h:135
pin_name_t tx_pin
Definition uartmux4.h:127
pin_name_t rx_pin
Definition uartmux4.h:126
uart_stop_bits_t stop_bit
Definition uartmux4.h:137
pin_name_t sw
Definition uartmux4.h:130
uart_parity_t parity_bit
Definition uartmux4.h:136
UART MUX 4 Click context object.
Definition uartmux4.h:106
digital_out_t sw
Definition uartmux4.h:108
uart_t uart
Definition uartmux4.h:111
uartmux4_return_value_t
UART MUX 4 Click return value data.
Definition uartmux4.h:146
@ UARTMUX4_ERROR
Definition uartmux4.h:148
@ UARTMUX4_OK
Definition uartmux4.h:147