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
SST25Device.h@2:6f8ab876b516, 2011-03-02 (annotated)
- Committer:
- s_ain
- Date:
- Wed Mar 02 16:09:09 2011 +0000
- Revision:
- 2:6f8ab876b516
- Parent:
- 0:d0117f54a7ee
change SPI interface
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| s_ain | 0:d0117f54a7ee | 1 | #pragma once |
| s_ain | 0:d0117f54a7ee | 2 | |
| s_ain | 0:d0117f54a7ee | 3 | #include <memory> |
| s_ain | 0:d0117f54a7ee | 4 | #include <string> |
| s_ain | 0:d0117f54a7ee | 5 | #include "ISerialFlashDevice.h" |
| s_ain | 0:d0117f54a7ee | 6 | |
| s_ain | 2:6f8ab876b516 | 7 | class ISPICommand; |
| s_ain | 0:d0117f54a7ee | 8 | class SST25DeviceImpl; |
| s_ain | 0:d0117f54a7ee | 9 | |
| s_ain | 0:d0117f54a7ee | 10 | class SST25Device : public ISerialFlashDevice |
| s_ain | 0:d0117f54a7ee | 11 | { |
| s_ain | 0:d0117f54a7ee | 12 | public: |
| s_ain | 2:6f8ab876b516 | 13 | static SST25Device* Create(ISPICommand* pSPICommand); |
| s_ain | 2:6f8ab876b516 | 14 | static bool IsSupported(ISPICommand* pSPICommand); |
| s_ain | 0:d0117f54a7ee | 15 | |
| s_ain | 0:d0117f54a7ee | 16 | virtual std::string GetDeviceName(void) const; |
| s_ain | 0:d0117f54a7ee | 17 | virtual int GetCapacity(void) const; |
| s_ain | 0:d0117f54a7ee | 18 | virtual void ChipErase(void); |
| s_ain | 0:d0117f54a7ee | 19 | virtual int Read(int address, void* buffer, int length); |
| s_ain | 0:d0117f54a7ee | 20 | virtual int Write(int address, const void* buffer, int length); |
| s_ain | 0:d0117f54a7ee | 21 | |
| s_ain | 0:d0117f54a7ee | 22 | private: |
| s_ain | 0:d0117f54a7ee | 23 | std::auto_ptr<SST25DeviceImpl> _pImpl; |
| s_ain | 0:d0117f54a7ee | 24 | SST25Device(SST25DeviceImpl* pImpl); |
| s_ain | 0:d0117f54a7ee | 25 | }; |
