39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
72#define POWERMUX_INPUT_CHANNEL_1_ON 0
73#define POWERMUX_INPUT_CHANNEL_2_ON 1
74#define POWERMUX_INPUT_CHANNEL_OFF 2
75#define POWERMUX_INPUT_CHANNEL_AUTO 3
93#define POWERMUX_MAP_MIKROBUS( cfg, mikrobus ) \
94 cfg.d0 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
95 cfg.d1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
96 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
void powermux_default_cfg(powermux_t *ctx)
Power MUX default configuration function.
uint8_t powermux_int_pin_read(powermux_t *ctx)
Power MUX pin reading function.
void powermux_cfg_setup(powermux_cfg_t *cfg)
Power MUX configuration object setup function.
err_t powermux_init(powermux_t *ctx, powermux_cfg_t *cfg)
Power MUX initialization function.
void powermux_set_mode(powermux_t *ctx, uint8_t mode)
Power MUX mode set function.
powermux_return_value_t
Power MUX Click return value data.
Definition powermux.h:131
@ POWERMUX_OK
Definition powermux.h:132
@ POWERMUX_ERROR
Definition powermux.h:133
Power MUX Click configuration object.
Definition powermux.h:119
pin_name_t d0
Definition powermux.h:120
pin_name_t d1
Definition powermux.h:121
pin_name_t int_pin
Definition powermux.h:122
Power MUX Click context object.
Definition powermux.h:106
digital_out_t d1
Definition powermux.h:108
digital_in_t int_pin
Definition powermux.h:110
digital_out_t d0
Definition powermux.h:107