Skip to content

Commit 262edff

Browse files
doc: version command cleanup (#119)
Co-authored-by: Daniel Schaefer <[email protected]>
1 parent d0e23a0 commit 262edff

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ For device specific commands, see their individual documentation pages.
4242
###### Permissions on Linux
4343
To ensure that the input module's port is accessible, install the `udev` rule and trigger a reload:
4444

45-
```
45+
```sh
4646
sudo cp release/50-framework-inputmodule.rules /etc/udev/rules.d/
4747
sudo udevadm control --reload && sudo udevadm trigger
4848
```
@@ -72,7 +72,7 @@ to a single device, specify the COM port.
7272
In this example the command is targeted at `b1-display`, so it will only apply
7373
to this module type.
7474

75-
```
75+
```sh
7676
# Example on Linux
7777
> inputmodule-control --serial-dev /dev/ttyACM0 b1-display --pattern black
7878

@@ -88,7 +88,7 @@ connected and then send the command.
8888

8989
```
9090
> inputmodule-control b1-display --pattern black
91-
Failed to find serial devivce. Please manually specify with --serial-dev
91+
Failed to find serial device. Please manually specify with --serial-dev
9292
9393
# No failure, waits until the device is connected, sends command and exits
9494
> inputmodule-control --wait-for-device b1-display --pattern black
@@ -105,7 +105,7 @@ Device already present. No need to wait. Not executing command.
105105
First, put the module into bootloader mode.
106106

107107
This can be done either by pressing the bootsel button while plugging it in or
108-
by using one of the following commands:
108+
by using one of the following commands:
109109

110110
```sh
111111
inputmodule-control led-matrix --bootloader
@@ -144,7 +144,7 @@ cargo make --cwd b1display
144144
cargo make --cwd c1minimal
145145
```
146146

147-
Generate the UF2 update file:
147+
Generate the UF2 update file into `target/thumbv6m-none-eabi/release/`:
148148

149149
```sh
150150
cargo make --cwd ledmatrix uf2
@@ -159,7 +159,7 @@ Dependencies: [Rust/rustup](https://rustup.rs/), pkg-config, libudev
159159
Currently have to specify the build target because it's not possible to specify a per package build target.
160160
Tracking issue: https://github.com/rust-lang/cargo/issues/9406
161161

162-
```
162+
```sh
163163
# Install cargo-make to help build it
164164
cargo install cargo-make
165165

commands.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ When no parameters are given, the current value is queried and returned.
5656
| InvertScreen | 0x15 | ` D ` | | bool | Invert scren on/off |
5757
| SetPxCol | 0x16 | ` D ` | | 50 Bytes | Send a column of pixels |
5858
| FlushFB | 0x17 | ` D ` | | | Flush all columns |
59-
| Version | 0x20 | ` D ` | 3 Bytes | | Get firmware version |
59+
| Version | 0x20 | `LDM` | 3 Bytes | | Get firmware version |
6060

6161
#### Pattern (0x01)
6262

@@ -93,8 +93,15 @@ TODO
9393

9494
Response:
9595

96-
```
96+
```plain
9797
Byte 0: USB bcdDevice MSB
9898
Byte 1: USB bcdDevice LSB
9999
Byte 2: 1 if pre-release version, 0 otherwise
100+
101+
+-- Major version
102+
| +-- Minor version
103+
| | +-- Patch version
104+
| | | +-- 1 if is pre-release,
105+
| | | | 0 otherwise
106+
MMMMMMMM mmmmPPPP 0000000p
100107
```

inputmodule-control/src/inputmodule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub fn find_serialdevs(args: &crate::ClapCli, wait_for_device: bool) -> (Vec<Str
160160
pub fn serial_commands(args: &crate::ClapCli) {
161161
let (serialdevs, waited): (Vec<String>, bool) = find_serialdevs(args, args.wait_for_device);
162162
if serialdevs.is_empty() {
163-
println!("Failed to find serial devivce. Please manually specify with --serial-dev");
163+
println!("Failed to find serial device. Please manually specify with --serial-dev");
164164
return;
165165
} else if args.wait_for_device && !waited {
166166
println!("Device already present. No need to wait. Not executing command. Sleep 1s");

0 commit comments

Comments
 (0)