eeram2 2.0.0.0
|
Functions | |
void | eeram2_cfg_setup (eeram2_cfg_t *cfg) |
Config Object Initialization function. | |
EERAM2_RETVAL | eeram2_init (eeram2_t *ctx, eeram2_cfg_t *cfg) |
Initialization function. | |
void | eeram2_generic_transfer (eeram2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | eeram2_set_on_hold_status (eeram2_t *ctx, uint8_t en_hold) |
Set On-hold status function. | |
void | eeram2_set_command (eeram2_t *ctx, uint8_t command) |
Set command function. | |
void | eeram2_set_write_status (eeram2_t *ctx, uint8_t en_write) |
Set write status function. | |
void | eeram2_set_status (eeram2_t *ctx, uint8_t tx_data) |
Set status register function. | |
uint8_t | eeram2_get_status (eeram2_t *ctx) |
Read status register function. | |
uint8_t | eeram2_write_byte (eeram2_t *ctx, uint32_t reg, uint8_t tx_data) |
Write the data byte into SRAM function. | |
uint8_t | eeram2_read_byte (eeram2_t *ctx, uint32_t reg) |
Read the data byte from SRAM function. | |
uint8_t | eeram2_write_continuous (eeram2_t *ctx, uint32_t reg, uint8_t *p_tx_data, uint8_t n_bytes) |
Continuous write the data into SRAM function. | |
uint8_t | eeram2_read_continuous (eeram2_t *ctx, uint32_t reg, uint8_t *p_rx_data, uint8_t n_bytes) |
Continuous read the data into SRAM function. | |
uint8_t | eeram2_read_nonvolatile (eeram2_t *ctx, uint8_t *p_rx_data) |
Nonvolatile user space write function. | |
uint8_t | eeram2_write_nonvolatile (eeram2_t *ctx, uint8_t *p_tx_data) |
Nonvolatile user space read function. | |
uint8_t | eeram2_secure_write (eeram2_t *ctx, uint16_t reg, uint8_t *p_tx_data) |
Secure SRAM write function. | |
uint8_t | eeram2_secure_read (eeram2_t *ctx, uint16_t reg, uint8_t *p_rx_data) |
Secure SRAM read function. | |
void eeram2_cfg_setup | ( | eeram2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void eeram2_generic_transfer | ( | eeram2_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
uint8_t eeram2_get_status | ( | eeram2_t * | ctx | ) |
Read status register function.
ctx | Click object. |
@description Function set status register of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
EERAM2_RETVAL eeram2_init | ( | eeram2_t * | ctx, |
eeram2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t eeram2_read_byte | ( | eeram2_t * | ctx, |
uint32_t | reg ) |
Read the data byte from SRAM function.
ctx | Click object. |
reg | 24-bit register address. |
@description Function read the data byte of the desired register address of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_read_continuous | ( | eeram2_t * | ctx, |
uint32_t | reg, | ||
uint8_t * | p_rx_data, | ||
uint8_t | n_bytes ) |
Continuous read the data into SRAM function.
ctx | Click object. |
reg | 24-bit register address. |
p_rx_data | pointer to the memory location where data be stored. |
n_bytes | number of bytes to be read. |
@description Function read a sequential data starting from the targeted register address of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_read_nonvolatile | ( | eeram2_t * | ctx, |
uint8_t * | p_rx_data ) |
Nonvolatile user space write function.
ctx | Click object. |
p_tx_data | pointer to the data to be written. |
@description Function writes a nonvolatile user space of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_secure_read | ( | eeram2_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | p_rx_data ) |
Secure SRAM read function.
ctx | Click object. |
p_tx_data | pointer to the memory location where data be stored. |
@description Function read data from the secure SRAM memory space of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_secure_write | ( | eeram2_t * | ctx, |
uint16_t | reg, | ||
uint8_t * | p_tx_data ) |
Secure SRAM write function.
ctx | Click object. |
p_tx_data | pointer to the data to be written. |
@description Function secure SRAM write, which add another layer of protection to data of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
void eeram2_set_command | ( | eeram2_t * | ctx, |
uint8_t | command ) |
Set command function.
ctx | Click object. |
command | 8-bit Commands Opcode. |
@description Function set command to the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
void eeram2_set_on_hold_status | ( | eeram2_t * | ctx, |
uint8_t | en_hold ) |
Set On-hold status function.
ctx | Click object. |
en_hold |
|
@description Function sets the states of the HLD ( PWM ) pin depending on the function argument.
void eeram2_set_status | ( | eeram2_t * | ctx, |
uint8_t | tx_data ) |
Set status register function.
ctx | Click object. |
tx_data | bit [ 6 ] :
|
@description Function set status register of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
void eeram2_set_write_status | ( | eeram2_t * | ctx, |
uint8_t | en_write ) |
Set write status function.
ctx | Click object. |
en_write |
|
@description Function set write enable instruction of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_write_byte | ( | eeram2_t * | ctx, |
uint32_t | reg, | ||
uint8_t | tx_data ) |
Write the data byte into SRAM function.
ctx | Click object. |
reg | 24-bit register address. |
tx_data | 8-bit write data. |
@description Function write the data byte to the desired register address of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_write_continuous | ( | eeram2_t * | ctx, |
uint32_t | reg, | ||
uint8_t * | p_tx_data, | ||
uint8_t | n_bytes ) |
Continuous write the data into SRAM function.
ctx | Click object. |
reg | 24-bit register address. |
p_tx_data | pointer to the data to be written. |
n_bytes | number of bytes to be written. |
@description Function writes a sequential data starting to the targeted register address of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.
uint8_t eeram2_write_nonvolatile | ( | eeram2_t * | ctx, |
uint8_t * | p_tx_data ) |
Nonvolatile user space read function.
ctx | Click object. |
p_tx_data | pointer to the memory location where data be stored. |
@description Function read a nonvolatile user space of the 48LM01 1-Mbit SPI Serial EERAM on the EERAM 2 click board.