eeprom12 2.1.0.0
eeprom12.h File Reference

This file contains API for EEPROM 12 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  eeprom12_t
 EEPROM 12 Click context object. More...
 
struct  eeprom12_cfg_t
 EEPROM 12 Click configuration object. More...
 

Macros

#define EEPROM12_REG_IDENTIFICATION_PAGE   0x0000u
 EEPROM 12 description register.
 
#define EEPROM12_REG_IDENTIFICATION_PAGE_LOCK   0x0200u
 
#define EEPROM12_REG_CONFIG_DEVICE_ADDRESS   0xC000u
 
#define EEPROM12_MEMORY_ADDRESS_MIN   0x0000u
 EEPROM 12 description setting.
 
#define EEPROM12_MEMORY_ADDRESS_MAX   0x7FFFu
 
#define EEPROM12_PAGE_SIZE   64
 
#define EEPROM12_PAGE_MAX   512
 
#define EEPROM12_CDA_DAL_BIT_MASK   0x01
 EEPROM 12 configurable device address register data values.
 
#define EEPROM12_CDA_CEA_BIT_MASK   0x07
 
#define EEPROM12_DEFAULT_CHIP_ENABLE_ADDRESS   0x00
 EEPROM 12 default chip enable address.
 
#define EEPROM12_DEVICE_ADDRESS_MEMORY   0x50
 EEPROM 12 device address setting.
 
#define EEPROM12_DEVICE_ADDRESS_PAGE   0x58
 
#define EEPROM12_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  eeprom12_return_value_t { EEPROM12_OK = 0 , EEPROM12_ERROR = -1 }
 EEPROM 12 Click return value data. More...
 

Functions

void eeprom12_cfg_setup (eeprom12_cfg_t *cfg)
 EEPROM 12 configuration object setup function.
 
err_t eeprom12_init (eeprom12_t *ctx, eeprom12_cfg_t *cfg)
 EEPROM 12 initialization function.
 
void eeprom12_write_enable (eeprom12_t *ctx)
 EEPROM 12 write enable function.
 
void eeprom12_write_disable (eeprom12_t *ctx)
 EEPROM 12 write disable function.
 
err_t eeprom12_generic_write (eeprom12_t *ctx, uint16_t reg, uint8_t *data_in, uint8_t len)
 EEPROM 12 I2C writing function.
 
err_t eeprom12_generic_read (eeprom12_t *ctx, uint16_t reg, uint8_t *data_out, uint8_t len)
 EEPROM 12 I2C reading function.
 
err_t eeprom12_memory_write (eeprom12_t *ctx, uint16_t mem_addr, uint8_t *data_in, uint8_t len)
 EEPROM 12 memory write function.
 
err_t eeprom12_memory_read (eeprom12_t *ctx, uint16_t mem_addr, uint8_t *data_out, uint8_t len)
 EEPROM 12 memory read function.
 
err_t eeprom12_memory_page_write (eeprom12_t *ctx, uint16_t page_addr, uint8_t *data_in, uint8_t len)
 EEPROM 12 memory page write function.
 
err_t eeprom12_memory_page_read (eeprom12_t *ctx, uint16_t page_addr, uint8_t *data_out, uint8_t len)
 EEPROM 12 memory page read function.
 
err_t eeprom12_id_page_write (eeprom12_t *ctx, uint16_t id_page_addr, uint8_t *data_in)
 EEPROM 12 identification page write function.
 
err_t eeprom12_id_page_read (eeprom12_t *ctx, uint16_t id_page_addr, uint8_t *data_out)
 EEPROM 12 identification page read function.
 
err_t eeprom12_config_dev_addr (eeprom12_t *ctx, uint8_t cda, uint8_t dal)
 EEPROM 12 configuate device address function.
 
err_t eeprom12_read_lock_status (eeprom12_t *ctx, uint8_t *lock_status)
 EEPROM 12 read lock status function.
 

Detailed Description

This file contains API for EEPROM 12 Click Driver.

Enumeration Type Documentation

◆ eeprom12_return_value_t

EEPROM 12 Click return value data.

Predefined enum values for driver return values.

Enumerator
EEPROM12_OK 
EEPROM12_ERROR