2022-11-09 03:11:36 -05:00
|
|
|
|
.. This file gets included from other .rst files in this folder.
|
|
|
|
|
.. It contains target-specific snippets.
|
|
|
|
|
.. Comments and '---' lines act as delimiters.
|
|
|
|
|
..
|
|
|
|
|
.. This is necessary mainly because RST doesn't support substitutions
|
|
|
|
|
.. (defined in RST, not in Python) inside code blocks. If that is ever implemented,
|
|
|
|
|
.. These code blocks can be moved back to the main .rst files, with target-specific
|
|
|
|
|
.. file names being replaced by substitutions.
|
|
|
|
|
|
|
|
|
|
.. gpio-summary
|
|
|
|
|
|
|
|
|
|
{IDF_TARGET_NAME} 芯片具有 22 个物理 GPIO 管脚(GPIO0 ~ GPIO21)。每个管脚都可用作一个通用 IO,或连接一个内部的外设信号。通过 GPIO 交换矩阵和 IO MUX,可配置外设模块的输入信号来源于任何的 IO 管脚,并且外设模块的输出信号也可连接到任意 IO 管脚。这些模块共同组成了芯片的 IO 控制。更多详细信息,请参阅 *{IDF_TARGET_NAME} 技术参考手册* > *IO MUX 和 GPIO 矩阵(GPIO、IO_MUX)* [`PDF <{IDF_TARGET_TRM_CN_URL}#iomuxgpio>`__]。
|
|
|
|
|
|
|
|
|
|
下表提供了各管脚的详细信息,部分 GPIO 具有特殊的使用限制,具体可参考表中的注释列。
|
|
|
|
|
|
|
|
|
|
.. list-table::
|
|
|
|
|
:header-rows: 1
|
|
|
|
|
:widths: 12 12 22
|
|
|
|
|
|
|
|
|
|
* - GPIO
|
|
|
|
|
- 模拟功能
|
|
|
|
|
- 注释
|
|
|
|
|
|
|
|
|
|
* - GPIO0
|
|
|
|
|
- ADC1_CH0
|
|
|
|
|
- RTC
|
|
|
|
|
|
|
|
|
|
* - GPIO1
|
|
|
|
|
- ADC1_CH1
|
|
|
|
|
- RTC
|
|
|
|
|
|
|
|
|
|
* - GPIO2
|
|
|
|
|
- ADC1_CH2
|
|
|
|
|
- Strapping 管脚;RTC
|
|
|
|
|
|
|
|
|
|
* - GPIO3
|
|
|
|
|
- ADC1_CH3
|
|
|
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
|
|
|
-
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
2023-03-13 22:18:22 -04:00
|
|
|
|
- Strapping 管脚:GPIO2、GPIO8、和 GPIO9 是 Strapping 管脚。更多信息请参考 `ESP32-C3 技术规格书 <{IDF_TARGET_DATASHEET_CN_URL}>`_。
|
2024-04-10 03:31:06 -04:00
|
|
|
|
- SPI0/1:GPIO12 ~ GPIO17 通常用于 SPI flash 和 PSRAM,不推荐用于其他用途。
|
|
|
|
|
- USB-JTAG:GPIO18 和 GPIO19 默认用于 USB-JTAG。如果将它们配置为普通 GPIO,驱动程序将禁用 USB-JTAG 功能。
|
|
|
|
|
- RTC:GPIO0 ~ GPIO5 可用于将芯片从 Deep-sleep 模式中唤醒,其他 GPIO 仅能将芯片从 Light-sleep 模式中唤醒。更多信息请参考 :ref:`唤醒源<api-reference-wakeup-source>` 章节。
|
2022-11-09 03:11:36 -05:00
|
|
|
|
|
|
|
|
|
---
|