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 CLICKID_CMD_WRITE_MEMORY 0x96
74#define CLICKID_CMD_READ_MEMORY 0x69
75#define CLICKID_CMD_RELEASE 0xAA
93#define CLICKID_MEM_ACCESS_SUCCESS 0xAA
94#define CLICKID_MEM_ACCESS_FAIL 0x55
100#define CLICKID_USER_EEPROM_START 0x0000
101#define CLICKID_USER_EEPROM_END 0x01FF
102#define CLICKID_PAGE_START 0x00
103#define CLICKID_PAGE_END 0x1F
104#define CLICKID_PAGE_SIZE 32
105#define CLICKID_MANIFEST_START_ADDRESS 0x0020
111#define CLICKID_FAMILY_CODE 0xCC
129#define CLICKID_MAP_MIKROBUS( cfg, mikrobus ) \
130 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
131 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS );
clickid_return_value_t
ClickID return value data.
Definition clickid.h:196
@ CLICKID_OK
Definition clickid.h:197
@ CLICKID_ERROR
Definition clickid.h:198
void clickid_deinit(clickid_t *ctx)
ClickID de-initialization function.
err_t clickid_read_information(clickid_t *ctx, clickid_information_t *info)
ClickID read information function.
err_t clickid_read_memory(clickid_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len)
ClickID read memory function.
err_t clickid_write_memory(clickid_t *ctx, uint16_t address, uint8_t *data_in, uint16_t len)
ClickID write memory function.
err_t clickid_init(clickid_t *ctx, clickid_cfg_t *cfg)
ClickID initialization function.
void clickid_cfg_setup(clickid_cfg_t *cfg)
ClickID configuration object setup function.
err_t clickid_check_communication(clickid_t *ctx)
ClickID check communication function.
ClickID configuration object.
Definition clickid.h:182
pin_name_t rst
Definition clickid.h:187
pin_name_t cs
Definition clickid.h:184
ClickID context object.
Definition clickid.h:166
one_wire_rom_address_t rom_addr
Definition clickid.h:173
digital_out_t rst
Definition clickid.h:168
one_wire_t ow
Definition clickid.h:171
ClickID version.
Definition clickid.h:141
uint8_t major
Definition clickid.h:142
uint8_t minor
Definition clickid.h:143