Enum wlink::RiscvChip

source ·
#[repr(u8)]
pub enum RiscvChip { CH32V103 = 1, CH57X = 2, CH56X = 3, CH32V20X = 5, CH32V30X = 6, CH58X = 7, CH32V003 = 9, CH8571 = 10, CH59X = 11, CH643 = 12, CH32X035 = 13, CH32L103 = 14, }
Expand description

Currently supported RISC-V chip series/family

Variants§

§

CH32V103 = 1

CH32V103 RISC-V3A series

§

CH57X = 2

CH571/CH573 RISC-V3A BLE 4.2 series

§

CH56X = 3

CH565/CH569 RISC-V3A series

§

CH32V20X = 5

CH32V20X RISC-V4B/V4C series

§

CH32V30X = 6

CH32V30X RISC-V4C/V4F series, The same as type 5

§

CH58X = 7

CH58x RISC-V4A BLE 5.3 series

§

CH32V003 = 9

CH32V003 RISC-V2A series

§

CH8571 = 10

RISC-V EC controller, undocumented.

§

CH59X = 11

CH59x RISC-V4C BLE 5.4 series, fallback as CH58X

§

CH643 = 12

CH643 RISC-V4C series, RGB Display Driver MCU

§

CH32X035 = 13

CH32X035 RISC-V4C PDUSB series, fallbak as CH643

§

CH32L103 = 14

CH32L103 RISC-V4C low power series

Implementations§

source§

impl RiscvChip

source

pub fn support_flash_protect(&self) -> bool

Support flash protect commands, and info query commands

source

pub fn support_query_info(&self) -> bool

Support config registers, query info(UID, etc.)

source

pub fn support_disable_debug(&self) -> bool

Very unsafe. This disables the debug interface of the chip. Command sequence is 810e0101

source

pub fn support_special_erase(&self) -> bool

Erase code flash by RST pin or power-off

source

pub fn reset_command(&self) -> Reset

source

pub fn post_init(&self, probe: &mut WchLink) -> Result<()>

Device-specific post init logic

source

pub fn data_packet_size(&self) -> usize

Packet data length of data endpoint

source

pub fn code_flash_start(&self) -> u32

source

pub fn write_pack_size(&self) -> u32

Trait Implementations§

source§

impl Clone for RiscvChip

source§

fn clone(&self) -> RiscvChip

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for RiscvChip

source§

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

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

impl FromStr for RiscvChip

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for RiscvChip

source§

fn eq(&self, other: &RiscvChip) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for RiscvChip

source§

impl Eq for RiscvChip

source§

impl StructuralEq for RiscvChip

source§

impl StructuralPartialEq for RiscvChip

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> 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.