mux4 2.0.0.0
mux4.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  mux4_t
 MUX 4 Click context object. More...
 
struct  mux4_cfg_t
 MUX 4 Click configuration object. More...
 

Macros

#define MUX4_ENABLE_INPUT   0
 MUX 4 enable input flags.
 
#define MUX4_DISABLE_INPUT   1
 
#define MUX4_SELECT_INPUT_1   1
 MUX 4 select input flags.
 
#define MUX4_SELECT_INPUT_2   2
 
#define MUX4_SELECT_INPUT_3   3
 
#define MUX4_SELECT_INPUT_4   4
 
#define MUX4_SELECT_INPUT_5   5
 
#define MUX4_SELECT_INPUT_6   6
 
#define MUX4_SELECT_INPUT_7   7
 
#define MUX4_SELECT_INPUT_8   8
 
#define MUX4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  mux4_return_value_t { MUX4_OK = 0 , MUX4_ERROR = -1 }
 MUX 4 Click return value data. More...
 

Functions

void mux4_cfg_setup (mux4_cfg_t *cfg)
 MUX 4 configuration object setup function.
 
err_t mux4_init (mux4_t *ctx, mux4_cfg_t *cfg)
 MUX 4 initialization function.
 
err_t mux4_read_an_pin_value (mux4_t *ctx, uint16_t *data_out)
 MUX 4 read AN pin value function.
 
err_t mux4_read_an_pin_voltage (mux4_t *ctx, float *data_out)
 MUX 4 read AN pin voltage level function.
 
void mux4_enable_input (mux4_t *ctx, uint8_t en_state)
 MUX 4 enable input function.
 
void mux4_select_input (mux4_t *ctx, uint8_t input)
 MUX 4 select input function.
 

Detailed Description

This file contains API for MUX 4 Click Driver.

Enumeration Type Documentation

◆ mux4_return_value_t

MUX 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
MUX4_OK 
MUX4_ERROR