mram2 2.0.0.0
|
This file contains API for MRAM 2 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | mram2_t |
Click ctx object definition. More... | |
struct | mram2_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | MRAM2_MAP_MIKROBUS(cfg, mikrobus) |
#define | MRAM2_OK 0 |
#define | MRAM2_ERROR -1 |
#define | MRAM2_CMD_RDSR 0x05 |
#define | MRAM2_CMD_WREN 0x06 |
#define | MRAM2_CMD_WRDI 0x04 |
#define | MRAM2_CMD_WRSR 0x01 |
#define | MRAM2_CMD_READ 0x03 |
#define | MRAM2_CMD_FREAD 0x0B |
#define | MRAM2_CMD_WRITE 0x02 |
#define | MRAM2_CMD_SLEEP 0xB9 |
#define | MRAM2_CMD_WAKE 0xAB |
#define | MRAM2_CMD_TDET 0x17 |
#define | MRAM2_CMD_TDETX 0x07 |
#define | MRAM2_CMD_RDID 0x4B |
#define | MRAM2_STAT_REG_SRWD 0x80 |
#define | MRAM2_STAT_REG_QPI 0x40 |
#define | MRAM2_STAT_REG_BP1 0x08 |
#define | MRAM2_STAT_REG_BP0 0x04 |
#define | MRAM2_STAT_REG_WEL 0x02 |
#define | MRAM2_XIP_SET_CONT 0xEF |
#define | MRAM2_XIP_RST_STOP 0xFF |
#define | MRAM2_WP_ENABLE 0x01 |
#define | MRAM2_WP_DISABLE 0x00 |
#define | MRAM2_HLD_ENABLE 0x01 |
#define | MRAM2_HLD_DISABLE 0x00 |
#define | MRAM2_PIN_LOW 0x00 |
#define | MRAM2_PIN_HIGH 0x01 |
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. | |
This file contains API for MRAM 2 Click driver.