use num_enum::{IntoPrimitive, TryFromPrimitive};

pub const MANUFACTURER_ID: u8 = 0x7D;
pub const FAMILY_ID: [u8; 2] = [0x53, 0x58];

#[repr(u8)]
#[derive(IntoPrimitive, TryFromPrimitive)]
pub enum SysexOp {
    Diag = 0x01,
    Put = 0x02,
    Get = 0x03,
    RenderHash = 0x04,
    GetCryptoParams = 0x05,
    DiagResponse = 0x06,
    PutResp = 0x07,
    GetResp = 0x08,
    RenderHashResp = 0x09,
    GetCryptoParamsRes = 0x0a,
    Error = 0x0b,
}

mod request;
pub use request::{Request, parse_sysex_request};

mod response;
pub use response::{Response, parse_sysex_response};
