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 OPTO3_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.out1 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.out2 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.in1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
69 cfg.in2 = MIKROBUS( mikrobus, MIKROBUS_INT );
84 #define OPTO3_HIGH 0x01
85 #define OPTO3_LOW 0x00
void opto3_set_out2(opto3_t *ctx, uint8_t state)
Set output 2.
uint8_t opto3_get_in2(opto3_t *ctx)
Get input 2.
void opto3_cfg_setup(opto3_cfg_t *cfg)
Config Object Initialization function.
void opto3_set_out1(opto3_t *ctx, uint8_t state)
Set output 1.
err_t opto3_init(opto3_t *ctx, opto3_cfg_t *cfg)
Initialization function.
uint8_t opto3_get_in1(opto3_t *ctx)
Get input 1.
Click configuration structure definition.
Definition opto3.h:114
pin_name_t in2
Definition opto3.h:119
pin_name_t out2
Definition opto3.h:117
pin_name_t in1
Definition opto3.h:118
pin_name_t out1
Definition opto3.h:116
Click ctx object definition.
Definition opto3.h:99
digital_in_t in2
Definition opto3.h:106
digital_in_t in1
Definition opto3.h:105
digital_out_t out1
Definition opto3.h:101
digital_out_t out2
Definition opto3.h:102