uartmux4 2.1.0.0
UART MUX 4 Click Driver

API for configuring and manipulating UART MUX 4 Click driver. More...

Topics

 UART MUX 4 Device Settings
 Settings for registers of UART MUX 4 Click driver.
 
 UART MUX 4 MikroBUS Map
 MikroBUS pin mapping of UART MUX 4 Click driver.
 

Functions

void uartmux4_cfg_setup (uartmux4_cfg_t *cfg)
 UART MUX 4 configuration object setup function.
 
err_t uartmux4_init (uartmux4_t *ctx, uartmux4_cfg_t *cfg)
 UART MUX 4 initialization 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.
 
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.
 

Detailed Description

API for configuring and manipulating UART MUX 4 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ uartmux4_cfg_setup()

void uartmux4_cfg_setup ( uartmux4_cfg_t * cfg)

UART MUX 4 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See uartmux4_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ uartmux4_enable_uart1()

void uartmux4_enable_uart1 ( uartmux4_t * ctx)

UART MUX 4 enable the UART 1 function.

This function switches the multiplexer to enable the UART 1 of the 74HC4066D, Quad single-pole single-throw analog switch on the UART MUX 4 Click boardâ„¢.

Parameters
[in]ctx: Click context object. See uartmux4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ uartmux4_enable_uart2()

void uartmux4_enable_uart2 ( uartmux4_t * ctx)

UART MUX 4 enable the UART 2 function.

This function switches the multiplexer to enable the UART 2 of the 74HC4066D, Quad single-pole single-throw analog switch on the UART MUX 4 Click boardâ„¢.

Parameters
[in]ctx: Click context object. See uartmux4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.

◆ uartmux4_generic_read()

err_t uartmux4_generic_read ( uartmux4_t * ctx,
uint8_t * data_out,
uint16_t len )

UART MUX 4 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See uartmux4_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ uartmux4_generic_write()

err_t uartmux4_generic_write ( uartmux4_t * ctx,
uint8_t * data_in,
uint16_t len )

UART MUX 4 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See uartmux4_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ uartmux4_init()

err_t uartmux4_init ( uartmux4_t * ctx,
uartmux4_cfg_t * cfg )

UART MUX 4 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See uartmux4_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See uartmux4_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.