Seiji Ainoguchi / SerialFlash

Dependents:   SerialFlashTest

Fork of SerialFlash by Seiji Ainoguchi

SerialFlashDeviceCreator.cpp

Committer:
s_ain
Date:
2011-03-02
Revision:
2:6f8ab876b516
Parent:
0:d0117f54a7ee

File content as of revision 2:6f8ab876b516:

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

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