mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-22 16:33:17 +00:00
1c0179e7e3
* Moved rasdump and monitor to sub-folders, cleaned up code * Fixes rasdump issues and added additional features like device type check, LUN support and configurable buffer size
28 lines
697 B
C++
28 lines
697 B
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
|
// for Raspberry Pi
|
|
//
|
|
// Copyright (C) 2022 akuker
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#include "hal/gpiobus_factory.h"
|
|
#include "hal/gpiobus.h"
|
|
|
|
using namespace std;
|
|
|
|
unique_ptr<BUS> GPIOBUS_Factory::Create(BUS::mode_e mode)
|
|
{
|
|
// TODO Make the factory a friend of GPIOBUS and make the GPIOBUS constructor private
|
|
// so that clients cannot use it anymore but have to use the factory.
|
|
// Also make Init() private.
|
|
if (auto bus = make_unique<GPIOBUS>(); bus->Init(mode)) {
|
|
bus->Reset();
|
|
|
|
return bus;
|
|
}
|
|
|
|
return nullptr;
|
|
}
|