eeprom12
2.1.0.0
|
API for configuring and manipulating EEPROM 12 Click driver. More...
Modules | |
EEPROM 12 Registers List | |
List of registers of EEPROM 12 Click driver. | |
EEPROM 12 Registers Settings | |
Settings for registers of EEPROM 12 Click driver. | |
EEPROM 12 MikroBUS Map | |
MikroBUS pin mapping of EEPROM 12 Click driver. | |
Functions | |
void | eeprom12_cfg_setup (eeprom12_cfg_t *cfg) |
EEPROM 12 configuration object setup function. More... | |
err_t | eeprom12_init (eeprom12_t *ctx, eeprom12_cfg_t *cfg) |
EEPROM 12 initialization function. More... | |
void | eeprom12_write_enable (eeprom12_t *ctx) |
EEPROM 12 write enable function. More... | |
void | eeprom12_write_disable (eeprom12_t *ctx) |
EEPROM 12 write disable function. More... | |
err_t | eeprom12_generic_write (eeprom12_t *ctx, uint16_t reg, uint8_t *data_in, uint8_t len) |
EEPROM 12 I2C writing function. More... | |
err_t | eeprom12_generic_read (eeprom12_t *ctx, uint16_t reg, uint8_t *data_out, uint8_t len) |
EEPROM 12 I2C reading function. More... | |
err_t | eeprom12_memory_write (eeprom12_t *ctx, uint16_t mem_addr, uint8_t *data_in, uint8_t len) |
EEPROM 12 memory write function. More... | |
err_t | eeprom12_memory_read (eeprom12_t *ctx, uint16_t mem_addr, uint8_t *data_out, uint8_t len) |
EEPROM 12 memory read function. More... | |
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. More... | |
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. More... | |
err_t | eeprom12_id_page_write (eeprom12_t *ctx, uint16_t id_page_addr, uint8_t *data_in) |
EEPROM 12 identification page write function. More... | |
err_t | eeprom12_id_page_read (eeprom12_t *ctx, uint16_t id_page_addr, uint8_t *data_out) |
EEPROM 12 identification page read function. More... | |
err_t | eeprom12_config_dev_addr (eeprom12_t *ctx, uint8_t cda, uint8_t dal) |
EEPROM 12 configuate device address function. More... | |
err_t | eeprom12_read_lock_status (eeprom12_t *ctx, uint8_t *lock_status) |
EEPROM 12 read lock status function. More... | |
API for configuring and manipulating EEPROM 12 Click driver.
void eeprom12_cfg_setup | ( | eeprom12_cfg_t * | cfg | ) |
EEPROM 12 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See eeprom12_cfg_t object definition for detailed explanation. |
err_t eeprom12_config_dev_addr | ( | eeprom12_t * | ctx, |
uint8_t | cda, | ||
uint8_t | dal | ||
) |
EEPROM 12 configuate device address function.
This function writes a configurable device address register of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | cda | : Configurable device address bits (0x00-0x07). |
[in] | dal | : Device address lock bit:
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_generic_read | ( | eeprom12_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
EEPROM 12 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See eeprom12_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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_generic_write | ( | eeprom12_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
EEPROM 12 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See eeprom12_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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_id_page_read | ( | eeprom12_t * | ctx, |
uint16_t | id_page_addr, | ||
uint8_t * | data_out | ||
) |
EEPROM 12 identification page read function.
This function reads a desired number of data bytes starting from the selected identification page address of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | id_page_addr | : Start identification page address (0x00-0x3F). |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_id_page_write | ( | eeprom12_t * | ctx, |
uint16_t | id_page_addr, | ||
uint8_t * | data_in | ||
) |
EEPROM 12 identification page write function.
This function writes a desired number of data bytes starting from the selected identification page address of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | id_page_addr | : Start identification page address (0x00-0x3F). |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_init | ( | eeprom12_t * | ctx, |
eeprom12_cfg_t * | cfg | ||
) |
EEPROM 12 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See eeprom12_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
This function reads a desired number of data bytes starting from the selected memory page address of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | page_addr | : Start memory page address (0x0000-0x01FF). |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
This function writes a desired number of data bytes starting from the selected memory page address of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | page_addr | : Start memory page address (0x0000-0x0200). |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_memory_read | ( | eeprom12_t * | ctx, |
uint16_t | mem_addr, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
EEPROM 12 memory read function.
This function reads a desired number of data bytes starting from the selected memory address of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | mem_addr | : Start memory address (0x0000-0x7FFF). |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_memory_write | ( | eeprom12_t * | ctx, |
uint16_t | mem_addr, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
EEPROM 12 memory write function.
This function writes a desired number of data bytes starting from the selected memory address of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[in] | mem_addr | : Start memory address (0x0000-0x7FFF). |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom12_read_lock_status | ( | eeprom12_t * | ctx, |
uint8_t * | lock_status | ||
) |
EEPROM 12 read lock status function.
This function reads a lock status of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
[out] | lock_status | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void eeprom12_write_disable | ( | eeprom12_t * | ctx | ) |
EEPROM 12 write disable function.
This function enable hardware write protection of the entire memory
of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |
void eeprom12_write_enable | ( | eeprom12_t * | ctx | ) |
EEPROM 12 write enable function.
This function disable hardware write protection of the entire memory of the M24256E-FMN6TP, 256-Kbit serial I²C bus EEPROM with configurable device address and preprogrammed device address on the EEPROM 12 Click board™.
[in] | ctx | : Click context object. See eeprom12_t object definition for detailed explanation. |