MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / Status

Method Status

cpp/controllers/scsi_controller.cpp:244–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void ScsiController::Status()
245{
246 if (!IsStatus()) {
247 // Minimum execution time
248 // TODO Why is a delay needed? Is this covered by the SCSI specification?
249 if (execstart > 0) {
250 Sleep();
251 } else {
252 SysTimer::SleepUsec(5);
253 }
254
255 stringstream s;
256 s << "Status phase, status is $" << setfill('0') << setw(2) << hex << static_cast<int>(GetStatus());
257 LogTrace(s.str());
258 SetPhase(phase_t::status);
259
260 // Signal line operated by the target
261 GetBus().SetMSG(false);
262 GetBus().SetCD(true);
263 GetBus().SetIO(true);
264
265 // Data transfer is 1 byte x 1 block
266 ResetOffset();
267 SetLength(1);
268 SetBlocks(1);
269 GetBuffer()[0] = (uint8_t)GetStatus();
270
271 return;
272 }
273
274 Send();
275}
276
277void ScsiController::MsgIn()
278{

Callers

nothing calls this directly

Calls 3

SetMSGMethod · 0.45
SetCDMethod · 0.45
SetIOMethod · 0.45

Tested by

no test coverage detected