Trait wlink::commands::Command

source ·
pub trait Command: Debug {
    type Response: Response;

    const COMMAND_ID: u8;

    // Required method
    fn payload(&self) -> Vec<u8>;

    // Provided method
    fn to_raw(&self) -> Vec<u8> { ... }
}
Expand description

Command to call the WCH-Link

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn payload(&self) -> Vec<u8>

Provided Methods§

source

fn to_raw(&self) -> Vec<u8>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Command for EraseCodeFlash

§

type Response = ()

source§

const COMMAND_ID: u8 = 13u8

source§

impl Command for SetPower

§

type Response = ()

source§

const COMMAND_ID: u8 = 13u8

source§

impl Command for ConfigChip

§

type Response = u8

source§

const COMMAND_ID: u8 = 6u8

source§

impl Command for DmiOp

source§

impl Command for GetChipInfo

source§

impl Command for Program

§

type Response = u8

source§

const COMMAND_ID: u8 = 2u8

source§

impl Command for Reset

§

type Response = ()

source§

const COMMAND_ID: u8 = 11u8

source§

impl Command for AttachChip

source§

impl Command for GetChipRomRamSplit

§

type Response = u8

source§

const COMMAND_ID: u8 = 13u8

source§

impl Command for GetProbeInfo

source§

impl Command for OptEnd

§

type Response = ()

source§

const COMMAND_ID: u8 = 13u8

source§

impl Command for SetChipRomRamSplit

§

type Response = ()

source§

const COMMAND_ID: u8 = 13u8

source§

impl Command for DisableDebug

§

type Response = ()

source§

const COMMAND_ID: u8 = 14u8

source§

impl Command for SetReadMemoryRegion

§

type Response = ()

source§

const COMMAND_ID: u8 = 3u8

source§

impl Command for SetSpeed

§

type Response = bool

source§

const COMMAND_ID: u8 = 12u8

source§

impl Command for SetWriteMemoryRegion

§

type Response = ()

source§

const COMMAND_ID: u8 = 1u8

source§

impl<const N: u8> Command for RawCommand<N>