mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Fix esp-idf pinmask bit-shift overflow (#2380)
This commit is contained in:
parent
a27a884191
commit
210a9a4162
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class IDFInternalGPIOPin : public InternalGPIOPin {
|
||||||
}
|
}
|
||||||
void pin_mode(gpio::Flags flags) override {
|
void pin_mode(gpio::Flags flags) override {
|
||||||
gpio_config_t conf{};
|
gpio_config_t conf{};
|
||||||
conf.pin_bit_mask = 1 << static_cast<uint32_t>(pin_);
|
conf.pin_bit_mask = 1ULL << static_cast<uint32_t>(pin_);
|
||||||
conf.mode = flags_to_mode_(flags);
|
conf.mode = flags_to_mode_(flags);
|
||||||
conf.pull_up_en = flags & gpio::FLAG_PULLUP ? GPIO_PULLUP_ENABLE : GPIO_PULLUP_DISABLE;
|
conf.pull_up_en = flags & gpio::FLAG_PULLUP ? GPIO_PULLUP_ENABLE : GPIO_PULLUP_DISABLE;
|
||||||
conf.pull_down_en = flags & gpio::FLAG_PULLDOWN ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE;
|
conf.pull_down_en = flags & gpio::FLAG_PULLDOWN ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE;
|
||||||
|
|
Loading…
Reference in a new issue