39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
97#define DRV_BUFFER_SIZE 200
111#define UARTMUX2_SUCCESS 0
112#define UARTMUX2_ERROR -1
127#define UARTMUX2_OP_MODE_NORMAL 0x00
128#define UARTMUX2_OP_MODE_POWER_DOWN 0x01
143#define UARTMUX2_CHANNEL_0 0
144#define UARTMUX2_CHANNEL_1 1
145#define UARTMUX2_CHANNEL_2 2
146#define UARTMUX2_CHANNEL_3 3
165#define UARTMUX2_MAP_MIKROBUS( cfg, mikrobus ) \
166 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
167 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
168 cfg.off = MIKROBUS( mikrobus, MIKROBUS_AN ); \
169 cfg.a1 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
170 cfg.a0 = MIKROBUS( mikrobus, MIKROBUS_CS ); \
171 cfg.on = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
172 cfg.inv = MIKROBUS( mikrobus, MIKROBUS_INT );
#define DRV_BUFFER_SIZE
UART MUX 2 description setting.
Definition uartmux2.h:97
err_t uartmux2_generic_write(uartmux2_t *ctx, char *data_buf, uint16_t len)
UART MUX 2 data writing function.
err_t uartmux2_init(uartmux2_t *ctx, uartmux2_cfg_t *cfg)
UART MUX 2 initialization function.
err_t uartmux2_send_data(uartmux2_t *ctx, char *tx_data)
UART MUX 2 data writing function.
err_t uartmux2_generic_read(uartmux2_t *ctx, char *data_buf, uint16_t max_len)
UART MUX 2 data reading function.
void uartmux2_default_cfg(uartmux2_t *ctx)
UART MUX 2 default configuration function.
err_t uartmux2_set_channel(uartmux2_t *ctx, uint8_t mux_ch)
UART MUX 2 set channel function.
err_t uartmux2_set_operation_mode(uartmux2_t *ctx, uint8_t op_mode)
UART MUX 2 set operation mode function.
void uartmux2_cfg_setup(uartmux2_cfg_t *cfg)
UART MUX 2 configuration object setup function.
uint8_t uartmux2_get_inv_status(uartmux2_t *ctx)
UART MUX 2 get INV pin status function.
UART MUX 2 Click configuration object.
Definition uartmux2.h:210
uint32_t baud_rate
Definition uartmux2.h:226
pin_name_t a0
Definition uartmux2.h:220
bool uart_blocking
Definition uartmux2.h:227
uart_data_bits_t data_bit
Definition uartmux2.h:228
pin_name_t on
Definition uartmux2.h:221
pin_name_t inv
Definition uartmux2.h:222
pin_name_t tx_pin
Definition uartmux2.h:214
pin_name_t off
Definition uartmux2.h:218
pin_name_t rx_pin
Definition uartmux2.h:213
uart_stop_bits_t stop_bit
Definition uartmux2.h:230
pin_name_t a1
Definition uartmux2.h:219
uart_parity_t parity_bit
Definition uartmux2.h:229
UART MUX 2 Click context object.
Definition uartmux2.h:182
digital_out_t a0
Definition uartmux2.h:187
digital_out_t a1
Definition uartmux2.h:186
digital_out_t on
Definition uartmux2.h:188
uart_t uart
Definition uartmux2.h:196
digital_in_t inv
Definition uartmux2.h:192
digital_out_t off
Definition uartmux2.h:185