eeprom 2.0.0.0
Public Function

Functions

void eeprom_cfg_setup (eeprom_cfg_t *cfg)
 Config Structure Setup function.
 
eeprom_retval_t eeprom_init (eeprom_t *context, eeprom_cfg_t *cfg)
 Click Initialization function.
 
void eeprom_write_byte (eeprom_t *context, uint8_t reg_addr, uint8_t data_in)
 Byte Write function.
 
void eeprom_write_page (eeprom_t *context, uint8_t reg_addr, uint8_t *data_in)
 Page Write function.
 
uint8_t eeprom_read_byte (eeprom_t *context, uint8_t reg_addr)
 Byte Read function.
 
eeprom_retval_t eeprom_read_sequential (eeprom_t *context, uint8_t reg_addr, uint16_t n_bytes, uint8_t *data_out)
 Sequential Read function.
 
void eeprom_write_enable (eeprom_t *context)
 Write Enable function.
 
void eeprom_write_protect (eeprom_t *context)
 Write Protect function.
 

Detailed Description

Function Documentation

◆ eeprom_cfg_setup()

void eeprom_cfg_setup ( eeprom_cfg_t * cfg)

Config Structure Setup function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

◆ eeprom_init()

eeprom_retval_t eeprom_init ( eeprom_t * context,
eeprom_cfg_t * cfg )

Click Initialization function.

Parameters
contextClick object.
cfgClick configuration structure.
Returns
0x00 - Ok, 0xFE - Driver init error.

@description This function initializes peripherals and pins used by EEPROM click.

◆ eeprom_read_byte()

uint8_t eeprom_read_byte ( eeprom_t * context,
uint8_t reg_addr )

Byte Read function.

Parameters
contextClick object.
reg_addrRegister address.
Returns
Data value from the selected register.

@description This function reads one byte data from the desired register.

◆ eeprom_read_sequential()

eeprom_retval_t eeprom_read_sequential ( eeprom_t * context,
uint8_t reg_addr,
uint16_t n_bytes,
uint8_t * data_out )

Sequential Read function.

Parameters
contextClick object.
reg_addrRegister address.
n_bytesNumber of bytes to be read.
data_outMemory where data be stored.
Returns
0x00 - Ok, 0xFE - Invalid number of bytes.

@description This function reads the desired number of bytes starting from the selected register.

◆ eeprom_write_byte()

void eeprom_write_byte ( eeprom_t * context,
uint8_t reg_addr,
uint8_t data_in )

Byte Write function.

Parameters
contextClick object.
reg_addrRegister address.
data_inData to be written.

@description This function writes one byte data to the desired register.

◆ eeprom_write_enable()

void eeprom_write_enable ( eeprom_t * context)

Write Enable function.

Parameters
contextClick object.

@description This function allows data writing to the EEPROM.

◆ eeprom_write_page()

void eeprom_write_page ( eeprom_t * context,
uint8_t reg_addr,
uint8_t * data_in )

Page Write function.

Parameters
contextClick object.
reg_addrRegister address.
data_inData to be written.

@description This function writes 16 bytes data starting from the selected register.

◆ eeprom_write_protect()

void eeprom_write_protect ( eeprom_t * context)

Write Protect function.

Parameters
contextClick object.

@description This function blocks data writing operation to the EEPROM.