Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
58 #define POWERMUX_INPUT_CHANNEL_1_ON 0
59 #define POWERMUX_INPUT_CHANNEL_2_ON 1
60 #define POWERMUX_INPUT_CHANNEL_OFF 2
61 #define POWERMUX_INPUT_CHANNEL_AUTO 3
79 #define POWERMUX_MAP_MIKROBUS( cfg, mikrobus ) \
80 cfg.d0 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
81 cfg.d1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
82 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
void powermux_set_mode(powermux_t *ctx, uint8_t mode)
Power MUX mode set function.
void powermux_default_cfg(powermux_t *ctx)
Power MUX default configuration function.
@ POWERMUX_ERROR
Definition: powermux.h:119
pin_name_t d0
Definition: powermux.h:106
void powermux_cfg_setup(powermux_cfg_t *cfg)
Power MUX configuration object setup function.
digital_out_t d0
Definition: powermux.h:93
err_t powermux_init(powermux_t *ctx, powermux_cfg_t *cfg)
Power MUX initialization function.
pin_name_t int_pin
Definition: powermux.h:108
digital_out_t d1
Definition: powermux.h:94
pin_name_t d1
Definition: powermux.h:107
uint8_t powermux_int_pin_read(powermux_t *ctx)
Power MUX pin reading function.
digital_in_t int_pin
Definition: powermux.h:96
Power MUX Click context object.
Definition: powermux.h:92
powermux_return_value_t
Power MUX Click return value data.
Definition: powermux.h:117
Power MUX Click configuration object.
Definition: powermux.h:105
@ POWERMUX_OK
Definition: powermux.h:118