Skip to content

Busnum - #69

Merged
sjoerdsimons merged 3 commits into
mainfrom
busnum
Aug 12, 2026
Merged

Busnum#69
sjoerdsimons merged 3 commits into
mainfrom
busnum

Conversation

@sjoerdsimons

Copy link
Copy Markdown
Collaborator

No description provided.

dingari and others added 3 commits August 11, 2026 21:16
…ching on DeviceArg

busnum() is only available on Linux. The cross-platform equivalent is
bus_id().

* Linux: String version of the busnum (e.g. \"001\")
* MacOS: Top byte of the location ID (e.g. \"01\")
* Windows: Unsure

In any case, it should be consistent with the output of the `list`
command  in the example
Run the tests on linux, windows and macos instead of just linux. Also
pin each to specific OS versions to avoid issues when defaults change.
Let the example code recognize both numeric and string bus numbers. For
platforms with numeric bus numbers that avoid matching exactly the bus
format.

In particular nusb uses a 3 digit, 0-prefixed number for the bus
on linux (e.g. 003). This avoids the user having to put in `003` but
allows using just `3` for the bus.

As common is used by both examples, but the various functions might not
be used by both... Sadly, a healthy does of allowing unused/dead_code is
required avoid warnings
@sjoerdsimons
sjoerdsimons added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 59ed8cc Aug 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants