📄 24c02.h
字号:
/***********************************************************
header file for operation at24c02
***********************************************************/
#ifndef _24C02_H_
#define _24C02_H_
#define DEVICE_W 0xA0
#define DEVICE_R 0xA1
#define MAX_AT2402 0x08
/***********************************************************
* write one byte
* input parameter: 1r:address 2 :pointer of data
* output parameter: 0:failed 1:success
***********************************************************/
unsigned char WriteByte(unsigned int addr,unsigned char *pbuf);
/***********************************************************
* write byte more than one
* input parameter: 1:address 2:buffer pointer of data 3: size by writing
* output parameter: 0:failed 1:success
* attention the num must be less than device max writen num
***********************************************************/
unsigned char WritePage(unsigned int addr,unsigned char *pbuf,unsigned int num);
/***********************************************************
* Read one byte
* input parameter: 1r:address 2 :pointer of data
* output parameter: 0:failed 1:success
***********************************************************/
unsigned char ReadByte(unsigned int addr,unsigned char *pbuf);
/***********************************************************
* Read byte more than one
* input parameter: 1r:address 2 :pointer of data 3:size by reading
* output parameter: 0:failed 1:success
***********************************************************/
unsigned char ReadSeq(unsigned int addr,unsigned char *pbuf,unsigned int num);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -