Added GetWritePage()

git-svn-id: https://arducopter.googlecode.com/svn/trunk@230 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
deweibel 2010-08-18 18:29:03 +00:00
parent c58d9577ae
commit c0e5fa9908
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,7 @@
WriteInt(data) : Write an integer (2 bytes) WriteInt(data) : Write an integer (2 bytes)
WriteLong(data) : Write a long (4 bytes) WriteLong(data) : Write a long (4 bytes)
StartRead(page) : Start a read on (page) StartRead(page) : Start a read on (page)
GetWritePage() : Returns the last page written to
GetPage() : Returns the last page read GetPage() : Returns the last page read
ReadByte() ReadByte()
ReadInt() ReadInt()
@ -274,6 +275,12 @@ void DataFlash_Class::WriteLong(long data)
WriteByte(data&0xFF); // Last byte WriteByte(data&0xFF); // Last byte
} }
// Get the last page written to
int DataFlash_Class::GetWritePage()
{
return(df_PageAdr);
}
// Get the last page read // Get the last page read
int DataFlash_Class::GetPage() int DataFlash_Class::GetPage()
{ {

View File

@ -67,6 +67,7 @@ class DataFlash_Class
void Init(); void Init();
void ReadManufacturerID(); void ReadManufacturerID();
int GetPage(); int GetPage();
int GetWritePage();
void PageErase (unsigned int PageAdr); void PageErase (unsigned int PageAdr);
// Write methods // Write methods
void StartWrite(int PageAdr); void StartWrite(int PageAdr);