EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #267 background imageLoading...
Page #267 background image
Chapter 2. API Reference
ESP_OK Success
ESP_ERR_INVALID_ARG GPIO error
Parameters
gpio_num: Configure GPIO pins number, it should be GPIO number. If you want to set direction
of e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
mode: GPIO direction
esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull)
Configure GPIO pull-up/pull-down resistors at sleep.
Only pins that support both input & output have integrated pull-up and pull-down resistors. Input-only GPIOs
34-39 do not.
Return
ESP_OK Success
ESP_ERR_INVALID_ARG : Parameter error
Parameters
gpio_num: GPIO number. If you want to set pull up or down mode for e.g. GPIO16, gpio_num
should be GPIO_NUM_16 (16);
pull: GPIO pull up/down mode.
Macros
GPIO_PIN_COUNT
GPIO_IS_VALID_GPIO(gpio_num)
Check whether it is a valid GPIO number.
GPIO_IS_VALID_OUTPUT_GPIO(gpio_num)
Check whether it can be a valid GPIO number of output mode.
Type Definitions
typedef intr_handle_t gpio_isr_handle_t
Header File
components/hal/include/hal/gpio_types.h
Structures
struct gpio_config_t
Configuration parameters of GPIO pad for gpio_config function.
Public Members
uint64_t pin_bit_mask
GPIO pin: set with bit mask, each bit maps to a GPIO
gpio_mode_t mode
GPIO mode: set input/output mode
gpio_pullup_t pull_up_en
GPIO pull-up
gpio_pulldown_t pull_down_en
GPIO pull-down
gpio_int_type_t intr_type
GPIO interrupt type
Espressif Systems 256
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish