sram 2.0.0.0
sram.h File Reference

This file contains API for SRAM 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  sram_t
 Click ctx object definition. More...
 
struct  sram_cfg_t
 Click configuration structure definition. More...
 

Macros

#define SRAM_MAP_MIKROBUS(cfg, mikrobus)
 
#define SRAM_RETVAL   uint8_t
 
#define SRAM_OK   0x00
 
#define SRAM_INIT_ERROR   0xFF
 
#define SRAM_CMD_WRMR   0x01
 
#define SRAM_CMD_WRITE   0x02
 
#define SRAM_CMD_READ   0x03
 
#define SRAM_CMD_RDMR   0x05
 
#define SRAM_CMD_EQIO   0x38
 
#define SRAM_CMD_EDIO   0x3B
 
#define SRAM_CMD_RSTIO   0xFF
 
#define SRAM_MODE_REG_BM   0x00
 
#define SRAM_MODE_REG_PM   0x80
 
#define SRAM_MODE_REG_SM   0x40
 

Functions

void sram_cfg_setup (sram_cfg_t *cfg)
 Config Object Initialization function.
 
SRAM_RETVAL sram_init (sram_t *ctx, sram_cfg_t *cfg)
 Initialization function.
 
void sram_generic_transfer (sram_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void sram_generic_write (sram_t *ctx, uint8_t *wr_buf, uint16_t wr_len)
 Generic write function.
 
void sram_write_byte (sram_t *ctx, uint32_t reg_address, uint8_t write_data)
 Generic write byte of data funcion.
 
uint8_t sram_read_byte (sram_t *ctx, uint32_t reg_address)
 Generic read byte of data funcion.
 
void sram_write_mode_reg_ins (sram_t *ctx, uint8_t ins_data)
 Write mode register instruction funcion.
 
uint8_t sram_read_mode_reg_ins (sram_t *ctx)
 Read mode register instruction funcion.
 
void sram_soft_reset (sram_t *ctx)
 Soft reset funcion.
 
void sram_hold_transmission (sram_t *ctx)
 Suspend transmission funcion.
 

Detailed Description

This file contains API for SRAM Click driver.