mram2 2.0.0.0
|
Functions | |
void | mram2_cfg_setup (mram2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | mram2_init (mram2_t *ctx, mram2_cfg_t *cfg) |
Initialization function. | |
uint8_t | mram2_rdsr (mram2_t *ctx) |
Read Status Register function. | |
void | mram2_wren (mram2_t *ctx) |
Write Enable function. | |
void | mram2_wrdi (mram2_t *ctx) |
Write Disable function. | |
void | mram2_wrsr (mram2_t *ctx, uint8_t stat_reg) |
Write Status Register function. | |
void | mram2_read (mram2_t *ctx, uint32_t mem_adr, uint8_t *rd_data, uint8_t n_bytes) |
Read Data Bytes function. | |
void | mram2_fread (mram2_t *ctx, uint32_t mem_adr, uint8_t mode, uint8_t *rd_data, uint8_t n_bytes) |
Fast Read Data Bytes function. | |
void | mram2_write (mram2_t *ctx, uint32_t mem_adr, uint8_t *wr_data, uint8_t n_bytes) |
Write Data Bytes function. | |
void | mram2_sleep (mram2_t *ctx) |
Enter Sleep Mode function. | |
void | mram2_wake (mram2_t *ctx) |
Exit Sleep Mode function. | |
uint32_t | mram2_tdet (mram2_t *ctx) |
Tamper Detect (TDET) function. | |
void | mram2_tdetx (mram2_t *ctx) |
Tamper Detect Exit function. | |
void | mram2_rdid (mram2_t *ctx, uint8_t *rd_id) |
Read ID function. | |
void | mram2_write_protect (mram2_t *ctx, uint8_t state) |
Write Protect function. | |
void | mram2_hold (mram2_t *ctx, uint8_t state) |
Hold function. | |
void mram2_cfg_setup | ( | mram2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void mram2_fread | ( | mram2_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t | mode, | ||
uint8_t * | rd_data, | ||
uint8_t | n_bytes ) |
Fast Read Data Bytes function.
ctx | Click object. |
mem_adr | 24-bit memory address entry |
mode | 8-bit XIP operation option |
rd_data | data read |
n_bytes | number of bytes to read |
The Fast Read Data Bytes function allows data bytes to be continuously read starting at an initial address at the highest frequency.
void mram2_hold | ( | mram2_t * | ctx, |
uint8_t | state ) |
Hold function.
ctx | Click object. |
state | value that defines whether Hold is enabled or not |
Function is used to hold or un-hold the device.
err_t mram2_init | ( | mram2_t * | ctx, |
mram2_cfg_t * | cfg ) |
Initialization function.
mram2 | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void mram2_rdid | ( | mram2_t * | ctx, |
uint8_t * | rd_id ) |
Read ID function.
ctx | Click object. |
rd_id | information that identify the device |
The Read Device ID function oututs the information that identify the device.
uint8_t mram2_rdsr | ( | mram2_t * | ctx | ) |
Read Status Register function.
ctx | Click object. |
Function is used to read Status register.
void mram2_read | ( | mram2_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t * | rd_data, | ||
uint8_t | n_bytes ) |
Read Data Bytes function.
ctx | Click object. |
mem_adr | 24-bit memory address entry |
rd_data | data read |
n_bytes | number of bytes to read |
The Read Data Bytes function allows data bytes to be continuously read starting at an initial address.
void mram2_sleep | ( | mram2_t * | ctx | ) |
Enter Sleep Mode function.
ctx | Click object. |
Function is used to place the device into sleep mode.
uint32_t mram2_tdet | ( | mram2_t * | ctx | ) |
Tamper Detect (TDET) function.
ctx | Click object. |
The Tamper Detect function is used to check whether the memory contents have been corrupted by exposure to external magnetic fields.
void mram2_tdetx | ( | mram2_t * | ctx | ) |
Tamper Detect Exit function.
ctx | Click object. |
Function is used to exit the Tamper Detect.
void mram2_wake | ( | mram2_t * | ctx | ) |
Exit Sleep Mode function.
ctx | Click object. |
Function is used to wake up the device from the sleep mode.
void mram2_wrdi | ( | mram2_t * | ctx | ) |
Write Disable function.
ctx | Click object. |
Function is used to disable write operation.
void mram2_wren | ( | mram2_t * | ctx | ) |
Write Enable function.
ctx | Click object. |
Function is used to enable write operation.
void mram2_write | ( | mram2_t * | ctx, |
uint32_t | mem_adr, | ||
uint8_t * | wr_data, | ||
uint8_t | n_bytes ) |
Write Data Bytes function.
ctx | Click object. |
mem_adr | 24-bit memory address entry |
wr_data | 8-bit write data |
n_bytes | number of bytes to read |
The Write Data Bytes function allows data bytes to be written sequentially.
void mram2_write_protect | ( | mram2_t * | ctx, |
uint8_t | state ) |
Write Protect function.
ctx | Click object. |
state | value that defines whether write protect is enabled or not |
Function is used to eable or disable Write protect.
void mram2_wrsr | ( | mram2_t * | ctx, |
uint8_t | stat_reg ) |
Write Status Register function.
ctx | Click object. |
stat_reg | 8-bit input walue |
Function is used to change settings in Status register.