42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_in.h"
64#define COMPARATOR_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.o1 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
66 cfg.o2 = MIKROBUS( mikrobus, MIKROBUS_INT )
73#define COMPARATOR_RETVAL uint8_t
75#define COMPARATOR_OK 0x00
76#define COMPARATOR_INIT_ERROR 0xFF
83#define COMPARATOR_STATE_LOW 0x00
84#define COMPARATOR_STATE_HIGH 0x01
129 // End constants group
138 // End variable group
#define COMPARATOR_RETVAL
Definition comparator.h:73
void comparator_cfg_setup(comparator_cfg_t *cfg)
Config Object Initialization function.
COMPARATOR_RETVAL comparator_init(comparator_t *ctx, comparator_cfg_t *cfg)
Initialization function.
uint8_t comparator_check_output_two(comparator_t *ctx)
Check state of the o2 pin function.
uint8_t comparator_check_output_one(comparator_t *ctx)
Check state of the o1 pin function.
Click configuration structure definition.
Definition comparator.h:112
pin_name_t o1
Definition comparator.h:115
pin_name_t o2
Definition comparator.h:116
Click ctx object definition.
Definition comparator.h:99
digital_in_t o2
Definition comparator.h:104
digital_in_t o1
Definition comparator.h:103