eeprom11 2.1.0.0
EEPROM 11 Click Driver

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

Topics

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

Functions

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_default_cfg (eeprom11_t *ctx)
 EEPROM 11 default configuration function.
 
err_t eeprom11_generic_write (eeprom11_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 EEPROM 11 I2C writing 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_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_clear_wp (eeprom11_t *ctx)
 EEPROM 11 clear write protection function.
 
err_t eeprom11_set_page_addr (eeprom11_t *ctx, uint8_t page_addr)
 EEPROM 11 set page address function.
 

Detailed Description

API for configuring and manipulating EEPROM 11 Click driver.

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

Function Documentation

◆ eeprom11_cfg_setup()

void eeprom11_cfg_setup ( eeprom11_cfg_t * cfg)

EEPROM 11 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ eeprom11_clear_page()

err_t eeprom11_clear_page ( eeprom11_t * ctx,
uint8_t address )

EEPROM 11 page clear function.

This function is used clear page ( 16 bits ) starting from the selected address.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
[in]address: Start address.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom11_clear_wp()

err_t eeprom11_clear_wp ( eeprom11_t * ctx)

EEPROM 11 clear write protection function.

This function is used clear write protection of selected bock.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom11_default_cfg()

err_t eeprom11_default_cfg ( eeprom11_t * ctx)

EEPROM 11 default configuration function.

This function executes a default configuration of EEPROM 11 click board.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ eeprom11_generic_read()

err_t eeprom11_generic_read ( eeprom11_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

EEPROM 11 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom11_generic_write()

err_t eeprom11_generic_write ( eeprom11_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

EEPROM 11 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom11_init()

err_t eeprom11_init ( eeprom11_t * ctx,
eeprom11_cfg_t * cfg )

EEPROM 11 initialization function.

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

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

◆ eeprom11_page_write()

err_t eeprom11_page_write ( eeprom11_t * ctx,
uint8_t address,
uint8_t * data_in )

EEPROM 11 page write function.

This function is used write page ( 16 bits ) into the selected address.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
[in]address: Start address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom11_set_page_addr()

err_t eeprom11_set_page_addr ( eeprom11_t * ctx,
uint8_t page_addr )

EEPROM 11 set page address function.

This function is used to select page address.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
[in]page_addr: Selected page address.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom11_set_wp()

err_t eeprom11_set_wp ( eeprom11_t * ctx,
uint8_t block_addr )

EEPROM 11 set write protection function.

This function is used set write protection of selected bock.

Parameters
[in]ctx: Click context object. See eeprom11_t object definition for detailed explanation.
[in]block_addr: Selected block address.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.