Skip to content

Commit 70f2685

Browse files
committed
gs_usb: improve docs, don't use dev reference before assignment as requested in review #1790 (review) by @zariiii9003
1 parent a7d6478 commit 70f2685

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/interfaces/gs_usb.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Usage: pass device ``index`` or ``channel`` (starting from 0) if using automatic
1313
::
1414

1515
import can
16+
import usb
17+
dev = usb.core.find(idVendor=0x1D50, idProduct=0x606F)
1618

1719
bus = can.Bus(interface="gs_usb", channel=dev.product, index=0, bitrate=250000)
1820
bus = can.Bus(interface="gs_usb", channel=0, bitrate=250000) # same

0 commit comments

Comments
 (0)