usbmux 2.1.0.0
USB MUX Click Driver

API for configuring and manipulating USB MUX Click driver. More...

Topics

 USB MUX MikroBUS Map
 MikroBUS pin mapping of USB MUX Click driver.
 
 Usbmux_set
 

Functions

void usbmux_cfg_setup (usbmux_cfg_t *cfg)
 USB MUX configuration object setup function.
 
err_t usbmux_init (usbmux_t *ctx, usbmux_cfg_t *cfg)
 USB MUX initialization function.
 
void usbmux_default_cfg (usbmux_t *ctx)
 USB MUX default configuration function.
 
void usbmux_set_oe_pin (usbmux_t *ctx, uint8_t pin_state)
 USB MUX set OE pin output function.
 
void usbmux_set_sel_pin (usbmux_t *ctx, uint8_t pin_state)
 USB MUX set SEL pin output function.
 
void usbmux_enable_output (usbmux_t *ctx)
 USB MUX enable output function.
 
void usbmux_disable_output (usbmux_t *ctx)
 USB MUX disable output function.
 
void usbmux_set_output (usbmux_t *ctx, uint8_t out_sel)
 USB MUX select output function.
 

Detailed Description

API for configuring and manipulating USB MUX 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

◆ usbmux_cfg_setup()

void usbmux_cfg_setup ( usbmux_cfg_t * cfg)

USB MUX configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ usbmux_default_cfg()

void usbmux_default_cfg ( usbmux_t * ctx)

USB MUX default configuration function.

This function executes a default configuration of USB MUX click board.

Parameters
[in]ctx: Click context object. See usbmux_t object definition for detailed explanation.
Returns
Nothing.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ usbmux_disable_output()

void usbmux_disable_output ( usbmux_t * ctx)

USB MUX disable output function.

This function is used to disable output of USB MUX click board.

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

◆ usbmux_enable_output()

void usbmux_enable_output ( usbmux_t * ctx)

USB MUX enable output function.

This function is used to enable output of USB MUX click board.

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

◆ usbmux_init()

err_t usbmux_init ( usbmux_t * ctx,
usbmux_cfg_t * cfg )

USB MUX initialization function.

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

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

◆ usbmux_set_oe_pin()

void usbmux_set_oe_pin ( usbmux_t * ctx,
uint8_t pin_state )

USB MUX set OE pin output function.

This function is used to set output level of the OE pin of USB MUX click board.

Parameters
[in]ctx: Click context object. See usbmux_t object definition for detailed explanation.
[in]pin_state: Output pin level.
Returns
Nothing.
Note
None.

◆ usbmux_set_output()

void usbmux_set_output ( usbmux_t * ctx,
uint8_t out_sel )

USB MUX select output function.

This function is used to select output of USB MUX click board.

Parameters
[in]ctx: Click context object. See usbmux_t object definition for detailed explanation.
[in]out_sel: Output selection.
Returns
Nothing.
Note
None.

◆ usbmux_set_sel_pin()

void usbmux_set_sel_pin ( usbmux_t * ctx,
uint8_t pin_state )

USB MUX set SEL pin output function.

This function is used to set output level of the SEL pin of USB MUX click board.

Parameters
[in]ctx: Click context object. See usbmux_t object definition for detailed explanation.
[in]pin_state: Output pin level.
Returns
Nothing.
Note
None.