analogmux3 2.0.0.0
analogmux3.h File Reference

This file contains API for Analog MUX 3 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  analogmux3_t
 Analog MUX 3 Click context object. More...
 
struct  analogmux3_cfg_t
 Analog MUX 3 Click configuration object. More...
 

Macros

#define ANALOGMUX3_SET_CHANNEL_0   0x00
 Analog MUX 3 description setting.
 
#define ANALOGMUX3_SET_CHANNEL_1   0x01
 
#define ANALOGMUX3_SET_CHANNEL_2   0x02
 
#define ANALOGMUX3_SET_CHANNEL_3   0x03
 
#define ANALOGMUX3_SET_CHANNEL_4   0x04
 
#define ANALOGMUX3_SET_CHANNEL_5   0x05
 
#define ANALOGMUX3_SET_CHANNEL_6   0x06
 
#define ANALOGMUX3_SET_CHANNEL_7   0x07
 
#define ANALOGMUX3_SET_NO_CHANNEL   0xFF
 
#define ANALOGMUX3_VAL_CHANNEL_OFF   0x00
 Analog MUX 3 channel value setting.
 
#define ANALOGMUX3_VAL_CHANNEL_0   0x01
 
#define ANALOGMUX3_VAL_CHANNEL_1   0x02
 
#define ANALOGMUX3_VAL_CHANNEL_2   0x04
 
#define ANALOGMUX3_VAL_CHANNEL_3   0x08
 
#define ANALOGMUX3_VAL_CHANNEL_4   0x10
 
#define ANALOGMUX3_VAL_CHANNEL_5   0x20
 
#define ANALOGMUX3_VAL_CHANNEL_6   0x40
 
#define ANALOGMUX3_VAL_CHANNEL_7   0x80
 
#define ANALOGMUX3_SET_DEV_ADDR_0   0x4C
 Analog MUX 3 device address setting.
 
#define ANALOGMUX3_SET_DEV_ADDR_1   0x4D
 
#define ANALOGMUX3_SET_DEV_ADDR_2   0x4E
 
#define ANALOGMUX3_SET_DEV_ADDR_3   0x4F
 
#define ANALOGMUX3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  analogmux3_return_value_t { ANALOGMUX3_OK = 0 , ANALOGMUX3_ERROR = -1 }
 Analog MUX 3 Click return value data. More...
 

Functions

void analogmux3_cfg_setup (analogmux3_cfg_t *cfg)
 Analog MUX 3 configuration object setup function.
 
err_t analogmux3_init (analogmux3_t *ctx, analogmux3_cfg_t *cfg)
 Analog MUX 3 initialization function.
 
err_t analogmux3_default_cfg (analogmux3_t *ctx)
 Analog MUX 3 default configuration function.
 
err_t analogmux3_generic_write (analogmux3_t *ctx, uint8_t data_in)
 Analog MUX 3 data writing function.
 
void analogmux3_hw_reset (analogmux3_t *ctx)
 Analog MUX 3 reset the device function.
 
err_t analogmux3_set_channel (analogmux3_t *ctx, uint8_t mux_ch)
 Analog MUX 3 set channel function.
 
err_t analogmux3_read_an_pin_value (analogmux3_t *ctx, uint16_t *data_out)
 Analog MUX 3 read AN pin value function.
 
err_t analogmux3_read_an_pin_voltage (analogmux3_t *ctx, float *data_out)
 Analog MUX 3 read AN pin voltage level function.
 

Detailed Description

This file contains API for Analog MUX 3 Click Driver.

Enumeration Type Documentation

◆ analogmux3_return_value_t

Analog MUX 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
ANALOGMUX3_OK 
ANALOGMUX3_ERROR