reram 2.0.0.0
|
This file contains API for ReRAM Click driver. More...
#include "drv_digital_out.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | reram_t |
Click context object definition. More... | |
struct | reram_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | RERAM_ID_DATA 0x047FC903 |
#define | RERAM_CMD_WREN 0x6 |
#define | RERAM_CMD_WRDI 0x4 |
#define | RERAM_CMD_SLEEP 0xB9 |
#define | RERAM_BLOCK_PROT_NONE 0x0 |
#define | RERAM_BLOCK_PROT_UPPER_1_4 0x4 |
#define | RERAM_BLOCK_PROT_UPPER_1_2 0x8 |
#define | RERAM_BLOCK_PROT_ALL 0xC |
#define | RERAM_BLOCK_PROT_MASK 0xC |
#define | RERAM_WP_STAT_EN 0x80 |
#define | RERAM_WP_STAT_DIS 0x0 |
#define | RERAM_WP_STAT_MASK 0x80 |
#define | RERAM_FLAG_MASK_WEL 0x2 |
#define | RERAM_FLAG_MASK_WIP 0x1 |
#define | RERAM_MEM_ADDR_START 0x0 |
#define | RERAM_MEM_ADDR_END 0x7FFFF |
#define | RERAM_TRANSFER_BYTES_MIN 1 |
#define | RERAM_TRANSFER_BYTES_MAX 256 |
#define | RERAM_MAP_MIKROBUS(cfg, mikrobus) |
Enumerations | |
enum | reram_err_t { RERAM_OK = 0 , RERAM_ERR_DRV_INIT = 0xFC , RERAM_ERR_CMD , RERAM_ERR_MEM_ADDR , RERAM_ERR_NBYTES } |
Click error code. More... | |
enum | reram_pin_state_t { RERAM_PIN_STATE_LOW = 0 , RERAM_PIN_STATE_HIGH } |
Click pin state. More... | |
Functions | |
void | reram_cfg_setup (reram_cfg_t *cfg) |
Configuration Object Setup function. | |
reram_err_t | reram_init (reram_t *ctx, reram_cfg_t *cfg) |
Click Initialization function. | |
void | reram_default_cfg (reram_t *ctx) |
Click Default Configuration function. | |
reram_err_t | reram_send_cmd (reram_t *ctx, uint8_t cmd_code) |
Command Send function. | |
uint8_t | reram_read_status (reram_t *ctx) |
Status Read function. | |
void | reram_write_status (reram_t *ctx, uint8_t data_in) |
Status Write function. | |
reram_err_t | reram_read_memory (reram_t *ctx, uint32_t mem_addr, uint8_t *data_out, uint16_t n_bytes) |
Memory Read function. | |
reram_err_t | reram_write_memory (reram_t *ctx, uint32_t mem_addr, uint8_t *data_in, uint16_t n_bytes) |
Memory Write function. | |
uint32_t | reram_read_id (reram_t *ctx) |
ID Read function. | |
void | reram_set_hold_pin (reram_t *ctx, reram_pin_state_t state) |
Hold Pin Set function. | |
void | reram_set_write_protect_pin (reram_t *ctx, reram_pin_state_t state) |
Write Protect Pin Set function. | |
void | reram_wake_up (reram_t *ctx) |
Wake Up function. | |
This file contains API for ReRAM Click driver.