eeprom8 2.0.0.0
EEPROM 8 Click Driver

API for configuring and manipulating EEPROM 8 Click driver. More...

Topics

 EEPROM 8 Registers Settings
 Settings for registers of EEPROM 8 Click driver.
 
 EEPROM 8 MikroBUS Map
 MikroBUS pin mapping of EEPROM 8 Click driver.
 

Macros

#define EEPROM8_WRITE_ENABLE   0
 
#define EEPROM8_WRITE_PROTECT   1
 

Functions

void eeprom8_cfg_setup (eeprom8_cfg_t *cfg)
 EEPROM 8 configuration object setup function.
 
err_t eeprom8_init (eeprom8_t *ctx, eeprom8_cfg_t *cfg)
 EEPROM 8 initialization function.
 
err_t eeprom8_write_byte (eeprom8_t *ctx, uint16_t reg_addr, uint8_t data_in)
 Byte Write function.
 
err_t eeprom8_write_page (eeprom8_t *ctx, uint16_t reg_addr, uint8_t *data_in)
 Page Write function.
 
err_t eeprom8_read_random_byte (eeprom8_t *ctx, uint16_t reg_addr, uint8_t *data_out)
 Random Byte Read function.
 
err_t eeprom8_read_current_byte (eeprom8_t *ctx, uint8_t *data_out)
 Byte Read function.
 
err_t eeprom8_read_sequential (eeprom8_t *ctx, uint16_t reg_addr, uint16_t n_bytes, uint8_t *data_out)
 Sequential Read function.
 
void eeprom8_write_enable (eeprom8_t *ctx)
 Write Enable function.
 
void eeprom8_write_protect (eeprom8_t *ctx)
 Write Protect function.
 

Detailed Description

API for configuring and manipulating EEPROM 8 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Macro Definition Documentation

◆ EEPROM8_WRITE_ENABLE

#define EEPROM8_WRITE_ENABLE   0

◆ EEPROM8_WRITE_PROTECT

#define EEPROM8_WRITE_PROTECT   1

Function Documentation

◆ eeprom8_cfg_setup()

void eeprom8_cfg_setup ( eeprom8_cfg_t * cfg)

EEPROM 8 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See eeprom8_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ eeprom8_init()

err_t eeprom8_init ( eeprom8_t * ctx,
eeprom8_cfg_t * cfg )

EEPROM 8 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See eeprom8_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See eeprom8_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom8_read_current_byte()

err_t eeprom8_read_current_byte ( eeprom8_t * ctx,
uint8_t * data_out )

Byte Read function.

This function reads one byte data based on internal address pointer.

Parameters
[in]ctxClick object.
[out]data_outOutput read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom8_read_random_byte()

err_t eeprom8_read_random_byte ( eeprom8_t * ctx,
uint16_t reg_addr,
uint8_t * data_out )

Random Byte Read function.

This function reads one byte data from the desired register.

Parameters
[in]ctxClick object.
[in]reg_addrRegister address.
[out]data_outOutput read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom8_read_sequential()

err_t eeprom8_read_sequential ( eeprom8_t * ctx,
uint16_t reg_addr,
uint16_t n_bytes,
uint8_t * data_out )

Sequential Read function.

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

Parameters
[in]ctxClick object.
[in]reg_addrRegister address.
[in]n_bytesNumber of bytes to be read.
[out]data_outOutput read data buffer.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom8_write_byte()

err_t eeprom8_write_byte ( eeprom8_t * ctx,
uint16_t reg_addr,
uint8_t data_in )

Byte Write function.

This function writes one byte data to the desired register.

Parameters
[in]ctxClick object.
[in]reg_addrRegister address.
[in]data_inData to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation
Note
None.

◆ eeprom8_write_enable()

void eeprom8_write_enable ( eeprom8_t * ctx)

Write Enable function.

This function allows data writing operation to the EEPROM8.

Parameters
[in]ctxClick object.
Returns
Nothing.
Note
None.

◆ eeprom8_write_page()

err_t eeprom8_write_page ( eeprom8_t * ctx,
uint16_t reg_addr,
uint8_t * data_in )

Page Write function.

This function writes up to 128 bytes of data starting from the selected register.

Parameters
[in]ctxClick object.
[in]reg_addrRegister address.
[in]data_inData to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom8_write_protect()

void eeprom8_write_protect ( eeprom8_t * ctx)

Write Protect function.

This function prevents data writing operation to the EEPROM8.

Parameters
[in]ctxClick object.
Returns
Nothing.
Note
None.