May 27, 2018
12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 27, 2018
12:41 AM
Is there a bug in the `gpio_button_init` function?
The code is:
return wiced_gpio_init( button->gpio, ( button->polarity == WICED_ACTIVE_HIGH )? INPUT_PULL_UP: INPUT_PULL_DOWN );
If a button is set up as active-low, so that the GPIO is connected to ground went it is pressed, shouldn't the micro therefor provide a pull UP, to restore the input to the non-active state?
And vice versa for active-high: GPIO goes high while button is pressed, then a pull DOWN is needed to return it to inactive when the button is released.
I ran into this when trying to set up the button_manager in SDK 5.1 .
Solved! Go to Solution.
Labels
- Labels:
-
GPIO
- Tags:
- button
- push button
1 Solution
May 30, 2018
05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 30, 2018
05:58 AM
3 Replies