GadgetSeed  0.9.6
eeprom_i2c.c ファイル

EEPROMドライバ(I2C接続) [詳解]

#include "device/i2c_ioctl.h"
#include "device.h"
#include "tkprintf.h"
#include "str.h"
eeprom_i2c.c の依存先関係図:

[ソースコード]

マクロ定義

#define USEBLOCKWRITE
 
#define DEV_ADDR0   0x50
 
#define DEV_ADDR1   0x51
 
#define EEPROMSIZE   ((long)1024*1024/8)
 
#define ONEDEVSIZE   (64*1024)
 
#define BLOCKSIZE   256
 

関数

static int eeprom_register (struct st_device *dev, char *param)
 
static int eeprom_unregister (struct st_device *dev)
 
static int eeprom_open (struct st_device *dev)
 
static int eeprom_close (struct st_device *dev)
 
static int eeprom_read (struct st_device *dev, void *data, unsigned int size)
 
static int eeprom_write (struct st_device *dev, const void *data, unsigned int size)
 
static int eeprom_seek (struct st_device *dev, int offset, int whence)
 

変数

static struct st_devicei2c_dev
 
static char i2c_devname [MAX_DEVNAMELRN]
 
static unsigned long eeprom_addr
 
const struct st_device eeprom_device
 

詳解

EEPROMドライバ(I2C接続)

日付
2015.09.27
著者
Takashi SHUDO

24C1024等 AKI-H8/3069用

eeprom_i2c.c に定義があります。

変数詳解

◆ eeprom_device

const struct st_device eeprom_device
初期値:
= {
.name = DEF_DEV_NAME_EEPRMOM,
.explan = "EEPROM(24C1024)",
.register_dev = eeprom_register,
.unregister_dev = eeprom_unregister,
.open = eeprom_open,
.close = eeprom_close,
.read = eeprom_read,
.write = eeprom_write,
.seek = eeprom_seek
}

eeprom_i2c.c145 行目に定義があります。