onerom_protocol/lib.rs
1//! One ROM Protocol
2//!
3//! **Deprecated.** This protocol served the original STM32F4-based One ROM
4//! Lab. The current One ROM Lab is Fire (RP2350) firmware driven interactively
5//! over USB CDC, and does not use this crate. It is kept because the approach
6//! may return; do not build anything new on it.
7
8// Copyright (c) 2025 Piers Finlayson <piers@piers.rocks>
9//
10// MIT licence
11
12#![no_std]
13#![deprecated(
14 note = "superseded - the current One ROM Lab is driven over USB CDC and does not use this protocol"
15)]
16
17extern crate alloc;
18
19use onerom_database::Error as DbError;
20
21pub mod lab;
22
23#[derive(Debug, Clone, PartialEq, Eq)]
24pub enum Error {
25 /// Buffer too small for the data
26 BufferTooSmall,
27 /// Response was not as expected
28 InvalidResponse,
29 /// Invalid data received
30 InvalidData,
31 /// No ROM detected
32 NoRom,
33 /// ROM not recognised
34 RomNotRecognised,
35}
36
37impl From<DbError> for Error {
38 fn from(err: DbError) -> Self {
39 match err {
40 DbError::ParseError => Error::InvalidData,
41 }
42 }
43}