mirror of https://github.com/ArduPilot/ardupilot
Added GetWritePage()
git-svn-id: https://arducopter.googlecode.com/svn/trunk@230 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
c58d9577ae
commit
c0e5fa9908
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue