usbmux 2.1.0.0
usbmux.h File Reference

This file contains API for USB MUX Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  usbmux_t
 USB MUX Click context object. More...
 
struct  usbmux_cfg_t
 USB MUX Click configuration object. More...
 

Macros

#define USBMUX_PIN_STATE_LOW   0x00
 USB MUX pin state setting.
 
#define USBMUX_PIN_STATE_HIGH   0x01
 
#define USBMUX_USB1_SELECT   0x00
 USB MUX USB output selection setting.
 
#define USBMUX_USB2_SELECT   0x01
 
#define USBMUX_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  usbmux_return_value_t { USBMUX_OK = 0 , USBMUX_ERROR = -1 }
 USB MUX Click return value data. More...
 

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

This file contains API for USB MUX Click Driver.

Enumeration Type Documentation

◆ usbmux_return_value_t

USB MUX Click return value data.

Predefined enum values for driver return values.

Enumerator
USBMUX_OK 
USBMUX_ERROR