fram5 2.0.0.0
fram5.h File Reference

This file contains API for FRAM 5 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  fram5_t
 FRAM 5 Click context object. More...
 
struct  fram5_cfg_t
 FRAM 5 Click configuration object. More...
 

Macros

#define FRAM5_MIN_ADDRESS   0x00000
 FRAM 5 memory address range.
 
#define FRAM5_MAX_ADDRESS   0x1FFFF
 
#define FRAM5_SLAVE_ID   0x7C
 FRAM 5 slave ID.
 
#define FRAM5_MANUFACTURER_ID_DENSITY   0x44
 FRAM 5 device ID.
 
#define FRAM5_DEVICE_ADDRESS_A2A1_00   0x50
 FRAM 5 device address setting.
 
#define FRAM5_DEVICE_ADDRESS_A2A1_01   0x52
 
#define FRAM5_DEVICE_ADDRESS_A2A1_10   0x54
 
#define FRAM5_DEVICE_ADDRESS_A2A1_11   0x56
 
#define FRAM5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  fram5_return_value_t { FRAM5_OK = 0 , FRAM5_ERROR = -1 }
 FRAM 5 Click return value data. More...
 

Functions

void fram5_cfg_setup (fram5_cfg_t *cfg)
 FRAM 5 configuration object setup function.
 
err_t fram5_init (fram5_t *ctx, fram5_cfg_t *cfg)
 FRAM 5 initialization function.
 
err_t fram5_memory_write (fram5_t *ctx, uint32_t address, uint8_t *data_in, uint8_t len)
 FRAM 5 memory write function.
 
err_t fram5_memory_read (fram5_t *ctx, uint32_t address, uint8_t *data_out, uint8_t len)
 FRAM 5 memory read function.
 
err_t fram5_check_communication (fram5_t *ctx)
 FRAM 5 check communication function.
 
void fram5_write_protect (fram5_t *ctx)
 FRAM 5 write protect function.
 
void fram5_write_enable (fram5_t *ctx)
 FRAM 5 write enable function.
 

Detailed Description

This file contains API for FRAM 5 Click Driver.

Enumeration Type Documentation

◆ fram5_return_value_t

FRAM 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
FRAM5_OK 
FRAM5_ERROR