Skip to content

Commit df15f5c

Browse files
authored
Merge pull request #870 from zapta/main
Renamed apio device usb/serial to scan-usb/serial.
2 parents 93c09b9 + 18523b3 commit df15f5c

File tree

12 files changed

+85
-85
lines changed

12 files changed

+85
-85
lines changed

.github/workflows/monitor-apio-latest.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ jobs:
7474
apio sim --no-gtkwave
7575
apio graph -n
7676
apio format
77-
apio devices usb
78-
apio devices serial
77+
apio devices scan-usb
78+
apio devices scan-serial
7979
8080
find .
8181
@@ -104,8 +104,8 @@ jobs:
104104
apio sim --no-gtkwave
105105
apio graph -n
106106
apio format
107-
apio devices usb
108-
apio devices serial
107+
apio devices scan-usb
108+
apio devices scan-serial
109109
110110
find .
111111
@@ -134,8 +134,8 @@ jobs:
134134
apio sim --no-gtkwave
135135
apio graph -n
136136
apio format
137-
apio devices usb
138-
apio devices serial
137+
apio devices scan-usb
138+
apio devices scan-serial
139139
140140
find .
141141

COMMANDS.txt

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Setup commands:
5656
apio preferences Manage the apio user preferences.
5757
apio packages Manage the apio packages.
5858
apio drivers Manage the operating system drivers.
59-
apio devices List attached devices.
59+
apio devices Scan attached devices.
6060

6161
Utility commands:
6262
apio boards List available board definitions.
@@ -439,31 +439,30 @@ apio devices
439439
Usage: apio devices [OPTIONS] COMMAND [ARGS]...
440440

441441
The command group 'apio devices' includes subcommands that lists
442-
devices
443-
that are attached to the computer. It's main usage is diagnostics or
444-
devices connectivity and drivers.
442+
devices that are attached to the computer. It's main usage is
443+
diagnostics or devices connectivity and drivers.
445444

446445
Options:
447446
-h, --help Show this message and exit.
448447

449448
Subcommands:
450-
apio devices usb List USB devices.
451-
apio devices serial List serial devices.
449+
apio devices scan-usb Scan for USB devices.
450+
apio devices scan-serial Scan for serial devices.
452451

453452

454453

455454
--------------------------------------------
456455

457-
apio devices serial
456+
apio devices scan-serial
458457

459-
Usage: apio devices serial [OPTIONS]
458+
Usage: apio devices scan-serial [OPTIONS]
460459

461-
The command 'apio devices serial' displays the serial devices
462-
currently connected to your computer. It is useful for diagnosing FPGA
463-
board connectivity issues.
460+
The command 'apio devices scan-serial' scans and displays the serial
461+
devicescurrently connected to your computer. It is useful for
462+
diagnosing FPGA board connectivity issues.
464463

465464
Examples:
466-
apio devices serial # List the serial devices.
465+
apio devices scan-serial # List the serial devices.
467466

468467
Note that devices such as FTDI FTDI2232 that have more than one
469468
channel are listed as multiple rows, one for each of their serial
@@ -480,16 +479,16 @@ Options:
480479

481480
--------------------------------------------
482481

483-
apio devices usb
482+
apio devices scan-usb
484483

485-
Usage: apio devices usb [OPTIONS]
484+
Usage: apio devices scan-usb [OPTIONS]
486485

487-
The command 'apio devices usb' displays the USB devices currently
488-
connected to your computer. It is useful for diagnosing FPGA board
489-
connectivity issues.
486+
The command 'apio devices scan-usb' scans and display the USB devices
487+
currently connected to your computer. It is useful for diagnosing FPGA
488+
board connectivity issues.
490489

491490
Examples:
492-
apio devices usb # List the usb devices.
491+
apio devices scan-usb # List the usb devices.
493492

494493
Options:
495494
-h, --help Show this message and exit.

apio/commands/apio_devices.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
from apio.utils import serial_util, usb_util, util
2424

2525

26-
# --- apio devices usb
26+
# --- apio devices scan-usb
2727

2828

2929
def _list_usb_devices(apio_ctx: ApioContext) -> None:
30-
"""Lists the connected USB devices in table format."""
30+
"""Scans and display the connected USB devices in table format."""
3131

3232
devices = usb_util.scan_usb_devices(apio_ctx=apio_ctx)
3333

@@ -74,25 +74,25 @@ def _list_usb_devices(apio_ctx: ApioContext) -> None:
7474

7575

