Seiji Ainoguchi / SerialFlash

Dependents:   SerialFlashTest

Fork of SerialFlash by Seiji Ainoguchi

SerialFlashDeviceCreator.cpp

Committer:
s_ain
Date:
2011-03-01
Revision:
0:d0117f54a7ee
Child:
2:6f8ab876b516

File content as of revision 0:d0117f54a7ee:

#include "ISerialFlashDevice.h"
#include "SST25Device.h"
#include "M25PDevice.h"
#include "SerialFlashDeviceCreator.h"

ISerialFlashDevice* SerialFlashDeviceCreator::Create(ISPI* pSPI)
{
    if (M25PDevice::IsSupported(pSPI))
    {
        return M25PDevice::Create(pSPI);
    }
    if (SST25Device::IsSupported(pSPI))
    {
        return SST25Device::Create(pSPI);
    }
    return NULL;
}