mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-22 16:33:17 +00:00
08194af424
- Moved C++ code to cpp/ from src/raspberrypi - Related updates to Makefile, easyinstall.sh, and the github build rules - Removed the native X68k C code in src/x68k from the repo
31 lines
768 B
C++
31 lines
768 B
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
|
// for Raspberry Pi
|
|
//
|
|
// Copyright (C) 2022 akuker
|
|
// [ GPIO bus factory ]
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#include <memory>
|
|
|
|
#include "hal/gpiobus_allwinner.h"
|
|
#include "hal/gpiobus_factory.h"
|
|
#include "hal/gpiobus_raspberry.h"
|
|
#include "hal/sbc_version.h"
|
|
#include "log.h"
|
|
|
|
using namespace std;
|
|
|
|
unique_ptr<GPIOBUS> GPIOBUS_Factory::Create()
|
|
{
|
|
if (SBC_Version::IsBananaPi()) {
|
|
LOGTRACE("Creating GPIOBUS_Allwinner")
|
|
return make_unique<GPIOBUS_Allwinner>();
|
|
} else {
|
|
LOGTRACE("Creating GPIOBUS_Raspberry")
|
|
return make_unique<GPIOBUS_Raspberry>();
|
|
}
|
|
}
|