Skip to content

Commit 38d0952

Browse files
authored
Merge pull request #407 from MattHowardCT/spi-api-doc-correction
Correct mistake in SPI API documentation example
2 parents 104bfe6 + 8d9a85c commit 38d0952

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyftdi/doc/api/spi.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ Example: communication with a SPI device and an extra GPIO
5858
# Get a SPI port to a SPI slave w/ /CS on A*BUS3 and SPI mode 0 @ 12MHz
5959
slave = spi.get_port(cs=0, freq=12E6, mode=0)
6060
61-
# Get GPIO port to manage extra pins, use A*BUS4 as GPO, A*BUS4 as GPI
61+
# Get GPIO port to manage extra pins, use A*BUS4 as GPO, A*BUS5 as GPI
6262
gpio = spi.get_gpio()
63-
gpio.set_direction(0x30, 0x10)
63+
gpio.set_direction(pins=0b0011_0000, direction=0b0001_0000)
6464
6565
# Assert GPO pin
6666
gpio.write(0x10)

0 commit comments

Comments
 (0)