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"
67#define ANALOGMUX5_SEL_CH_1 0x01
68#define ANALOGMUX5_SEL_CH_2 0x02
69#define ANALOGMUX5_SEL_CH_3 0x03
70#define ANALOGMUX5_SEL_CH_4 0x04
88#define ANALOGMUX5_MAP_MIKROBUS( cfg, mikrobus ) \
89 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
90 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS ); \
91 cfg.a0 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
92 cfg.a1 = MIKROBUS( mikrobus, MIKROBUS_INT )
analogmux5_return_value_t
Analog MUX 5 Click return value data.
Definition analogmux5.h:132
@ ANALOGMUX5_OK
Definition analogmux5.h:133
@ ANALOGMUX5_ERROR
Definition analogmux5.h:134
err_t analogmux5_default_cfg(analogmux5_t *ctx)
Analog MUX 5 default configuration function.
err_t analogmux5_select_ch(analogmux5_t *ctx, uint8_t ch_select)
Analog MUX 5 set channel function.
err_t analogmux5_read_an_pin_voltage(analogmux5_t *ctx, float *data_out)
Analog MUX 5 read AN pin voltage level function.
err_t analogmux5_init(analogmux5_t *ctx, analogmux5_cfg_t *cfg)
Analog MUX 5 initialization function.
void analogmux5_disable(analogmux5_t *ctx)
Analog MUX 5 disable function.
err_t analogmux5_read_an_pin_value(analogmux5_t *ctx, uint16_t *data_out)
Analog MUX 5 read AN pin value function.
void analogmux5_cfg_setup(analogmux5_cfg_t *cfg)
Analog MUX 5 configuration object setup function.
void analogmux5_enable(analogmux5_t *ctx)
Analog MUX 5 enable function.
Analog MUX 5 Click configuration object.
Definition analogmux5.h:116
analog_in_resolution_t resolution
Definition analogmux5.h:122
float vref
Definition analogmux5.h:123
pin_name_t a0
Definition analogmux5.h:119
pin_name_t en
Definition analogmux5.h:118
pin_name_t a1
Definition analogmux5.h:120
pin_name_t an
Definition analogmux5.h:117
Analog MUX 5 Click context object.
Definition analogmux5.h:102
digital_out_t a0
Definition analogmux5.h:104
digital_out_t a1
Definition analogmux5.h:105
digital_out_t en
Definition analogmux5.h:103
analog_in_t adc
Definition analogmux5.h:107