Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SerialFlash by
Diff: M25PDevice.h
- Revision:
- 0:d0117f54a7ee
- Child:
- 2:6f8ab876b516
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/M25PDevice.h Tue Mar 01 15:44:13 2011 +0000
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <memory>
+#include <string>
+#include "ISerialFlashDevice.h"
+
+class ISPI;
+class M25PDeviceImpl;
+
+class M25PDevice : public ISerialFlashDevice
+{
+public:
+ static M25PDevice* Create(ISPI* pSPI);
+ static bool IsSupported(ISPI* pSPI);
+
+ virtual std::string GetDeviceName(void) const;
+ virtual int GetCapacity(void) const;
+ virtual void ChipErase(void);
+ virtual int Read(int address, void* buffer, int length);
+ virtual int Write(int address, const void* buffer, int length);
+
+private:
+ std::auto_ptr<M25PDeviceImpl> _pImpl;
+ M25PDevice(M25PDeviceImpl* pImpl);
+};
