eeprom6 2.0.0.0
eeprom6.h File Reference

This file contains API for EEPROM 6 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_one_wire.h"

Go to the source code of this file.

Data Structures

struct  eeprom6_t
 EEPROM 6 Click context object. More...
 
struct  eeprom6_cfg_t
 EEPROM 6 Click configuration object. More...
 

Macros

#define EEPROM6_CMD_WRITE_SCRATCHPAD   0x0F
 EEPROM 6 commands list.
 
#define EEPROM6_CMD_READ_SCRATCHPAD   0xAA
 
#define EEPROM6_CMD_COPY_SCRATCHPAD   0x55
 
#define EEPROM6_CMD_READ_MEMORY   0xF0
 
#define EEPROM6_CMD_EXTENDED_READ_MEMORY   0xA5
 
#define EEPROM6_FAMILY_CODE   0x43
 EEPROM 6 family code value.
 
#define EEPROM6_ADDRESS_0   0x00
 EEPROM 6 address selection macros.
 
#define EEPROM6_ADDRESS_1   0x01
 
#define EEPROM6_ADDRESS_ALL   0xFF
 
#define EEPROM6_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  eeprom6_gpio_sel_t { EEPROM6_GPIO_0 , EEPROM6_GPIO_1 }
 EEPROM 6 Click gpio selector. More...
 
enum  eeprom6_return_value_t { EEPROM6_OK = 0 , EEPROM6_ERROR = -1 }
 EEPROM 6 Click return value data. More...
 

Functions

void eeprom6_cfg_setup (eeprom6_cfg_t *cfg)
 EEPROM 6 configuration object setup function.
 
void eeprom6_gpio_selection (eeprom6_cfg_t *cfg, eeprom6_gpio_sel_t gpio_sel)
 EEPROM 6 driver interface setup function.
 
err_t eeprom6_init (eeprom6_t *ctx, eeprom6_cfg_t *cfg)
 EEPROM 6 initialization function.
 
err_t eeprom6_default_cfg (eeprom6_t *ctx)
 EEPROM 6 default configuration function.
 
err_t eeprom6_check_communication (eeprom6_t *ctx)
 EEPROM 6 check communication function.
 
err_t eeprom6_select_device (eeprom6_t *ctx)
 EEPROM 6 select device function.
 
err_t eeprom6_read_scratchpad (eeprom6_t *ctx, uint8_t *scratchpad, uint8_t scratchpad_len)
 EEPROM 6 read scratchpad function.
 
err_t eeprom6_write_scratchpad (eeprom6_t *ctx, uint8_t *scratchpad, uint8_t scratchpad_len)
 EEPROM 6 write scratchpad function.
 
err_t eeprom6_read_mem (eeprom6_t *ctx, uint16_t reg_adr, uint8_t *data_in, uint16_t n_len)
 EEPROM 6 read memory function.
 
err_t eeprom6_write_mem (eeprom6_t *ctx, uint16_t reg_adr, uint8_t *data_in, uint16_t n_len)
 EEPROM 6 write memory function.
 

Detailed Description

This file contains API for EEPROM 6 Click Driver.

Enumeration Type Documentation

◆ eeprom6_gpio_sel_t

EEPROM 6 Click gpio selector.

Selects gpio pin of EEPROM 6 Click driver.

Enumerator
EEPROM6_GPIO_0 

GPIO 0 pin.

EEPROM6_GPIO_1 

GPIO 1 pin.

◆ eeprom6_return_value_t

EEPROM 6 Click return value data.

Predefined enum values for driver return values.

Enumerator
EEPROM6_OK 
EEPROM6_ERROR