39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_analog_in.h"
73#define MUX4_ENABLE_INPUT 0
74#define MUX4_DISABLE_INPUT 1
80#define MUX4_SELECT_INPUT_1 1
81#define MUX4_SELECT_INPUT_2 2
82#define MUX4_SELECT_INPUT_3 3
83#define MUX4_SELECT_INPUT_4 4
84#define MUX4_SELECT_INPUT_5 5
85#define MUX4_SELECT_INPUT_6 6
86#define MUX4_SELECT_INPUT_7 7
87#define MUX4_SELECT_INPUT_8 8
105#define MUX4_MAP_MIKROBUS( cfg, mikrobus ) \
106 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
107 cfg.s2 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
108 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
109 cfg.s0 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
110 cfg.s1 = MIKROBUS( mikrobus, MIKROBUS_INT )
err_t mux4_init(mux4_t *ctx, mux4_cfg_t *cfg)
MUX 4 initialization function.
void mux4_select_input(mux4_t *ctx, uint8_t input)
MUX 4 select input function.
err_t mux4_read_an_pin_voltage(mux4_t *ctx, float *data_out)
MUX 4 read AN pin voltage level function.
void mux4_cfg_setup(mux4_cfg_t *cfg)
MUX 4 configuration object setup function.
void mux4_enable_input(mux4_t *ctx, uint8_t en_state)
MUX 4 enable input function.
err_t mux4_read_an_pin_value(mux4_t *ctx, uint16_t *data_out)
MUX 4 read AN pin value function.
mux4_return_value_t
MUX 4 Click return value data.
Definition mux4.h:152
@ MUX4_ERROR
Definition mux4.h:154
@ MUX4_OK
Definition mux4.h:153
MUX 4 Click configuration object.
Definition mux4.h:135
pin_name_t s2
Definition mux4.h:137
pin_name_t s0
Definition mux4.h:139
analog_in_resolution_t resolution
Definition mux4.h:142
float vref
Definition mux4.h:143
pin_name_t s1
Definition mux4.h:140
pin_name_t en
Definition mux4.h:138
pin_name_t an
Definition mux4.h:136
MUX 4 Click context object.
Definition mux4.h:120
digital_out_t s2
Definition mux4.h:121
digital_out_t en
Definition mux4.h:122
digital_out_t s1
Definition mux4.h:124
analog_in_t adc
Definition mux4.h:126
digital_out_t s0
Definition mux4.h:123