7676
# -- Text in the rich-text format of the python rich library.
77-
APIO_DEVICES_USB_HELP = """
78-
The command 'apio devices usb' displays the USB devices currently \
79-
connected to your computer. It is useful for diagnosing FPGA board \
77+
APIO_DEVICES_SCAN_USB_HELP = """
78+
The command 'apio devices scan-usb' scans and display the USB devices \
79+
currently connected to your computer. It is useful for diagnosing FPGA board \
8080
connectivity issues.
8181
8282
Examples:[code]
83-
apio devices usb # List the usb devices.[/code]
83+
apio devices scan-usb # List the usb devices.[/code]
8484
8585
"""
8686

8787

8888
@click.command(
89-
name="usb",
89+
name="scan-usb",
9090
cls=ApioCommand,
91-
short_help="List USB devices.",
92-
help=APIO_DEVICES_USB_HELP,
91+
short_help="Scan for USB devices.",
92+
help=APIO_DEVICES_SCAN_USB_HELP,
9393
)
94-
def _usb_cli():
95-
"""Implements the 'apio devices usb' command."""
94+
def _scan_usb_cli():
95+
"""Implements the 'apio devices scan-usb' command."""
9696

9797
# Create the apio context.
9898
apio_ctx = ApioContext(
@@ -106,11 +106,11 @@ def _usb_cli():
106106
sys.exit(0)
107107

108108

109-
# -- apio devices serial
109+
# -- apio devices scan-serial
110110

111111

112112
def _list_serial_devices() -> None:
113-
"""Lists the connected serial devices in table format."""
113+
"""Scans and displays the connected serial devices in table format."""
114114

115115
devices = serial_util.scan_serial_devices()
116116

@@ -157,13 +157,13 @@ def _list_serial_devices() -> None:
157157

158158

159159
# -- Text in the rich-text format of the python rich library.
160-
APIO_DEVICES_SERIAL_HELP = """
161-
The command 'apio devices serial' displays the serial devices currently \
162-
connected to your computer. It is useful for diagnosing FPGA board \
160+
APIO_DEVICES_SCAN_SERIAL_HELP = """
161+
The command 'apio devices scan-serial' scans and displays the serial devices\
162+
currently connected to your computer. It is useful for diagnosing FPGA board \
163163
connectivity issues.
164164
165165
Examples:[code]
166-
apio devices serial # List the serial devices.[/code]
166+
apio devices scan-serial # List the serial devices.[/code]
167167
168168
Note that devices such as FTDI FTDI2232 that have more than one channel \
169169
are listed as multiple rows, one for each of their serial ports.
@@ -175,13 +175,13 @@ def _list_serial_devices() -> None:
175175

176176

177177
@click.command(
178-
name="serial",
178+
name="scan-serial",
179179
cls=ApioCommand,
180-
short_help="List serial devices.",
181-
help=APIO_DEVICES_SERIAL_HELP,
180+
short_help="Scan for serial devices.",
181+
help=APIO_DEVICES_SCAN_SERIAL_HELP,
182182
)
183-
def _serial_cli():
184-
"""Implements the 'apio devices serial' command."""
183+
def _scan_serial_cli():
184+
"""Implements the 'apio devices scan-serial' command."""
185185

186186
# -- Create the apio context. We create it for consistency though
187187
# -- we don't use .t
@@ -200,8 +200,8 @@ def _serial_cli():
200200

201201
# -- Text in the rich-text format of the python rich library.
202202
APIO_DEVICES_HELP = """
203-
The command group 'apio devices' includes subcommands that lists devices
204-
that are attached to the computer. It's main usage is diagnostics or
203+
The command group 'apio devices' includes subcommands that lists devices \
204+
that are attached to the computer. It's main usage is diagnostics or \
205205
devices connectivity and drivers.
206206
"""
207207

@@ -210,8 +210,8 @@ def _serial_cli():
210210
ApioSubgroup(
211211
"Subcommands",
212212
[
213-
_usb_cli,
214-
_serial_cli,
213+
_scan_usb_cli,
214+
_scan_serial_cli,
215215
],
216216
)
217217
]
@@ -221,7 +221,7 @@ def _serial_cli():
221221
name="devices",
222222
cls=ApioGroup,
223223
subgroups=SUBGROUPS,
224-
short_help="List attached devices.",
224+
short_help="Scan attached devices.",
225225
help=APIO_DEVICES_HELP,
226226
)
227227
def cli():

apio/managers/drivers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
8. {E1}Disconnect and reconnect[/] your FPGA board for the new driver
5353
to take affect.
5454
55-
9. {E1}Run the command 'apio devices usb'[/] and verify that
55+
9. {E1}Run the command 'apio devices scan-usb'[/] and verify that
5656
your board is listed.
5757
"""
5858

