mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
docs: add warning to gpio_get_level()
On most microcontrollers I have worked with one can retrieve the current state of output GPIO pins. On ESP32 this is not the case if the pad is not explictly configured to route this information into the port by configuring it as input or i/o. Thus add a warning to the API documentation of gpio_get_level(). Merges https://github.com/espressif/esp-idf/pull/1740
This commit is contained in:
parent
7e268adaf5
commit
86a1d579ff
@ -302,6 +302,8 @@ esp_err_t gpio_set_level(gpio_num_t gpio_num, uint32_t level);
|
||||
/**
|
||||
* @brief GPIO get input level
|
||||
*
|
||||
* @warning If the pad is not configured for input (or input and output) the returned value is always 0.
|
||||
*
|
||||
* @param gpio_num GPIO number. If you want to get the logic level of e.g. pin GPIO16, gpio_num should be GPIO_NUM_16 (16);
|
||||
*
|
||||
* @return
|
||||
|
Loading…
Reference in New Issue
Block a user