ardupilot/libraries/DataFlash/DataFlash_APM1.h
Andrew Tridgell dd26ef3089 dataflash: reworked classes to move most code to parent class
this moves all the non-hardware specific code to the parent
DataFlash_Class class, keeping the hw specific code much smaller and
simpler.

This should prevent discrepancies creeping in between APM1 and APM2
support again
2011-12-26 19:17:11 +11:00

32 lines
942 B
C++

/* ************************************************************ */
/* Test for DataFlash Log library */
/* ************************************************************ */
#ifndef __DATAFLASH_APM1_H__
#define __DATAFLASH_APM1_H__
#include "DataFlash.h"
class DataFlash_APM1 : public DataFlash_Class
{
private:
//Methods
unsigned char BufferRead (unsigned char BufferNum, uint16_t IntPageAdr);
void BufferWrite (unsigned char BufferNum, uint16_t IntPageAdr, unsigned char Data);
void BufferToPage (unsigned char BufferNum, uint16_t PageAdr, unsigned char wait);
void PageToBuffer(unsigned char BufferNum, uint16_t PageAdr);
void WaitReady();
unsigned char ReadStatusReg();
unsigned char ReadStatus();
uint16_t PageSize();
public:
DataFlash_APM1(); // Constructor
void Init();
void ReadManufacturerID();
void PageErase (uint16_t PageAdr);
void ChipErase ();
};
#endif // __DATAFLASH_APM1_H__