8000 docs: One more list fix in I2C & SPI. · boneskull/circuitpython@d97c522 · GitHub
[go: up one dir, main page]

Skip to content

Commit d97c522

Browse files
committed
docs: One more list fix in I2C & SPI.
1 parent 8787a6d commit d97c522

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/programming_guide/03_i2c_spi.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Now we're almost ready to read data from the sensor. However just like with I2C
169169
bytearray(b'\x01\xa8\x1a\xf0')
170170

171171
Before digging into the results let's break down what just happened:
172+
172173
- The with statement uses a context manager to automatically lock the SPI bus. You don't need to worry about locking and unlocking the bus by using the with statement, but again be sure to indent all the code that runs while the SPI bus is locked.
173174
- The :py:func:`busio.SPI.configure` function is called to configure the speed, phase, and polarity of the SPI bus. It's important to always call configure before talking to your device as communication with other devices might have changed the speed, polarity, etc. You'll need to look up the exact speed and other values from your device's datasheet. For the MAX31855 we'll use a 3D51 speed of 5mhz and a polarity and phase of 0 (sometimes called mode 0).
174175
- Next we toggle the CS line down to a low logic level. Remember with SPI each device needs a chip select line to tell it when it's ready to send and receive data.

0 commit comments

Comments
 (0)
0