GPIO & RTC GPIO

您所在的位置:网站首页 西安学而思学校地址及电话号码 GPIO & RTC GPIO

GPIO & RTC GPIO

#GPIO & RTC GPIO| 来源: 网络整理| 查看: 265

Enable gpio pad hold function.

When a GPIO is set to hold, its state is latched at that moment and will not change when the internal signal or the IO MUX/GPIO configuration is modified (including input enable, output enable, output value, function, and drive strength values). This function can be used to retain the state of GPIOs when the chip or system is reset, for example, when watchdog time-out or Deep-sleep events are triggered.

This function works in both input and output modes, and only applicable to output-capable GPIOs. If this function is enabled: in output mode: the output level of the GPIO will be locked and can not be changed. in input mode: the input read value can still reflect the changes of the input signal.

However, on ESP32/S2/C3/S3/C2, this function cannot be used to hold the state of a digital GPIO during Deep-sleep. Even if this function is enabled, the digital GPIO will be reset to its default state when the chip wakes up from Deep-sleep. If you want to hold the state of a digital GPIO during Deep-sleep, please call gpio_deep_sleep_hold_en.

Power down or call gpio_hold_dis will disable this function.

参数

gpio_num – GPIO number, only support output-capable GPIOs

返回

ESP_OK Success

ESP_ERR_NOT_SUPPORTED Not support pad hold function



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3