mirror of
https://github.com/esphome/esphome.git
synced 2024-12-19 16:07:47 +01:00
Fix esp-idf pinmask bit-shift overflow (#2380)
This commit is contained in:
parent
a27a884191
commit
210a9a4162
@ -20,7 +20,7 @@ class IDFInternalGPIOPin : public InternalGPIOPin {
|
||||
}
|
||||
void pin_mode(gpio::Flags flags) override {
|
||||
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.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;
|
||||
|
Loading…
Reference in New Issue
Block a user