@@ -100,7 +100,7 @@
100100
3. Find the Serial installer window and {E1}follow the instructions.[/]
101101
102102
4. To verify, {E1}disconnect and reconnect the board[/] and run the command
103-
{E1}'apio devices serial'.[/]
103+
{E1}'apio devices scan-serial'.[/]
104104
"""
105105

106106
# -- Text in the rich-text format of the python rich library.

apio/managers/programmers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _match_serial_device(
298298
if not matching:
299299
cerror("No matching serial device.")
300300
cout(
301-
"Type 'apio devices serial' for available serial devices.",
301+
"Type 'apio devices scan-serial' for available serial devices.",
302302
style=INFO,
303303
)
304304
sys.exit(1)
@@ -307,7 +307,7 @@ def _match_serial_device(
307307
if len(matching) > 1:
308308
cerror("Found multiple matching serial devices.")
309309
cout(
310-
"Type 'apio devices serial' for available serial devices.",
310+
"Type 'apio devices scan-serial' for available serial devices.",
311311
style=INFO,
312312
)
313313
sys.exit(1)
@@ -364,7 +364,7 @@ def _match_usb_device(
364364
if not matching:
365365
cerror("No matching USB device.")
366366
cout(
367-
"Type 'apio devices usb' for available usb devices.",
367+
"Type 'apio devices scan-usb' for available usb devices.",
368368
style=INFO,
369369
)
370370
sys.exit(1)
@@ -373,7 +373,7 @@ def _match_usb_device(
373373
if len(matching) > 1:
374374
cerror("Found multiple matching usb devices.")
375375
cout(
376-
"Type 'apio devices usb' for available usb device.",
376+
"Type 'apio devices scan-usb' for available usb device.",
377377
style=INFO,
378378
)
379379
sys.exit(1)
@@ -424,7 +424,7 @@ def _check_device_presence(apio_ctx: ApioContext, scanner: _DeviceScanner):
424424
if not matching_devices:
425425
cerror("No matching device.")
426426
cout(
427-
"Type 'apio devices usb' for available usb devices.",
427+
"Type 'apio devices scan-usb' for available usb devices.",
428428
style=INFO,
429429
)
430430
sys.exit(1)

docs/board-drivers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ Apio provides two types of driver: `ftdi` and `serial`. The table below compares
1313
| Platforms | Linux, Windows | Linux, Windows |
1414
| Driver install | `apio drivers install ftdi` | `apio drivers install serial` |
1515
| Driver uninstall | `apio drivers uninstall ftdi` | `apio drivers uninstall serial` |
16-
| List devices | `apio devices usb` | `apio devices serial` |
16+
| List devices | `apio devices scan-usb` | `apio devices scan-serial` |

docs/cmd-apio-devices.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
## apio devices
66

7-
The `apio devices` command group lists devices connected to your computer.
8-
It is mainly used for diagnosing connectivity or driver issues.
7+
The `apio devices` command group scans and displays devices connected to your
8+
computer. It is mainly used for diagnosing connectivity or driver issues.
99

1010
<h3>Options</h3>
1111

@@ -16,22 +16,22 @@ It is mainly used for diagnosing connectivity or driver issues.
1616
<h3>Subcommands</h3>
1717

1818
```
19-
apio devices usb
20-
apio devices serial
19+
apio devices scan-usb
20+
apio devices scan-serial
2121
```
2222

2323
---
2424

25-
## apio devices usb
25+
## apio devices scan-usb
2626

27-
The command `apio devices usb` displays the USB devices currently
28-
connected to your computer. It is useful for diagnosing FPGA board
27+
The command `apio devices scan-usb` scans and displays the USB devices
28+
currently connected to your computer. It is useful for diagnosing FPGA board
2929
connectivity issues.
3030

3131
<h3>Examples</h3>
3232

3333
```
34-
apio devices usb # List USB devices.
34+
apio devices scan-usb # Lists USB devices.
3535
```
3636

3737
<h3>Options</h3>
@@ -42,20 +42,20 @@ apio devices usb # List USB devices.
4242

4343
Example output
4444

45-
![](assets/apio-devices-usb.png)
45+
![](assets/apio-devices-scanusb.png)
4646

4747
---
4848

49-
## apio devices serial
49+
## apio devices scan-serial
5050

51-
The command `apio devices serial` displays the serial devices
51+
The command `apio devices scan-serial` scans and displays the serial devices
5252
currently connected to your computer. It is useful for diagnosing FPGA
5353
board connectivity issues.
5454

5555
<h3>Examples</h3>
5656

5757
```
58-
apio devices serial # List serial devices.
58+
apio devices scan-serial # List serial devices.
5959
```
6060

6161
<h3>Options</h3>
@@ -70,8 +70,9 @@ apio devices serial # List serial devices.
7070
multiple entries—one per serial port.
7171

7272
- On Windows, manufacturer and product strings of FTDI based devices may
73-
show their FTDI generic values rather than the custom values such as 'Alhambra II' set by the device manufacturer.
73+
show their FTDI generic values rather than the custom values such as
74+
'Alhambra II' set by the device manufacturer.
7475

7576
Example output
7677

77-
![](assets/apio-devices-serial.png)
78+
![](assets/apio-devices-scanserial.png)

0 commit comments

Comments
 (0)