eeram3 2.0.0.0
|
API for configuring and manipulating EERAM 3 Click driver. More...
Topics | |
EERAM 3 Opcode Commands List | |
List of Opcode Commands of EERAM 3 Click driver. | |
EERAM 3 Registers Settings | |
Settings for registers of EERAM 3 Click driver. | |
EERAM 3 MikroBUS Map | |
MikroBUS pin mapping of EERAM 3 Click driver. | |
Functions | |
void | eeram3_cfg_setup (eeram3_cfg_t *cfg) |
EERAM 3 configuration object setup function. | |
err_t | eeram3_init (eeram3_t *ctx, eeram3_cfg_t *cfg) |
EERAM 3 initialization function. | |
void | eeram3_default_cfg (eeram3_t *ctx) |
EERAM 3 default configuration function. | |
err_t | eeram3_write_opcode (eeram3_t *ctx, uint8_t opcode) |
EERAM 3 write opcode function. | |
err_t | eeram3_read_opcode (eeram3_t *ctx, uint8_t opcode, uint8_t *data_out, uint8_t len) |
EERAM 3 read opcode function. | |
void | eeram3_set_hld_pin (eeram3_t *ctx, uint8_t state) |
EERAM 3 set HLD pin function. | |
err_t | eeram3_enable_write (eeram3_t *ctx) |
EERAM 3 enable write function. | |
err_t | eeram3_disable_write (eeram3_t *ctx) |
EERAM 3 disable write function. | |
err_t | eeram3_set_block_protection (eeram3_t *ctx, uint8_t block_protect) |
EERAM 3 set block protection function. | |
err_t | eeram3_write_status (eeram3_t *ctx, uint8_t status) |
EERAM 3 write status function. | |
err_t | eeram3_read_status (eeram3_t *ctx, uint8_t *status) |
EERAM 3 read status function. | |
err_t | eeram3_enter_hibernate_mode (eeram3_t *ctx) |
EERAM 3 enter hibernate mode function. | |
void | eeram3_wakeup_from_hibernate (eeram3_t *ctx) |
EERAM 3 wake up from hibernate function. | |
err_t | eeram3_memory_write (eeram3_t *ctx, uint16_t address, uint8_t *data_in, uint16_t len) |
EERAM 3 memory write function. | |
err_t | eeram3_memory_read (eeram3_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len) |
EERAM 3 memory read function. | |
err_t | eeram3_memory_secure_write (eeram3_t *ctx, uint16_t address, uint8_t *data_in, uint8_t len) |
EERAM 3 memory write function. | |
err_t | eeram3_memory_secure_read (eeram3_t *ctx, uint16_t address, uint8_t *data_out, uint8_t len) |
EERAM 3 memory secure read function. | |
err_t | eeram3_read_last_written_address (eeram3_t *ctx, uint16_t *address) |
EERAM 3 read last written address function. | |
err_t | eeram3_nv_user_space_write (eeram3_t *ctx, uint16_t data_in) |
EERAM 3 nv user space write function. | |
err_t | eeram3_nv_user_space_read (eeram3_t *ctx, uint16_t *data_out) |
EERAM 3 nv user space read function. | |
err_t | eeram3_store_data (eeram3_t *ctx) |
EERAM 3 store data function. | |
err_t | eeram3_recall_data (eeram3_t *ctx) |
EERAM 3 recall data function. | |
err_t | eeram3_autostore_enable (eeram3_t *ctx) |
EERAM 3 autostore enable function. | |
err_t | eeram3_autostore_disable (eeram3_t *ctx) |
EERAM 3 autostore disable function. | |
API for configuring and manipulating EERAM 3 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 eeram3_autostore_disable | ( | eeram3_t * | ctx | ) |
EERAM 3 autostore disable function.
This function disables Auto Store feature.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeram3_autostore_enable | ( | eeram3_t * | ctx | ) |
EERAM 3 autostore enable function.
This function enables Auto Store feature.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.void eeram3_cfg_setup | ( | eeram3_cfg_t * | cfg | ) |
EERAM 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See eeram3_cfg_t object definition for detailed explanation. |
void eeram3_default_cfg | ( | eeram3_t * | ctx | ) |
EERAM 3 default configuration function.
This function executes a default configuration of EERAM 3 click board.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
err_t eeram3_disable_write | ( | eeram3_t * | ctx | ) |
EERAM 3 disable write function.
This function disables write by issuing the WRDI command and checking the WEL bit.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeram3_enable_write | ( | eeram3_t * | ctx | ) |
EERAM 3 enable write function.
This function enables write by issuing the WREN command and checking the WEL bit.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeram3_enter_hibernate_mode | ( | eeram3_t * | ctx | ) |
EERAM 3 enter hibernate mode function.
This function enters to the hibernate mode by issuing the HIBERNATE command.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeram3_init | ( | eeram3_t * | ctx, |
eeram3_cfg_t * | cfg ) |
EERAM 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See eeram3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeram3_memory_read | ( | eeram3_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out, | ||
uint16_t | len ) |
EERAM 3 memory read function.
This function reads a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x0000-0x7FFF]. |
[out] | data_out | : Read data output. |
[in] | len | : Number of data bytes. |
0
- Success, -1
- Error.err_t eeram3_memory_secure_read | ( | eeram3_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
EERAM 3 memory secure read function.
This function securely reads a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x0000-0x7FFF]. |
[out] | data_out | : Read data output. |
[in] | len | : Number of data bytes [up to 64 bytes]. |
0
- Success, -1
- Error.err_t eeram3_memory_secure_write | ( | eeram3_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
EERAM 3 memory write function.
This function securely writes a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x0000-0x7FFF]. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of data bytes [up to 64 bytes]. |
0
- Success, -1
- Error.err_t eeram3_memory_write | ( | eeram3_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_in, | ||
uint16_t | len ) |
EERAM 3 memory write function.
This function writes a desired number of data bytes starting from the selected memory address.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | address | : Starting memory address [0x0000-0x7FFF]. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of data bytes. |
0
- Success, -1
- Error.err_t eeram3_nv_user_space_read | ( | eeram3_t * | ctx, |
uint16_t * | data_out ) |
EERAM 3 nv user space read function.
This function reads two bytes of data from the nonvolatile user space.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[out] | data_out | : Read data output. |
0
- Success, -1
- Error.err_t eeram3_nv_user_space_write | ( | eeram3_t * | ctx, |
uint16_t | data_in ) |
EERAM 3 nv user space write function.
This function writes two bytes of data to the nonvolatile user space.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.err_t eeram3_read_last_written_address | ( | eeram3_t * | ctx, |
uint16_t * | address ) |
EERAM 3 read last written address function.
This function reads the last successfully written address.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[out] | address | : Last written memory address [0x0000-0x7FFF]. |
0
- Success, -1
- Error.err_t eeram3_read_opcode | ( | eeram3_t * | ctx, |
uint8_t | opcode, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
EERAM 3 read opcode function.
This function reads a desired number of data bytes from the selected opcode by using SPI serial interface.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | opcode | : Opcode command. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t eeram3_read_status | ( | eeram3_t * | ctx, |
uint8_t * | status ) |
EERAM 3 read status function.
This function reads the Status register.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[out] | status | : Read data output. |
0
- Success, -1
- Error.err_t eeram3_recall_data | ( | eeram3_t * | ctx | ) |
EERAM 3 recall data function.
This function executes the RECALL command which copies EEPROM data to SRAM array.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t eeram3_set_block_protection | ( | eeram3_t * | ctx, |
uint8_t | block_protect ) |
EERAM 3 set block protection function.
This function sets the block protection bits of the Status register.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | block_protect | :
|
0
- Success, -1
- Error.void eeram3_set_hld_pin | ( | eeram3_t * | ctx, |
uint8_t | state ) |
EERAM 3 set HLD pin function.
This function sets the HOLD (HLD) pin logic state.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t eeram3_store_data | ( | eeram3_t * | ctx | ) |
EERAM 3 store data function.
This function executes the STORE command which stores SRAM data to EEPROM array.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
0
- Success, -1
- Error.void eeram3_wakeup_from_hibernate | ( | eeram3_t * | ctx | ) |
EERAM 3 wake up from hibernate function.
This function wakes up from hibernate mode by toggling the CS pin.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
err_t eeram3_write_opcode | ( | eeram3_t * | ctx, |
uint8_t | opcode ) |
EERAM 3 write opcode function.
This function writes a desired opcode command byte by using SPI serial interface.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | opcode | : Opcode command. |
0
- Success, -1
- Error.err_t eeram3_write_status | ( | eeram3_t * | ctx, |
uint8_t | status ) |
EERAM 3 write status function.
This function writes a desired data to the Status register.
[in] | ctx | : Click context object. See eeram3_t object definition for detailed explanation. |
[in] | status | : Data to be written. |
0
- Success, -1
- Error.