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: SST25Device.cpp
- Revision:
- 0:d0117f54a7ee
- Child:
- 2:6f8ab876b516
diff -r 000000000000 -r d0117f54a7ee SST25Device.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SST25Device.cpp Tue Mar 01 15:44:13 2011 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+#include "SST25DeviceImpl.h"
+#include "SST25Device.h"
+
+bool SST25Device::IsSupported(ISPI* pSPI)
+{
+ return SST25DeviceImpl::IsSupported(pSPI);
+}
+
+SST25Device* SST25Device::Create(ISPI* pSPI)
+{
+ SST25DeviceImpl* pImpl = SST25DeviceImpl::Create(pSPI);
+ if (pImpl == NULL)
+ {
+ return NULL;
+ }
+ return new SST25Device(pImpl);
+}
+
+
+SST25Device::SST25Device(SST25DeviceImpl* pImpl)
+ : _pImpl(pImpl)
+{
+
+}
+
+string SST25Device::GetDeviceName(void) const
+{
+ return _pImpl->GetDeviceName();
+}
+
+int SST25Device::GetCapacity(void) const
+{
+ return _pImpl->GetCapacity();
+}
+
+void SST25Device::ChipErase(void)
+{
+ _pImpl->ChipErase();
+}
+
+int SST25Device::Read(int address, void* buffer, int length)
+{
+ return _pImpl->Read(address, buffer, length);
+}
+
+int SST25Device::Write(int address, const void* buffer, int length)
+{
+ return _pImpl->Write(address, buffer, length);
+}
