sram4 2.0.0.0
|
This file contains API for SRAM 4 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | sram4_t |
SRAM 4 Click context object. More... | |
struct | sram4_cfg_t |
SRAM 4 Click configuration object. More... | |
Macros | |
#define | SRAM4_REG_RDSR 0x05/*< Read status register*/ |
SRAM 4 description register. | |
#define | SRAM4_REG_FAST_RDSR 0x09/*< Fast Read status register*/ |
#define | SRAM4_REG_WRSR 0x01/*< Write status register*/ |
#define | SRAM4_REG_WREN 0x06/*< Set write enable latch*/ |
#define | SRAM4_REG_WRDI 0x04/*< Reset write enable latch*/ |
#define | SRAM4_REG_READ 0x03/*< Read data from memory array*/ |
#define | SRAM4_REG_FAST_READ 0x0B/*< Fast read data*/ |
#define | SRAM4_REG_WRITE 0x02/*< Write data to memory array*/ |
#define | SRAM4_REG_STORE 0x3C/*< Software STORE*/ |
#define | SRAM4_REG_RECALL 0x60/*< Software RECALL*/ |
#define | SRAM4_REG_ASENB 0x59/*< AutoStore Enable*/ |
#define | SRAM4_REG_ASDISB 0x19/*< AutoStore Disable*/ |
#define | SRAM4_REG_SLEEP 0xB9/*< Sleep mode enable*/ |
#define | SRAM4_REG_WRSN 0xC2/*< Write serial number*/ |
#define | SRAM4_REG_RDSN 0xC3/*< Read serial number*/ |
#define | SRAM4_REG_FAST_RDSN 0xC9/*< Fast serial number read*/ |
#define | SRAM4_REG_RDID 0x9F/*< Read ID's*/ |
#define | SRAM4_REG_FAST_RDID 0x9E/*< Fast read ID's*/ |
#define | SRAM4_DEVICE_ID 0x06818818 |
SRAM 4 ID value. | |
#define | SRAM4_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection. | |
#define | SRAM4_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define | SRAM4_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | sram4_return_value_t { SRAM4_OK = 0 , SRAM4_ERROR = -1 } |
SRAM 4 Click return value data. More... | |
Functions | |
void | sram4_cfg_setup (sram4_cfg_t *cfg) |
SRAM 4 configuration object setup function. | |
err_t | sram4_init (sram4_t *ctx, sram4_cfg_t *cfg) |
SRAM 4 initialization function. | |
err_t | sram4_default_cfg (sram4_t *ctx) |
SRAM 4 default configuration function. | |
err_t | sram4_generic_command (sram4_t *ctx, uint8_t cmd) |
SRAM 4 command writing function. | |
err_t | sram4_generic_write (sram4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
SRAM 4 data writing function. | |
err_t | sram4_generic_read (sram4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
SRAM 4 data reading function. | |
err_t | sram4_generic_write_then_read (sram4_t *ctx, uint8_t *data_in, uint8_t in_len, uint8_t *data_out, uint8_t out_len) |
SRAM 4 data writing and reading function. | |
err_t | sram4_memory_write (sram4_t *ctx, uint16_t memory_adr, uint8_t *write_data, uint8_t write_len) |
Write data to memory. | |
err_t | sram4_memory_read (sram4_t *ctx, uint16_t memory_adr, uint8_t *read_data, uint8_t read_len) |
Read data from memory. | |
void | sram4_set_hold (sram4_t *ctx, uint8_t state) |
Set HOLD pin state. | |
This file contains API for SRAM 4 Click Driver.
enum sram4_return_value_t |