Enum ecpdap::ECP5IDCODE
source · [−]#[repr(u32)]
pub enum ECP5IDCODE {
LFE5U_12,
LFE5U_25,
LFE5U_45,
LFE5U_85,
LFE5UM_25,
LFE5UM_45,
LFE5UM_85,
LFE5UM5G_25,
LFE5UM5G_45,
LFE5UM5G_85,
}
Expand description
IDCODEs for all ECP5 device types.
Variants
LFE5U_12
LFE5U_25
LFE5U_45
LFE5U_85
LFE5UM_25
LFE5UM_45
LFE5UM_85
LFE5UM5G_25
LFE5UM5G_45
LFE5UM5G_85
Implementations
sourceimpl ECP5IDCODE
impl ECP5IDCODE
pub fn try_from_idcode(idcode: IDCODE) -> Option<Self>
pub fn try_from_u32(idcode: u32) -> Option<Self>
pub fn try_from_name(name: &str) -> Option<Self>
pub fn name(&self) -> &'static str
sourcepub fn compatible(&self, other: ECP5IDCODE) -> bool
pub fn compatible(&self, other: ECP5IDCODE) -> bool
Returns whether the provided IDCODE is considered compatible with this IDCODE.
IDCODEs considered compatible:
- LFE5U_12, LFE5U_25, LFE5UM_25, LFE5UM5G_25
- LFE5U_45, LFE5UM_45, LFE5UM5G_45
- LFE5U_85, LFE5UM_85, LFE5UM5G_85
sourcepub fn config_bits_per_frame(&self) -> (usize, usize, usize)
pub fn config_bits_per_frame(&self) -> (usize, usize, usize)
Number of configuration bits per frame.
Returns (pad_bits_before_frame, bits_per_frame, pad_bits_after_frame).
Trait Implementations
sourceimpl Clone for ECP5IDCODE
impl Clone for ECP5IDCODE
sourcefn clone(&self) -> ECP5IDCODE
fn clone(&self) -> ECP5IDCODE
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ECP5IDCODE
impl Debug for ECP5IDCODE
sourceimpl From<&ECP5IDCODE> for IDCODE
impl From<&ECP5IDCODE> for IDCODE
sourcefn from(id: &ECP5IDCODE) -> IDCODE
fn from(id: &ECP5IDCODE) -> IDCODE
Converts to this type from the input type.
sourceimpl From<ECP5IDCODE> for IDCODE
impl From<ECP5IDCODE> for IDCODE
sourcefn from(id: ECP5IDCODE) -> IDCODE
fn from(id: ECP5IDCODE) -> IDCODE
Converts to this type from the input type.
sourceimpl PartialEq<ECP5IDCODE> for ECP5IDCODE
impl PartialEq<ECP5IDCODE> for ECP5IDCODE
sourcefn eq(&self, other: &ECP5IDCODE) -> bool
fn eq(&self, other: &ECP5IDCODE) -> bool
sourceimpl TryFrom<u32> for ECP5IDCODE
impl TryFrom<u32> for ECP5IDCODE
type Error = TryFromPrimitiveError<ECP5IDCODE>
type Error = TryFromPrimitiveError<ECP5IDCODE>
The type returned in the event of a conversion error.
sourcefn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for ECP5IDCODE
impl TryFromPrimitive for ECP5IDCODE
type Primitive = u32
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for ECP5IDCODE
impl Eq for ECP5IDCODE
impl StructuralEq for ECP5IDCODE
impl StructuralPartialEq for ECP5IDCODE
Auto Trait Implementations
impl RefUnwindSafe for ECP5IDCODE
impl Send for ECP5IDCODE
impl Sync for ECP5IDCODE
impl Unpin for ECP5IDCODE
impl UnwindSafe for ECP5IDCODE
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more