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_i2c_master.h"
73#define EEPROM11_SET_WP_BLOCK0 0x31
74#define EEPROM11_SET_WP_BLOCK1 0x34
75#define EEPROM11_SET_WP_BLOCK2 0x35
76#define EEPROM11_SET_WP_BLOCK3 0x30
77#define EEPROM11_CLEAR_ALL_WP 0x33
78#define EEPROM11_READ_SWP0 0x31
79#define EEPROM11_READ_SWP1 0x34
80#define EEPROM11_READ_SWP2 0x35
81#define EEPROM11_READ_SWP3 0x30
82#define EEPROM11_SET_PAGE_ADDR_0 0x36
83#define EEPROM11_SET_PAGE_ADDR_1 0x37
84#define EEPROM11_READ_PAGE_ADDR 0x36
103#define EEPROM11_DEVICE_ADDRESS_0 0x50
104#define EEPROM11_DEVICE_ADDRESS_1 0x51
105#define EEPROM11_DEVICE_ADDRESS_2 0x52
106#define EEPROM11_DEVICE_ADDRESS_3 0x53
107#define EEPROM11_DEVICE_ADDRESS_4 0x54
108#define EEPROM11_DEVICE_ADDRESS_5 0x55
109#define EEPROM11_DEVICE_ADDRESS_6 0x56
110#define EEPROM11_DEVICE_ADDRESS_7 0x57
127#define EEPROM11_MAP_MIKROBUS( cfg, mikrobus ) \
128 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
129 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
eeprom11_return_value_t
EEPROM 11 Click return value data.
Definition eeprom11.h:167
@ EEPROM11_ERROR
Definition eeprom11.h:169
@ EEPROM11_OK
Definition eeprom11.h:168
err_t eeprom11_clear_page(eeprom11_t *ctx, uint8_t address)
EEPROM 11 page clear function.
err_t eeprom11_set_wp(eeprom11_t *ctx, uint8_t block_addr)
EEPROM 11 set write protection function.
err_t eeprom11_generic_write(eeprom11_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
EEPROM 11 I2C writing function.
void eeprom11_cfg_setup(eeprom11_cfg_t *cfg)
EEPROM 11 configuration object setup function.
err_t eeprom11_init(eeprom11_t *ctx, eeprom11_cfg_t *cfg)
EEPROM 11 initialization function.
err_t eeprom11_generic_read(eeprom11_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
EEPROM 11 I2C reading function.
err_t eeprom11_page_write(eeprom11_t *ctx, uint8_t address, uint8_t *data_in)
EEPROM 11 page write function.
err_t eeprom11_set_page_addr(eeprom11_t *ctx, uint8_t page_addr)
EEPROM 11 set page address function.
err_t eeprom11_clear_wp(eeprom11_t *ctx)
EEPROM 11 clear write protection function.
err_t eeprom11_default_cfg(eeprom11_t *ctx)
EEPROM 11 default configuration function.
EEPROM 11 Click configuration object.
Definition eeprom11.h:153
uint32_t i2c_speed
Definition eeprom11.h:157
pin_name_t scl
Definition eeprom11.h:154
pin_name_t sda
Definition eeprom11.h:155
uint8_t i2c_address
Definition eeprom11.h:158
EEPROM 11 Click context object.
Definition eeprom11.h:139
i2c_master_t i2c
Definition eeprom11.h:141
uint8_t slave_address
Definition eeprom11.h:144