42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
65#define MUX3_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.a1= MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.a0= MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.en= MIKROBUS( mikrobus, MIKROBUS_CS ); \
69 cfg.a2= MIKROBUS( mikrobus, MIKROBUS_PWM )
76#define MUX3_RETVAL uint8_t
79#define MUX3_INIT_ERROR 0xFF
86#define MUX3_DISABLE_ALL_CHANNELS 0x00
87#define MUX3_ENABLE_CHANNEL_S1 0x01
88#define MUX3_ENABLE_CHANNEL_S2 0x02
89#define MUX3_ENABLE_CHANNEL_S3 0x03
90#define MUX3_ENABLE_CHANNEL_S4 0x04
91#define MUX3_ENABLE_CHANNEL_S5 0x05
92#define MUX3_ENABLE_CHANNEL_S6 0x06
93#define MUX3_ENABLE_CHANNEL_S7 0x07
94#define MUX3_ENABLE_CHANNEL_S8 0x08
#define MUX3_RETVAL
Definition mux3.h:76
void mux3_cfg_setup(mux3_cfg_t *cfg)
Config Object Initialization function.
MUX3_RETVAL mux3_init(mux3_t *ctx, mux3_cfg_t *cfg)
Initialization function.
void mux3_set_channel(mux3_t *ctx, uint8_t select_channel)
Set active MUX channel function.
Click configuration structure definition.
Definition mux3.h:122
pin_name_t a0
Definition mux3.h:126
pin_name_t a2
Definition mux3.h:128
pin_name_t en
Definition mux3.h:127
pin_name_t a1
Definition mux3.h:125
Click ctx object definition.
Definition mux3.h:108
digital_out_t a0
Definition mux3.h:112
digital_out_t a1
Definition mux3.h:111
digital_out_t en
Definition mux3.h:113
digital_out_t a2
Definition mux3.h:114