nvsram2 2.0.0.0
|
This file contains API for nvSRAM 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 | nvsram2_t |
nvSRAM 2 Click context object. More... | |
struct | nvsram2_cfg_t |
nvSRAM 2 Click configuration object. More... | |
Macros | |
#define | NVSRAM2_STATUS_RDSR 0x05 |
nvSRAM 2 description setting. | |
#define | NVSRAM2_STATUS_FRDSR 0x0A |
#define | NVSRAM2_STATUS_WRSR 0x01 |
#define | NVSRAM2_STATUS_WREN 0x06 |
#define | NVSRAM2_STATUS_WRDI 0x04 |
#define | NVSRAM2_SRAM_READ 0x03 |
nvSRAM 2 SRAM read/write instructions. | |
#define | NVSRAM2_SRAM_FREAD 0x0B |
#define | NVSRAM2_SRAM_WRITE 0x02 |
#define | NVSRAM2_SPEC_NV_STORE 0x3C |
nvSRAM 2 SRAM special NV instructions. | |
#define | NVSRAM2_SPEC_NV_RECALL 0x60 |
#define | NVSRAM2_SPEC_NV_ASENB 0x59 |
#define | NVSRAM2_SPEC_NV_ASDISB 0x19 |
#define | NVSRAM2_SPEC_SLEEP 0xB9 |
nvSRAM 2 SRAM special instructions. | |
#define | NVSRAM2_SPEC_WRSN 0xC2 |
#define | NVSRAM2_SPEC_RDSN 0xC3 |
#define | NVSRAM2_SPEC_FRDSN 0xC9 |
#define | NVSRAM2_SPEC_RDID 0x9F |
#define | NVSRAM2_SPEC_FRDID 0x99 |
#define | NVSRAM2_STATUS_RDY 0x01 |
nvSRAM 2 status register content. | |
#define | NVSRAM2_STATUS_WEN 0x02 |
#define | NVSRAM2_STATUS_BP0 0x04 |
#define | NVSRAM2_STATUS_BP1 0x08 |
#define | NVSRAM2_STATUS_SNL 0x40 |
#define | NVSRAM2_STATUS_WPEN 0x80 |
#define | NVSRAM2_HOLD_ENABLE 0x00 |
#define | NVSRAM2_HOLD_DISABLE 0x01 |
#define | NVSRAM2_DUMMY_BYTE 0x00 |
#define | NVSRAM2_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | nvsram2_return_value_t { NVSRAM2_OK = 0 , NVSRAM2_ERROR = -1 } |
nvSRAM 2 Click return value data. More... | |
Functions | |
void | nvsram2_cfg_setup (nvsram2_cfg_t *cfg) |
nvSRAM 2 configuration object setup function. | |
err_t | nvsram2_init (nvsram2_t *ctx, nvsram2_cfg_t *cfg) |
nvSRAM 2 initialization function. | |
err_t | nvsram2_default_cfg (nvsram2_t *ctx) |
nvSRAM 2 default configuration function. | |
err_t | nvsram2_generic_write (nvsram2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
nvSRAM 2 data writing function. | |
err_t | nvsram2_generic_read (nvsram2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
nvSRAM 2 data reading function. | |
void | nvsram2_hold (nvsram2_t *ctx, uint8_t en_hold) |
nvSRAM 2 data enable hold operation function. | |
void | nvsram2_set_cmd (nvsram2_t *ctx, uint8_t cmd) |
nvSRAM 2 send command function. | |
uint8_t | nvsram2_read_status (nvsram2_t *ctx) |
nvSRAM 2 read status register function. | |
uint8_t | nvsram2_fast_read_status (nvsram2_t *ctx) |
nvSRAM 2 fast read status register function. | |
void | nvsram2_write_status (nvsram2_t *ctx, uint8_t data_byte) |
nvSRAM 2 write status register function. | |
void | nvsram2_burst_read (nvsram2_t *ctx, uint32_t mem_addr, uint8_t *p_rx_data, uint8_t n_bytes) |
nvSRAM 2 burst read function. | |
void | nvsram2_burst_write (nvsram2_t *ctx, uint32_t mem_addr, uint8_t *p_tx_data, uint8_t n_bytes) |
nvSRAM 2 burst write function. | |
uint32_t | nvsram2_read_id (nvsram2_t *ctx) |
nvSRAM 2 read ID function. | |
This file contains API for nvSRAM 2 Click Driver.