42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
64#define SIGNALRELAY_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.re1= MIKROBUS( mikrobus, MIKROBUS_AN ); \
66 cfg.re2= MIKROBUS( mikrobus, MIKROBUS_RST ); \
67 cfg.re3= MIKROBUS( mikrobus, MIKROBUS_CS ); \
68 cfg.re4= MIKROBUS( mikrobus, MIKROBUS_PWM );
75#define SIGNALRELAY_RETVAL uint8_t
77#define SIGNALRELAY_OK 0x00
78#define SIGNALRELAY_INIT_ERROR 0xFF
85#define SIGNALRELAY_RELAY_1 1
86#define SIGNALRELAY_RELAY_2 2
87#define SIGNALRELAY_RELAY_3 3
88#define SIGNALRELAY_RELAY_4 4
95#define SIGNALRELAY_STATE_ON 0x01
96#define SIGNALRELAY_STATE_OFF 0x00
#define SIGNALRELAY_RETVAL
Definition signalrelay.h:75
SIGNALRELAY_RETVAL signalrelay_init(signalrelay_t *ctx, signalrelay_cfg_t *cfg)
Initialization function.
void signalrelay_default_cfg(signalrelay_t *ctx)
Click Default Configuration function.
void signalrelay_cfg_setup(signalrelay_cfg_t *cfg)
Config Object Initialization function.
void signalrelay_relay_state(signalrelay_t *ctx, uint8_t relay, uint8_t state)
Relays state.
Click configuration structure definition.
Definition signalrelay.h:124
pin_name_t re4
Definition signalrelay.h:130
pin_name_t re3
Definition signalrelay.h:129
pin_name_t re1
Definition signalrelay.h:127
pin_name_t re2
Definition signalrelay.h:128
Click ctx object definition.
Definition signalrelay.h:110
digital_out_t re1
Definition signalrelay.h:113
digital_out_t re2
Definition signalrelay.h:114
digital_out_t re4
Definition signalrelay.h:116
digital_out_t re3
Definition signalrelay.h:115