mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
Merge branch 'bugfix/gpio_reset_bitmask' into 'master'
gpio: Bitmask overflow fix in gpio_reset_pin See merge request idf/esp-idf!2966
This commit is contained in:
commit
8739111218
@ -316,7 +316,7 @@ esp_err_t gpio_reset_pin(gpio_num_t gpio_num)
|
||||
{
|
||||
assert(gpio_num >= 0 && GPIO_IS_VALID_GPIO(gpio_num));
|
||||
gpio_config_t cfg = {
|
||||
.pin_bit_mask = BIT(gpio_num),
|
||||
.pin_bit_mask = BIT64(gpio_num),
|
||||
.mode = GPIO_MODE_DISABLE,
|
||||
//for powersave reasons, the GPIO should not be floating, select pullup
|
||||
.pull_up_en = true,
|
||||
|
@ -134,6 +134,7 @@
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
#define BIT(nr) (1UL << (nr))
|
||||
#define BIT64(nr) (1ULL << (nr))
|
||||
#else
|
||||
#define BIT(nr) (1 << (nr))
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user