Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rockusb/examples/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ where
#[derive(Debug, clap::Parser)]
pub enum Command {
/// List rockchip devices in rockusb mode
#[command(alias = "ld")]
List,
/// Download boot code from a rockfile (maskrom mode)
#[command(alias = "db")]
DownloadBoot {
path: PathBuf,
},
Expand All @@ -367,13 +369,15 @@ pub enum Command {
DownloadDDR {
path: PathBuf,
},
#[command(alias = "rl")]
Read {
#[clap(value_parser=maybe_hex::<u32>)]
offset: u32,
#[clap(value_parser=maybe_hex::<u16>)]
length: u16,
path: PathBuf,
},
#[command(alias = "wl")]
Write {
#[clap(value_parser=maybe_hex::<u32>)]
offset: u32,
Expand All @@ -389,11 +393,17 @@ pub enum Command {
WriteBmap {
path: PathBuf,
},
#[command(alias = "rci")]
ChipInfo,
#[command(alias = "rid")]
FlashId,
#[command(alias = "rfi")]
FlashInfo,
#[command(alias = "rcb")]
Capability,
#[command(alias = "ef")]
EraseFlash,
#[command(alias = "rd")]
ResetDevice {
#[clap(value_enum, default_value_t=ArgResetOpcode::Reset)]
opcode: ArgResetOpcode,
Expand Down