uartmux2 2.0.0.0
uartmux2.h File Reference

This file contains API for UART MUX 2 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  uartmux2_t
 UART MUX 2 Click context object. More...
 
struct  uartmux2_cfg_t
 UART MUX 2 Click configuration object. More...
 

Macros

#define DRV_BUFFER_SIZE   200
 UART MUX 2 description setting.
 
#define UARTMUX2_SUCCESS   0
 UART MUX 2 error status.
 
#define UARTMUX2_ERROR   -1
 
#define UARTMUX2_OP_MODE_NORMAL   0x00
 UART MUX 2 operation mode.
 
#define UARTMUX2_OP_MODE_POWER_DOWN   0x01
 
#define UARTMUX2_CHANNEL_0   0
 UART MUX 2 select channel.
 
#define UARTMUX2_CHANNEL_1   1
 
#define UARTMUX2_CHANNEL_2   2
 
#define UARTMUX2_CHANNEL_3   3
 
#define UARTMUX2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Functions

void uartmux2_cfg_setup (uartmux2_cfg_t *cfg)
 UART MUX 2 configuration object setup function.
 
err_t uartmux2_init (uartmux2_t *ctx, uartmux2_cfg_t *cfg)
 UART MUX 2 initialization function.
 
void uartmux2_default_cfg (uartmux2_t *ctx)
 UART MUX 2 default configuration function.
 
err_t uartmux2_generic_write (uartmux2_t *ctx, char *data_buf, uint16_t len)
 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.
 
err_t uartmux2_set_operation_mode (uartmux2_t *ctx, uint8_t op_mode)
 UART MUX 2 set operation mode function.
 
err_t uartmux2_set_channel (uartmux2_t *ctx, uint8_t mux_ch)
 UART MUX 2 set channel function.
 
err_t uartmux2_send_data (uartmux2_t *ctx, char *tx_data)
 UART MUX 2 data writing function.
 
uint8_t uartmux2_get_inv_status (uartmux2_t *ctx)
 UART MUX 2 get INV pin status function.
 

Detailed Description

This file contains API for UART MUX 2 Click Driver.