Skip to content

Commit 2092c8b

Browse files
committed
allwinner h618: fix get wrong chip number in venv
1 parent 73a4af9 commit 2092c8b

File tree

1 file changed

+4
-2
lines changed
  • src/adafruit_blinka/microcontroller/allwinner/h618

1 file changed

+4
-2
lines changed

src/adafruit_blinka/microcontroller/allwinner/h618/pin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ def find_gpiochip_number(target_label):
2323

2424
return gpiochip_number
2525

26-
__chip_num = 1
27-
__chip_num = gpiochip_number = find_gpiochip_number("300b000.pinctrl")
26+
if find_gpiochip_number("300b000.pinctrl"):
27+
__chip_num = 1
28+
else:
29+
__chip_num = 0
2830

2931
PC0 = Pin((__chip_num, 64))
3032
SPI0_SCLK = PC0

0 commit comments

Comments
 (0)