mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Documentation/szpi-esp32s3: Add doc for GPIO
Basic NuttShell configuration console and GPIO(e.g. IO39 as SPI D/C) enabled. Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
8156211355
commit
c97307b24a
@@ -297,3 +297,35 @@ Then comparing memory size with the basic "nsh" config::
|
|||||||
nsh> free
|
nsh> free
|
||||||
total used free maxused maxfree nused nfree name
|
total used free maxused maxfree nused nfree name
|
||||||
8785268 161516 8623752 161888 8388592 41 2 Umem
|
8785268 161516 8623752 161888 8388592 41 2 Umem
|
||||||
|
|
||||||
|
gpio
|
||||||
|
----
|
||||||
|
|
||||||
|
Basic NuttShell configuration console and GPIO enabled.
|
||||||
|
|
||||||
|
===== ========== ===============
|
||||||
|
Num Type Func / Location
|
||||||
|
===== ========== ===============
|
||||||
|
IO39 Output LCD SPI D/C
|
||||||
|
IO10 Input GP1.25-5P expansion interface 1 (left side, near the speaker)
|
||||||
|
IO11 Interrupt GP1.25-5P expansion interface 1 (left side, near the speaker)
|
||||||
|
===== ========== ===============
|
||||||
|
|
||||||
|
You can run the configuration and compilation procedure::
|
||||||
|
|
||||||
|
$ ./tools/configure.sh lckfb-szpi-esp32s3:gpio
|
||||||
|
$ make flash -j$(nproc) ESPTOOL_PORT=/dev/ttyUSB0
|
||||||
|
|
||||||
|
Then test gpio39(IO39)::
|
||||||
|
|
||||||
|
# With hardware check, the pin levels meet the expected requirements.
|
||||||
|
|
||||||
|
# Output high
|
||||||
|
nsh> echo 1 > /dev/gpio39
|
||||||
|
nsh> cat /dev/gpio39
|
||||||
|
1
|
||||||
|
|
||||||
|
# Output low
|
||||||
|
nsh> echo 0 > /dev/gpio39
|
||||||
|
nsh> cat /dev/gpio39
|
||||||
|
0
|
||||||
|
|||||||
Reference in New Issue
Block a user