fram2 2.0.0.0
|
Functions | |
void | fram2_cfg_setup (fram2_cfg_t *cfg) |
Config Object Initialization function. | |
FRAM2_RETVAL | fram2_init (fram2_t *ctx, fram2_cfg_t *cfg) |
Initialization function. | |
void | fram2_default_cfg (fram2_t *ctx) |
Click Default Configuration function. | |
void | fram2_generic_transfer (fram2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | fram2_write_enable (fram2_t *ctx) |
Enable write operation. | |
void | fram2_write_disable (fram2_t *ctx) |
Disable write operation. | |
uint8_t | fram2_read_status (fram2_t *ctx) |
Read Fram click status. | |
void | fram2_write_status (fram2_t *ctx, uint8_t value) |
Write Fram click status. | |
void | fram2_read (fram2_t *ctx, uint32_t address, uint8_t *buffer, uint8_t count) |
Read from FRAM click memory. | |
void | fram2_write (fram2_t *ctx, uint32_t address, uint8_t *buffer, uint8_t counter) |
Write to FRAM click memory. | |
void fram2_cfg_setup | ( | fram2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void fram2_default_cfg | ( | fram2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration i.e enable write operation for FRAM 2 click.
void fram2_generic_transfer | ( | fram2_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
FRAM2_RETVAL fram2_init | ( | fram2_t * | ctx, |
fram2_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.
void fram2_read | ( | fram2_t * | ctx, |
uint32_t | address, | ||
uint8_t * | buffer, | ||
uint8_t | count ) |
Read from FRAM click memory.
ctx | Click object. |
address | Desired starting address (0x0000 to FRAM_MEM_SIZE). |
buffer | Pointer to read buffer. |
count | Number of bytes to be read. |
@description This function reads content from address and saves it to buffer.
uint8_t fram2_read_status | ( | fram2_t * | ctx | ) |
Read Fram click status.
ctx | Click object. |
@description This function reads content of FRAM status register.
void fram2_write | ( | fram2_t * | ctx, |
uint32_t | address, | ||
uint8_t * | buffer, | ||
uint8_t | counter ) |
Write to FRAM click memory.
ctx | Click object. |
address | Address to write to (0x0000 to FRAM_MEM_SIZE). |
buffer | Pointer to write buffer. |
counter | Number of bytes to be written. |
@description This function writes content from buffer to address.
void fram2_write_disable | ( | fram2_t * | ctx | ) |
Disable write operation.
ctx | Click object. |
@description This function sends write disable command to the click.
void fram2_write_enable | ( | fram2_t * | ctx | ) |
Enable write operation.
ctx | Click object. |
@description This function sends write enable command to the click.
void fram2_write_status | ( | fram2_t * | ctx, |
uint8_t | value ) |
Write Fram click status.
ctx | Click object. |
value | Value to be written. |
@description This function writes value to FRAM status register.