Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4abf6a

Browse files
committed
hopefully fixes the readme
1 parent6db0ab1 commitb4abf6a

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

‎README.md‎

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,36 +57,36 @@ ESP32-ALL
5757
They exactly what they seem. It is easier to show a code example then it is to explain it.
5858

5959

60-
from machine import SPI
61-
62-
spi_bus = SPI.Bus(
63-
host=1,
64-
mosi=15,
65-
miso=16,
66-
sck=10
67-
)
68-
69-
spi_device = SPI.Device(
70-
spi_bus=spi_bus,
71-
freq=10000000,
72-
cs=3,
73-
polarity=0,
74-
phase=0,
75-
bits=8,
76-
first_bit=SPI.MSB
77-
)
78-
79-
#if you want to delete a device from being used you have to deinit it first
80-
#and then you can delete it
81-
spi_device.deinit()
82-
del spi_device
83-
84-
#if you want to stop using a bus and all devices attached to it
85-
del spi_bus
86-
del spi_device
87-
88-
#The SPI.Bus instance you need to pass to machine.SDCard, lcd_bus.SPIBus
89-
#and any of the touch drivers that use SPI.
60+
from machine import SPI
61+
62+
spi_bus = SPI.Bus(
63+
host=1,
64+
mosi=15,
65+
miso=16,
66+
sck=10
67+
)
68+
69+
spi_device = SPI.Device(
70+
spi_bus=spi_bus,
71+
freq=10000000,
72+
cs=3,
73+
polarity=0,
74+
phase=0,
75+
bits=8,
76+
first_bit=SPI.MSB
77+
)
78+
79+
# if you want to delete a device from being used you have to deinit it first
80+
# and then you can delete it
81+
spi_device.deinit()
82+
del spi_device
83+
84+
# if you want to stop using a bus and all devices attached to it
85+
del spi_bus
86+
del spi_device
87+
88+
# The SPI.Bus instance you need to pass to machine.SDCard, lcd_bus.SPIBus
89+
# and any of the touch drivers that use SPI.
9090

9191

9292
All methods that existed for the original`machine.SPI` are available in

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp