#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Model {
MicArrayV2,
Xvf3800,
}
impl Model {
pub const fn product_id(self) -> u16 {
match self {
Self::MicArrayV2 => crate::PRODUCT_ID_V2,
Self::Xvf3800 => crate::PRODUCT_ID_XVF3800,
}
}
pub const fn label(self) -> &'static str {
match self {
Self::MicArrayV2 => "ReSpeaker Mic Array v2.0 (XVF-3000)",
Self::Xvf3800 => "reSpeaker XVF3800",
}
}
}
impl std::fmt::Display for Model {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.label())
}
}