Chapter 4. Software framework
When using the release/v4.2 version of ESP-IDF, how to set a single GPIO as input/output mode simultane-
ously for ESP32?
You can set via the
esp_err_t gpio_set_direction(gpio_num_t gpio_num, gpio_mode_t mode)
Is it possible to set the drive capability of the GPIO in ESP-IDF?
Yes. Please use
API gpio_set_drive_capability
When ESP32 uses gpio_install_isr_service() to attach a new interrupt service routine on GPIO, why does it
return ESP_ERR_NOT_FOUND?
Generally, this error means that ESP32 does not have enough available interrupt sources. In this case,
there are multiple peripherals occupying the interrupt sources at the same time. You can try to reduce
the interrupt sources used by other components to attach new GPIO interrupts.
How do I get the input level of the ESP32 RTC_GPIO?
• You can obtain the input level of RTC_GPIO by reading the macro of the register address cor-
responding to RTC GPIO. Please refer to
.
• The related code is as follows :
uint8_t
level
=
NEXT)
&
BIT(gpio_num))
→
4.4.4 Inter-Integrated Circuit (I2C)
Does ESP8266 support I2C slave mode?
No. If you want to use this function, it is recommended to choose ESP32 or ESP32-S2 chips instead.
For ESP32 examples, please refer to i2C_self_test.
Is ESP8266 I2C realized via software programming?
Yes, ESP8266 I2C is realized via GPIO software programming.
Espressif Systems
to set the GPIO drive capability.
"esp-idfcomponentssocesp32includesocrtc_io_reg.h"
(uint8_t)((REG_GET_FIELD(RTC_GPIO_IN_REG, RTC_GPIO_IN_
?
1
:
0);
Submit Document Feedback
67
API.
Release master
Need help?
Do you have a question about the ESP and is the answer not in the manual?