Refactor: Chipset architecture, remove supported/status gatekeeping

- PlatformType → Chipset enum (MediaTek, Renesas)
- unlock_mode + unlock_buf_id stored in profile, not derived from enum
- Removed ReadinessStatus, supported field, needs_flash — library is agnostic
- Removed DriveMatch/Flashable — if we have a profile, try unlock
- profiles.json: chipset + unlock_mode + unlock_buf_id, no program/supported
- mt1959.rs reads mode/buf_id from profile fields directly
- Tests: find_known_drive, find_unknown_drive
This commit is contained in:
MattJackson
2026-04-06 11:21:27 -07:00
parent afb43c69b3
commit c26b6f6819
7 changed files with 914 additions and 520 deletions
+2 -3
View File
@@ -25,10 +25,9 @@
//!
//! let mut session = DriveSession::open(
//! Path::new("/dev/sr0"),
//! Path::new("profiles/"),
//! ).unwrap();
//!
//! session.enable().unwrap();
//! session.unlock().unwrap();
//! session.calibrate().unwrap();
//!
//! let mut buf = vec![0u8; 2048];
@@ -46,7 +45,7 @@ pub mod speed;
pub use error::{Error, Result};
pub use drive::DriveSession;
pub use identity::DriveId;
pub use profile::{DriveProfile, PlatformType};
pub use profile::{DriveProfile, Chipset};
pub use platform::{Platform, DriveStatus};
pub use scsi::ScsiTransport;
pub use speed::DriveSpeed;