File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ bundle <bundle_installation>`.
30
30
To install:
31
31
32
32
#. Download and unzip the `latest release zip <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/releases >`_.
33
- #. Copy the unzipped ``adafruit_bus_device `` to the ``lib `` directory on the ``CIRCUITPY `` or `` MICROPYTHON `` drive.
33
+ #. Copy the unzipped ``adafruit_bus_device `` to the ``lib `` directory on the ``CIRCUITPY `` drive.
34
34
35
35
API
36
36
---
Original file line number Diff line number Diff line change @@ -45,8 +45,11 @@ class SPIDevice:
45
45
cs = digitalio.DigitalInOut(D10)
46
46
device = SPIDevice(spi_bus, cs)
47
47
bytes_read = bytearray(4)
48
+ # The object assigned to spi in the with statements below
49
+ # is the original spi_bus object. We are using the busio.SPI
50
+ # operations busio.SPI.readinto() and busio.SPI.write().
48
51
with device as spi:
49
- spi_device .readinto(bytes_read)
52
+ spi .readinto(bytes_read)
50
53
# A second transaction
51
54
with device as spi:
52
55
spi.write(bytes_read)
You can’t perform that action at this time.
0 commit comments