Add other enums

This commit is contained in:
Oystein Tveit 2023-08-29 16:29:49 +02:00
parent a8e72dbfb3
commit 227c8a4a09
5 changed files with 46 additions and 1 deletions

15
src/device.rs Normal file
View File

@ -0,0 +1,15 @@
pub enum Device {
DirectAccessDevice, // (SBC-4)
ZonedBlockDevice, // (ZBC)
SequentialAccessDevice, // (SSC-5)
ProcessorDevice, // (SPC-2)
CDDVDDevice, // (MMC-6)
OpticalMemoryDevice, // (SBC)
MediaChangerDevice, // (SMC-3)
StorageArrayDevice, // (SCC-2)
EnclosureServicesDevice, // (SES-3)
SimplifiedDirectAccessDevice, // (RBC)
OpticalCardReaderWriterDevice, // (OCRW)
AutomationDriveInterfaceDevice, // (ADC-4)
ObjectBasedStorageDevice, // (OSD-2)
}

View File

@ -1,3 +1,6 @@
#![no_std] #![no_std]
pub mod commands; pub mod command;
pub mod device;
pub mod status;
pub mod sense_key;

17
src/sense_key.rs Normal file
View File

@ -0,0 +1,17 @@
pub enum SenseKey {
NoSense = 0x00,
RecoveredError = 0x01,
NotReady = 0x02,
MediumError = 0x03,
HardwareError = 0x04,
IllegalRequest = 0x05,
UnitAttention = 0x06,
DataProtect = 0x07,
BlankCheck = 0x08,
VendorSpecific = 0x09,
CopyAborted = 0x0A,
AbortedCommand = 0x0B,
VolumeOverflow = 0x0D,
Miscompare = 0x0E,
Completed = 0x0F,
}

10
src/status.rs Normal file
View File

@ -0,0 +1,10 @@
pub enum Status {
Good = 0x00,
CheckCondition = 0x02,
ConditionMet = 0x04,
Busy = 0x08,
ReservationConflict = 0x18,
TaskSetFull = 0x28,
AcaActive = 0x30,
TaskAborted = 0x40,
}