eeprom9 2.1.0.0
|
API for configuring and manipulating EEPROM 9 Click driver. More...
Topics | |
EEPROM 9 Registers Settings | |
Settings for registers of EEPROM 9 Click driver. | |
EEPROM 9 MikroBUS Map | |
MikroBUS pin mapping of EEPROM 9 Click driver. | |
Functions | |
void | eeprom9_cfg_setup (eeprom9_cfg_t *cfg) |
EEPROM 9 configuration object setup function. | |
err_t | eeprom9_init (eeprom9_t *ctx, eeprom9_cfg_t *cfg) |
EEPROM 9 initialization function. | |
err_t | eeprom9_generic_write (eeprom9_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
EEPROM 9 data writing function. | |
err_t | eeprom9_generic_read (eeprom9_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
EEPROM 9 data reading function. | |
void | eeprom9_set_hold (eeprom9_t *ctx, uint8_t en_hold) |
EEPROM 9 set hold pin state function. | |
void | eeprom9_set_write_protection (eeprom9_t *ctx, uint8_t en_wp) |
EEPROM 9 set write protection state function. | |
err_t | eeprom9_send_cmd (eeprom9_t *ctx, uint8_t cmd) |
EEPROM 9 send command function. | |
err_t | eeprom9_set_write_enable (eeprom9_t *ctx, uint8_t en_write) |
EEPROM 9 enable write function. | |
err_t | eeprom9_read_memory (eeprom9_t *ctx, uint32_t mem_addr, uint8_t *data_out, uint8_t len) |
EEPROM 9 memory reading function. | |
err_t | eeprom9_write_memory (eeprom9_t *ctx, uint32_t mem_addr, uint8_t *data_in, uint8_t len) |
EEPROM 9 memory writing function. | |
err_t | eeprom5_get_status_reg (eeprom9_t *ctx, uint8_t *status_data) |
EEPROM 9 read status function. | |
err_t | eeprom9_chip_erase (eeprom9_t *ctx) |
EEPROM 9 chip memory erase function. | |
err_t | eeprom9_block_erase (eeprom9_t *ctx, uint32_t block_addr) |
EEPROM 9 memory block erase function. | |
err_t | eeprom9_sector_erase (eeprom9_t *ctx, uint32_t sector_addr) |
EEPROM 9 memory sector erase function. | |
err_t | eeprom9_page_erase (eeprom9_t *ctx, uint32_t page_addr) |
EEPROM 9 memory page erase function. | |
err_t | eeprom9_read_identification (eeprom9_t *ctx, id_data_t *id_data) |
EEPROM 9 read identification function. | |
API for configuring and manipulating EEPROM 9 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t eeprom5_get_status_reg | ( | eeprom9_t * | ctx, |
uint8_t * | status_data ) |
EEPROM 9 read status function.
This function is used to read the status register by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[out] | status_data | : Status register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom9_block_erase | ( | eeprom9_t * | ctx, |
uint32_t | block_addr ) |
EEPROM 9 memory block erase function.
This function is used to erase the memory block specified by the memory address.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | block_addr | : Block memory address. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void eeprom9_cfg_setup | ( | eeprom9_cfg_t * | cfg | ) |
EEPROM 9 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See eeprom9_cfg_t object definition for detailed explanation. |
err_t eeprom9_chip_erase | ( | eeprom9_t * | ctx | ) |
EEPROM 9 chip memory erase function.
This function is used to erase the whole content of the memory.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom9_generic_read | ( | eeprom9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
EEPROM 9 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_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 eeprom9_generic_write | ( | eeprom9_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
EEPROM 9 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_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 eeprom9_init | ( | eeprom9_t * | ctx, |
eeprom9_cfg_t * | cfg ) |
EEPROM 9 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See eeprom9_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom9_page_erase | ( | eeprom9_t * | ctx, |
uint32_t | page_addr ) |
EEPROM 9 memory page erase function.
This function is used to erase the memory page specified by the memory address.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | page_addr | : Page memory address. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. EEPROM 9 read identification function.
This function reads an identification value by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[out] | id_data | : Id data values. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom9_read_memory | ( | eeprom9_t * | ctx, |
uint32_t | mem_addr, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
EEPROM 9 memory reading function.
This function reads a desired number of data bytes into memory starting from the selected address by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | mem_addr | : Start memory 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 eeprom9_sector_erase | ( | eeprom9_t * | ctx, |
uint32_t | sector_addr ) |
EEPROM 9 memory sector erase function.
This function is used to erase the memory sector specified by the memory address.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | sector_addr | : Sector memory address. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t eeprom9_send_cmd | ( | eeprom9_t * | ctx, |
uint8_t | cmd ) |
EEPROM 9 send command function.
This function writes a command byte by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | cmd | : Command to be sent. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void eeprom9_set_hold | ( | eeprom9_t * | ctx, |
uint8_t | en_hold ) |
EEPROM 9 set hold pin state function.
This function sets a hold pin level.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | en_hold | : Hold state. |
err_t eeprom9_set_write_enable | ( | eeprom9_t * | ctx, |
uint8_t | en_write ) |
EEPROM 9 enable write function.
This function writes a command to enable or disable writing into memory by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | en_write | : Enable write state. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void eeprom9_set_write_protection | ( | eeprom9_t * | ctx, |
uint8_t | en_wp ) |
EEPROM 9 set write protection state function.
This function sets a hold pin level.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | en_wp | : Write protection state. |
err_t eeprom9_write_memory | ( | eeprom9_t * | ctx, |
uint32_t | mem_addr, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
EEPROM 9 memory writing function.
This function writes a desired number of data bytes into memory starting from the selected address by using SPI serial interface.
[in] | ctx | : Click context object. See eeprom9_t object definition for detailed explanation. |
[in] | mem_addr | : Start memory 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.