eeprom7 2.0.0.0
eeprom7.h File Reference

This file contains API for EEPROM 7 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  eeprom7_t
 EEPROM 7 Click context object. More...
 
struct  eeprom7_cfg_t
 EEPROM 7 Click configuration object. More...
 

Macros

#define EEPROM7_OPCODE_STATUS_RDSR   0x05
 EEPROM 7 description register.
 
#define EEPROM7_OPCODE_STATUS_WRBP   0x08
 
#define EEPROM7_OPCODE_STATUS_WREN   0x06
 
#define EEPROM7_OPCODE_STATUS_WRDI   0x04
 
#define EEPROM7_OPCODE_STATUS_WRSR   0x01
 
#define EEPROM7_OPCODE_EEPROM_SECURITY_READ   0x03
 EEPROM 7 Security register instructions.
 
#define EEPROM7_OPCODE_EEPROM_SECURITY_WRITE   0x02
 
#define EEPROM7_OPCODE_EEPROM_SECURITY_RDEX   0x83
 
#define EEPROM7_OPCODE_EEPROM_SECURITY_WREX   0x82
 
#define EEPROM7_OPCODE_EEPROM_SECURITY_LOCK   0x82
 
#define EEPROM7_OPCODE_EEPROM_SECURITY_CHLK   0x83
 
#define EEPROM7_OPCODE_MP_REG_RMPR   0x31
 EEPROM 7 Memory partition register instructions.
 
#define EEPROM7_OPCODE_MP_REG_PRWE   0x07
 
#define EEPROM7_OPCODE_MP_REG_PRWD   0x0A
 
#define EEPROM7_OPCODE_MP_REG_WMPR   0x32
 
#define EEPROM7_OPCODE_MP_REG_PPAB   0x34
 
#define EEPROM7_OPCODE_MP_REG_FRZR   0x37
 
#define EEPROM7_OPCODE_MP_REG_SPID   0x9F
 EEPROM 7 Identification register instructions.
 
#define EEPROM7_OPCODE_SW_RESET_SRST   0x7C
 EEPROM 7 Device reset instruction.
 
#define EEPROM7_SEC_WRITE_DISABLE   0x00
 EEPROM 7 Write enable/disable.
 
#define EEPROM7_SEC_WRITE_ENABLE   0x01
 
#define EEPROM7_PIN_WRITE_PROTECT_DISABLE   0x00
 EEPROM 7 Pin state.
 
#define EEPROM7_PIN_WRITE_PROTECT_ENABLE   0x01
 
#define EEPROM7_PIN_HOLD_PROTECT_DISABLE   0x00
 
#define EEPROM7_PIN_HOLD_PROTECT_ENABLE   0x01
 
#define EEPROM7_STATUS_ERROR   0x00
 EEPROM 7 Status.
 
#define EEPROM7_STATUS_SUCCESS   0x01
 
#define EEPROM7_DUMMY   0x00
 
#define EEPROM7_ENABLE_WRITE_DISABLE   0x00
 
#define EEPROM7_ENABLE_WRITE_ENABLE   0x01
 
#define EEPROM7_DEVICE_NOT_READY   0x00
 
#define EEPROM7_DEVICE_IS_READY   0x01
 
#define EEPROM7_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  eeprom7_return_value_t { EEPROM7_OK = 0 , EEPROM7_ERROR = -1 }
 EEPROM 7 Click return value data. More...
 

Functions

void eeprom7_cfg_setup (eeprom7_cfg_t *cfg)
 EEPROM 7 configuration object setup function.
 
err_t eeprom7_init (eeprom7_t *ctx, eeprom7_cfg_t *cfg)
 EEPROM 7 initialization function.
 
err_t eeprom7_default_cfg (eeprom7_t *ctx)
 EEPROM 7 default configuration function.
 
err_t eeprom7_generic_write (eeprom7_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 EEPROM 7 data writing function.
 
err_t eeprom7_generic_read (eeprom7_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 EEPROM 7 data reading function.
 
err_t eeprom7_generic_write_then_read (eeprom7_t *ctx, uint8_t *data_in, uint8_t len_in, uint8_t *data_out, uint8_t len_out)
 EEPROM 7 data writing function.
 
void eeprom7_enable_write_protect (eeprom7_t *ctx, uint8_t en_write_protect)
 Enable write protect function.
 
void eeprom7_enable_hold_operation (eeprom7_t *ctx, uint8_t en_hold)
 Enable hold operation function.
 
void eeprom7_enable_write (eeprom7_t *ctx, uint8_t en_write)
 Enable write function.
 
uint16_t eeprom7_read_status (eeprom7_t *ctx)
 Read status function.
 
uint8_t eeprom7_is_device_ready (eeprom7_t *ctx)
 Check the device is ready function.
 
err_t eeprom7_send_cmd (eeprom7_t *ctx, uint8_t cmd)
 Send command function.
 
void eeprom7_sw_reset (eeprom7_t *ctx)
 Software device reset function.
 
void eeprom7_set_status (eeprom7_t *ctx, uint8_t status)
 Set status function.
 
uint8_t eeprom7_get_status (eeprom7_t *ctx)
 Get status function.
 
void eeprom7_write_memory (eeprom7_t *ctx, uint32_t addr, uint8_t *p_tx_data, uint8_t n_bytes)
 Write EEPROM memory function.
 
void eeprom7_read_memory (eeprom7_t *ctx, uint32_t addr, uint8_t *p_rx_data, uint8_t n_bytes)
 Read EEPROM memory function.
 
err_t eeprom7_check_status (eeprom7_t *ctx, uint8_t check_bit)
 Status register bits check function.
 

Detailed Description

This file contains API for EEPROM 7 Click Driver.

Enumeration Type Documentation

◆ eeprom7_return_value_t

EEPROM 7 Click return value data.

Predefined enum values for driver return values.

Enumerator
EEPROM7_OK 
EEPROM7_ERROR