1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-17 13:29:02 +00:00
CLK/Storage/MassStorage/SCSI/DirectAccessDevice.cpp

25 lines
563 B
C++
Raw Normal View History

2019-08-23 03:16:58 +00:00
//
// DirectAccessDevice.cpp
// Clock Signal
//
// Created by Thomas Harte on 22/08/2019.
// Copyright © 2019 Thomas Harte. All rights reserved.
//
#include "DirectAccessDevice.hpp"
using namespace SCSI;
bool DirectAccessDevice::read(const Target::CommandState &state, Target::Responder &responder) {
std::vector<uint8_t> data(512);
for(size_t c = 0; c < 512; ++c) {
data[c] = uint8_t(c);
}
2019-08-23 03:16:58 +00:00
responder.send_data(std::move(data), [] (const Target::CommandState &state, Target::Responder &responder) {
responder.end_command();
});
return true;
}