hiodong
28-08-2009, 09:03 PM
trong file dataEEPROM.h có nội dung
/*
* ReadEErow prototype:
* Parameters Definition:
* Page: is the 8 most significant bits of the source address in EEPROM
* Offset: is 16 least significant bits of the source address in EEPROM
* DataOut: is the 16-bit address of the destination RAM location or array
* Size: is the number of words to read from EEPROM and is a value of 1 or 16
* Return Value:
* Function returns ERROREE (or -1) if Size is invalid
*/
extern int ReadEE(int Page, int Offset, int* DataOut, int Size);
/*
* EraseEErow prototype:
* Parameters Definition:
* Page: is the 8 most significant bits of the address in EEPROM to be erased
* Offset: is 16 least significant bits of the address in EEPROM to be erased
* Size: is the number of words to read from EEPROM and is a value of 1, 16 or
* 0xFFFF (for erasing ALL EEPROM memory)
* Return Value:
* Function returns ERROREE (or -1) if Size is invalid
*/
extern int EraseEE(int Page, int Offset, int Size);
/*
* WriteEErow prototype:
* Parameters Definition:
* Page: is the 8 most significant bits of the destination address in EEPROM
* Offset: is 16 least significant bits of the destination address in EEPROM
* DataIn: is the 16-bit address of the source RAM location or array
* Size: is the number of words to read from EEPROM and is a value of 1 or 16
* Return Value:
* Function returns ERROREE (or -1) if Size is invalid
*/
extern int WriteEE(int* DataIn, int Page, int Offset, int Size);
Em dùng thử mà kết quả ko chính xác, đồng thời ko hiểu rõ ý nghĩa của Page , Offset lắm
Nhờ mọi người giúp đỡ !
/*
* ReadEErow prototype:
* Parameters Definition:
* Page: is the 8 most significant bits of the source address in EEPROM
* Offset: is 16 least significant bits of the source address in EEPROM
* DataOut: is the 16-bit address of the destination RAM location or array
* Size: is the number of words to read from EEPROM and is a value of 1 or 16
* Return Value:
* Function returns ERROREE (or -1) if Size is invalid
*/
extern int ReadEE(int Page, int Offset, int* DataOut, int Size);
/*
* EraseEErow prototype:
* Parameters Definition:
* Page: is the 8 most significant bits of the address in EEPROM to be erased
* Offset: is 16 least significant bits of the address in EEPROM to be erased
* Size: is the number of words to read from EEPROM and is a value of 1, 16 or
* 0xFFFF (for erasing ALL EEPROM memory)
* Return Value:
* Function returns ERROREE (or -1) if Size is invalid
*/
extern int EraseEE(int Page, int Offset, int Size);
/*
* WriteEErow prototype:
* Parameters Definition:
* Page: is the 8 most significant bits of the destination address in EEPROM
* Offset: is 16 least significant bits of the destination address in EEPROM
* DataIn: is the 16-bit address of the source RAM location or array
* Size: is the number of words to read from EEPROM and is a value of 1 or 16
* Return Value:
* Function returns ERROREE (or -1) if Size is invalid
*/
extern int WriteEE(int* DataIn, int Page, int Offset, int Size);
Em dùng thử mà kết quả ko chính xác, đồng thời ko hiểu rõ ý nghĩa của Page , Offset lắm
Nhờ mọi người giúp đỡ !