2323from apio .utils import serial_util , usb_util , util
2424
2525
26- # --- apio devices usb
26+ # --- apio devices scan- usb
2727
2828
2929def _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
8282Examples:[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
112112def _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
165165Examples:[code]
166- apio devices serial # List the serial devices.[/code]
166+ apio devices scan- serial # List the serial devices.[/code]
167167
168168Note 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.
202202APIO_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)
227227def cli ():
0 commit comments