gpio_set_level() function
GPIO set output level
Arguments
gpio_num
GPIO number. If you want to set the output level of e.g. GPIO16, gpio_num should be GPIO_NUM_16 (16);
level
Output level. 0: low ; 1: high
Return value
- ESP_OK Success - ESP_ERR_INVALID_ARG GPIO number error
Notes
This function is allowed to be executed when Cache is disabled within ISR context, by enabling `CONFIG_GPIO_CTRL_FUNC_IN_IRAM`
gpio_set_level() is called by 19 functions and calls 3 functions:
![]()
gpio_set_level()
gpio_set_level() reads 9 variables:
![]()
gpio_set_level()