📄 at24c03.h
字号:
#ifndef _AT24C02_H_
#define _AT24C02_H_
/*
* AT24C02 Two-wire Serial EEPROM
* ′|àí?÷ààDí£oC51
* °?±?£o1 è??ú£o2006-12-31
* ×÷??£o??μ?í?<yangdewang@gmail.com>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA. Or, point your browser to
* http://www.gnu.org/copyleft/gpl.html
*/
#include <configure.h>
//#define AT24C02_READBYTE_U
//#define AT24C02_WRITEBYTE_U
//#define MULTI_AT24C02 //?à??AT24C02£??òê1ó?24C04ò?é?
//PAGE WRITE: The 1K/2K EEPROM is capable of an 8-byte page write,
//and the 4K, 8K and 16K devices are capable of 16-byte page writes.
#ifndef AT24C02_PAGE_SIZE
#define AT24C02_PAGE_SIZE 8
#endif//AT24C02_PAGE_SIZE
#ifdef MULTI_AT24C02
extern uint8 At24c02Choice;
#endif//MULTI_AT24C02
//×¢òaá?′????°D′24c02?±·?·¨μ?μ÷ó?μ?ê±??????D?′óóú5ms
/*****************************************
D′êy?Yμ?24c02
×¢òa£o 1?óúò3D′??2???24c02??μμ
datAdd: êy?Yμ??·
Dat: êy?Y????
Count: êy?Y×??úêy
return: 3é1|D′è?×??úêy
******************************************/
uint8 Write24c02(uint8 datAdd,uint8* Dat,uint8 Count);
/*****************************************
?áêy?Y′ó24c02
×¢òa£o áaD?μ??áè?í?D′è?ò??ùóDê±???T??
òò?a?ú?á?°?′DDá?D′?üá?ò?éè??μ??·
datAdd: êy?Yμ??·
dat: êy?Y????
count: êy?Y×??úêy
return: 3é1|?áè?×??úêy
******************************************/
uint8 Read24c02(uint8 datAdd,uint8* dat,uint8 count);
/*****************************************
á?D??áêy?Y′ó24c02
dat: êy?Y????
count: êy?Y×??úêy
return: 3é1|?áè?×??úêy
******************************************/
uint8 Read24c02Stream(uint8* dat,uint8 count);
//×¢òaá?′????°D′24c02?±·?·¨μ?μ÷ó?μ?ê±??????D?′óóú5ms
#ifdef AT24C02_WRITEBYTE_U
bool WriteByte24c02(uint8 Add,uint8 dat);//D′ò?×??úμ?24c02//Add:μ??·£?dat:êy?Y£?re=true D′è?3é1|
#endif//AT24C02_WRITEBYTE_U
#ifdef AT24C02_READBYTE_U
extern bool ReadByte24c02(uint8 Add,uint8 *dat);//?áò?×??ú′ó24c02//Add:μ??·£?dat:êy?Y????£?re=true ?áè?3é1|
#endif //AT24C02_READBYTE_U
#endif//_AT24C02_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -