42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
64#define RELAY_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.rel2= MIKROBUS( mikrobus, MIKROBUS_CS ); \
66 cfg.rel1= MIKROBUS( mikrobus, MIKROBUS_PWM );
73#define RELAY_RETVAL uint8_t
76#define RELAY_INIT_ERROR 0xFF
83#define RELAY_STATE_ON 1
84#define RELAY_STATE_OFF 0
#define RELAY_RETVAL
Definition relay.h:73
RELAY_RETVAL relay_init(relay_t *ctx, relay_cfg_t *cfg)
Initialization function.
void relay_set_state(relay_t *ctx, uint8_t relay, uint8_t state)
Relay set state.
void relay_cfg_setup(relay_cfg_t *cfg)
Config Object Initialization function.
void relay_default_cfg(relay_t *ctx)
Click Default Configuration function.
Click configuration structure definition.
Definition relay.h:118
pin_name_t rel2
Definition relay.h:121
pin_name_t rel1
Definition relay.h:122
Click ctx object definition.
Definition relay.h:106
digital_out_t rel2
Definition relay.h:109
digital_out_t rel1
Definition relay.h:110