39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_one_wire.h"
73#define IBUTTON_CMD_WRITE_SCRATCHPAD 0x4E
74#define IBUTTON_CMD_READ_SCRATCHPAD 0xBE
92#define IBUTTON_FAMILY_CODE 0x01
98#define IBUTTON_MAX_KEY_NUMBER 5
116#define IBUTTON_MAP_MIKROBUS( cfg, mikrobus ) \
117 cfg.gp0 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
118 cfg.gp1 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
119 cfg.st1 = MIKROBUS( mikrobus, MIKROBUS_RST ); \
120 cfg.st2 = MIKROBUS( mikrobus, MIKROBUS_CS );