2011-11-12 23:29:07 -04:00
|
|
|
/* ************************************************************ */
|
|
|
|
/* 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();
|
2011-12-28 00:52:36 -04:00
|
|
|
void PageErase (uint16_t PageAdr);
|
2012-07-03 23:36:42 -03:00
|
|
|
void BlockErase (uint16_t BlockAdr);
|
2012-08-18 07:22:14 -03:00
|
|
|
void ChipErase(void (*delay_cb)(uint32_t));
|
2011-11-12 23:29:07 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DataFlash_APM1(); // Constructor
|
|
|
|
void Init();
|
|
|
|
void ReadManufacturerID();
|
2011-12-28 00:52:36 -04:00
|
|
|
bool CardInserted(void);
|
2011-11-12 23:29:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __DATAFLASH_APM1_H__
|