pub enum RomType {
Type2364 {
cs: CsActive,
},
Type2332 {
cs1: CsActive,
cs2: CsActive,
},
Type2316 {
cs1: CsActive,
cs2: CsActive,
cs3: CsActive,
},
}Expand description
Supported types of ROMs. This type includes the chip select behaviour of the ROM, which was mask programmed at factory for the original ROM chips.
Variants§
Implementations§
Source§impl RomType
impl RomType
Sourcepub fn cs_active_mask(&self) -> usize
pub fn cs_active_mask(&self) -> usize
Returns the active CS mask for this ROM type.
pub const fn type_str(&self) -> &'static str
pub const fn cs_str(&self) -> &'static str
Sourcepub const fn binary_size() -> usize
pub const fn binary_size() -> usize
Retrieves the binary size of this structure when binary serialized.
Sourcepub fn from_bytes(buf: &[u8]) -> Result<Self, Error>
pub fn from_bytes(buf: &[u8]) -> Result<Self, Error>
Format is RomTypeByte followed by up to 3 CsActiveByte values.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RomType
impl<'de> Deserialize<'de> for RomType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for RomType
impl Eq for RomType
impl StructuralPartialEq for RomType
Auto Trait Implementations§
impl Freeze for RomType
impl RefUnwindSafe for RomType
impl Send for RomType
impl Sync for RomType
impl Unpin for RomType
impl UnwindSafe for RomType
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