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 EEPROM10_NBYTES_PAGE 32
79#define EEPROM10_BLOCK_ADDR_START 0x0000
80#define EEPROM10_BLOCK_ADDR_END 0x0FFFu
87#define EEPROM10_DEVICE_ADDRESS_0 0x50
88#define EEPROM10_DEVICE_ADDRESS_1 0x51
89#define EEPROM10_DEVICE_ADDRESS_2 0x52
90#define EEPROM10_DEVICE_ADDRESS_3 0x53
91#define EEPROM10_DEVICE_ADDRESS_4 0x54
92#define EEPROM10_DEVICE_ADDRESS_5 0x55
93#define EEPROM10_DEVICE_ADDRESS_6 0x56
94#define EEPROM10_DEVICE_ADDRESS_7 0x57
112#define EEPROM10_MAP_MIKROBUS( cfg, mikrobus ) \
113 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
114 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
115 cfg.wp = MIKROBUS( mikrobus, MIKROBUS_PWM )
eeprom10_return_value_t
EEPROM 10 Click return value data.
Definition eeprom10.h:158
@ EEPROM10_OK
Definition eeprom10.h:159
@ EEPROM10_ERROR
Definition eeprom10.h:160
void eeprom10_write_enable(eeprom10_t *ctx)
EEPROM 10 write enable function.
void eeprom10_write_protect(eeprom10_t *ctx)
EEPROM 10 write protection enable function.
err_t eeprom10_read_n_byte(eeprom10_t *ctx, uint16_t address, uint8_t *data_out, uint8_t len)
EEPROM 10 read desired number of data function.
err_t eeprom10_init(eeprom10_t *ctx, eeprom10_cfg_t *cfg)
EEPROM 10 initialization function.
err_t eeprom10_write_byte(eeprom10_t *ctx, uint16_t address, uint8_t data_in)
EEPROM 10 write byte function.
err_t eeprom10_write_page(eeprom10_t *ctx, uint8_t address, uint8_t *data_in)
EEPROM 10 write page function.
void eeprom10_cfg_setup(eeprom10_cfg_t *cfg)
EEPROM 10 configuration object setup function.
err_t eeprom10_write_n_byte(eeprom10_t *ctx, uint16_t address, uint8_t *data_in, uint8_t len)
EEPROM 10 write desired number of data function.
err_t eeprom10_read_byte(eeprom10_t *ctx, uint16_t address, uint8_t *data_out)
EEPROM 10 read byte of data function.
err_t eeprom10_read_page(eeprom10_t *ctx, uint8_t address, uint8_t *data_out)
EEPROM 10 read page of data function.
EEPROM 10 Click configuration object.
Definition eeprom10.h:142
uint32_t i2c_speed
Definition eeprom10.h:148
pin_name_t wp
Definition eeprom10.h:146
pin_name_t scl
Definition eeprom10.h:143
pin_name_t sda
Definition eeprom10.h:144
uint8_t i2c_address
Definition eeprom10.h:149
EEPROM 10 Click context object.
Definition eeprom10.h:125
i2c_master_t i2c
Definition eeprom10.h:130
uint8_t slave_address
Definition eeprom10.h:133
digital_out_t wp
Definition eeprom10.h:127