Skip to content

Commit

Permalink
Change --help output to list all possible choices for --chip
Browse files Browse the repository at this point in the history
Also, make the parsing of the argument to --chip be case-insensitive
  • Loading branch information
pdietl committed Jan 23, 2024
1 parent 1cadff1 commit f3617f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ pub mod probe;
pub mod regs;
pub mod usb_device;

use clap::ValueEnum;
use probe::WchLink;

pub use crate::error::{Error, Result};

/// Currently supported RISC-V chip series/family
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, ValueEnum)]
#[repr(u8)]
pub enum RiscvChip {
/// CH32V103 RISC-V3A series
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Cli {
no_detach: bool,

/// Specify the chip type, e.g. CH32V30X
#[arg(long, global = true)]
#[arg(long, global = true, ignore_case = true)]
chip: Option<RiscvChip>,

/// Connection Speed
Expand Down

0 comments on commit f3617f7

Please sign in to comment.