pub enum Chip {
Mt1959,
Mt1939,
}Expand description
A MediaTek optical controller generation.
Deliberately exhaustive: a new generation is a breaking change, so every caller that dispatches on the chip must decide how to handle it.
Variants§
Implementations§
Source§impl Chip
impl Chip
Sourcepub const fn from_digits(d0: u8, d1: u8) -> Option<Self>
pub const fn from_digits(d0: u8, d1: u8) -> Option<Self>
Map the two trailing digits of an MTEKMT19xx or MT19xx tag.
Sourcepub fn from_tag(bytes: &[u8]) -> Option<Self>
pub fn from_tag(bytes: &[u8]) -> Option<Self>
The chip named by the first MTEKMT19xx identity tag in bytes.
This tag is authoritative. The boot banner names the bootloader
generation instead: MT1939 parts can carry an MT1959 Boot banner.
The chip named by a boot banner such as MT1939 Boot JB7. Weaker than
Chip::from_tag; use only when no identity tag exists.
Trait Implementations§
impl Copy for Chip
impl Eq for Chip
Source§impl Ord for Chip
impl Ord for Chip
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Chip
impl PartialOrd for Chip
impl StructuralPartialEq for Chip
Auto Trait Implementations§
impl Freeze for Chip
impl RefUnwindSafe for Chip
impl Send for Chip
impl Sync for Chip
impl Unpin for Chip
impl UnsafeUnpin for Chip
impl UnwindSafe for Chip
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more