sram2 2.0.0.0
sram2.h File Reference

This file contains API for SRAM 2 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  sram2_t
 Click ctx object definition. More...
 
struct  sram2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define SRAM2_MAP_MIKROBUS(cfg, mikrobus)
 
#define SRAM2_RETVAL   uint8_t
 
#define SRAM2_OK   0x00
 
#define SRAM2_INIT_ERROR   0xFF
 
#define SRAM2_WR_ENABLE   0x01
 
#define SRAM2_WR_DISABLE   0x00
 
#define SRAM2_SLAVE_ADDR_0_0   0x51
 
#define SRAM2_SLAVE_ADDR_0_1   0x53
 
#define SRAM2_SLAVE_ADDR_1_0   0x55
 
#define SRAM2_SLAVE_ADDR_1_1   0x57
 

Functions

void sram2_cfg_setup (sram2_cfg_t *cfg)
 Config Object Initialization function.
 
SRAM2_RETVAL sram2_init (sram2_t *ctx, sram2_cfg_t *cfg)
 Initialization function.
 
void sram2_generic_write (sram2_t *ctx, uint16_t reg, uint8_t wr_data)
 Generic write function.
 
void sram2_generic_read (sram2_t *ctx, uint16_t reg, uint8_t *rx_data)
 Generic read function.
 
void sram2_write_protect (sram2_t *ctx, uint8_t state)
 Set PWM pin for write protection.
 

Detailed Description

This file contains API for SRAM 2 Click driver.