mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +00:00
83d1595a35
* Moved rascsi/rasctl/scsimon/rasdump.cpp to classes (for better testability) * Moved bus.* to hal folder * Removed some global variables * Fixed code redundancies
48 lines
1.0 KiB
C++
48 lines
1.0 KiB
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
|
// for Raspberry Pi
|
|
//
|
|
// Copyright (C) 2022 Uwe Seimet
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "hal/bus.h"
|
|
#include <vector>
|
|
|
|
using namespace std;
|
|
|
|
class RasDump
|
|
{
|
|
public:
|
|
|
|
RasDump() = default;
|
|
~RasDump() = default;
|
|
|
|
int run(const vector<char *>&);
|
|
|
|
private:
|
|
|
|
bool Banner(const vector<char *>&);
|
|
bool Init();
|
|
void Reset();
|
|
bool ParseArguments(const vector<char *>&);
|
|
bool WaitPhase(BUS::phase_t);
|
|
void BusFree();
|
|
bool Selection(int);
|
|
bool Command(uint8_t *, int);
|
|
int DataIn(uint8_t *, int);
|
|
int DataOut(uint8_t *, int);
|
|
int Status();
|
|
int MessageIn();
|
|
int TestUnitReady(int);
|
|
int RequestSense(int, uint8_t *);
|
|
int ModeSense(int, uint8_t *);
|
|
int Inquiry(int, uint8_t *);
|
|
int ReadCapacity(int, uint8_t *);
|
|
int Read10(int, uint32_t, uint32_t, uint32_t, uint8_t *);
|
|
int Write10(int, uint32_t, uint32_t, uint32_t, uint8_t *);
|
|
};
|