📄 eeprom.h
字号:
#ifndef _EEPROM_H
#define _EEPROM_H
/***********************************
Name: eeprom.h
Function:Erase and Program the EEPROM
Note: refer to the book "单片机嵌入式应用的在线开发方法" ,邵贝贝
Author: caolei
Data: 2006.2.26
************************************/
#define EraseInSector 0x40 //erase with sector command
#define ProgramInAlignedWord 0x20 //program with word command
#define EepromBeginAdd 0x0800 //eeprom begin address
#define EepromEndAdd 0x0900 //eeprom End address
#define NumberOfWord 2 //the TotalDistance's occupation
void ULongToUInt(unsigned long LongData,unsigned int IntH,unsigned int IntL);
void UIntToULong(unsigned long LongData,unsigned int IntH,unsigned int IntL);
void EepromErase(void); //erase eeprom
void EepromProgram(dword data); //save data into eeprom
dword ReadFromEeprom(void); //read data from eeprom
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -