burn_i2c_gatewayid.h

来自「这是I2c网关Id独立烧写程序」· C头文件 代码 · 共 21 行

H
21
字号
#ifndef _BURN_I2C_GATEWAYID
#define _BURN_I2C_GATEWAYID

typedef struct i2c_faraday_msg { 
unsigned short addr; /* device address */ 
unsigned short waddr; /* word address */ 
short len; /* msg length */ 
char *buf; /* pointer to msg data */ 
int clockdiv; /* for clock div */ 
int multiread_once ; /* decide to read multibyte once. if 0: read one byte by one; if 1: read multibyte once*/ 
}i2c_message; 

#define  GATEWAYID_PATH  "/mnt/mtd/gatewayid_conf"

int i2c_read(unsigned char begin_addr,int length);
int i2c_write_one(unsigned char begin_addr,unsigned char *buf);
int i2c_write_more(unsigned char begin_addr,unsigned char *buf,int length);
unsigned char* getvar_from_file(char *conf_path, char *get_name, unsigned char *get_value);
int defaults_setting();
static void help(void);
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?