Skip to main content

MajorDeviceId

Enum MajorDeviceId 

Source
#[repr(u8)]
pub enum MajorDeviceId {
Show 13 variants W25_05 = 5, W25_10 = 16, W25_20 = 17, W25_40 = 18, W25_80 = 19, W25_16 = 20, W25_32 = 21, W25_64 = 22, W25_128 = 23, W25_256 = 24, W25_512 = 25, W25_01 = 32, W25_02 = 33,
}
Expand description

Major byte of the device identification (ID7-ID0) denoting chip capacity.

Note that the repr value corresponds to the Manufacturer/DeviceID command (0x90) and not the JEDEC ID (0x9F). The latter is the same value, but incremented by one (with exception of W25_512, which is incremented by seven).

Variants§

§

W25_05 = 5

W25X10 512kb device

§

W25_10 = 16

W25[QX]10 1Mb device

§

W25_20 = 17

W25[QX]20 2Mb device

§

W25_40 = 18

W25[QX]40 4Mb device

§

W25_80 = 19

W25[QX]80 8Mb device

§

W25_16 = 20

W25[QX]16 16Mb device

§

W25_32 = 21

W25[QX]32 32Mb device

§

W25_64 = 22

W25[QX]64 64Mb device

§

W25_128 = 23

W25Q128 128Mb device

§

W25_256 = 24

W25Q256 256Mb device

§

W25_512 = 25

W25Q512 512Mb device

§

W25_01 = 32

W25Q01 1Gb device

§

W25_02 = 33

W25Q02 2Gb device

Implementations§

Source§

impl MajorDeviceId

Source

pub const fn capacity(&self) -> u32

Capacity of a device that has the identifier assigned, in bytes.

Trait Implementations§

Source§

impl Clone for MajorDeviceId

Source§

fn clone(&self) -> MajorDeviceId

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MajorDeviceId

Source§

impl Debug for MajorDeviceId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<u8> for MajorDeviceId

Source§

type Error = TryFromReprError<u8>

The type returned in the event of a conversion error.
Source§

fn try_from(val: u8) -> Result<Self, TryFromReprError<u8>>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.