File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,11 @@ void TwoWire::setPullups(uint32_t pullupAmount)
114114{
115115 if (pullupAmount == 0 )
116116 _pullups = AM_HAL_GPIO_PIN_PULLUP_NONE;
117- if (pullupAmount > 0 || pullupAmount < 6 )
117+ if (pullupAmount > 0 && pullupAmount < 6 )
118118 _pullups = AM_HAL_GPIO_PIN_PULLUP_1_5K;
119- else if (pullupAmount >= 6 || pullupAmount < 12 )
119+ else if (pullupAmount >= 6 && pullupAmount < 12 )
120120 _pullups = AM_HAL_GPIO_PIN_PULLUP_6K;
121- else if (pullupAmount >= 12 || pullupAmount < 24 )
121+ else if (pullupAmount >= 12 && pullupAmount < 24 )
122122 _pullups = AM_HAL_GPIO_PIN_PULLUP_12K;
123123 else if (pullupAmount >= 24 )
124124 _pullups = AM_HAL_GPIO_PIN_PULLUP_24K;
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class TwoWire : public Stream, public IOMaster
7474
7575 bool _transmissionBegun;
7676 uint8_t _transmissionAddress;
77- uint32_t _pullups;
77+ am_hal_gpio_pullup_e _pullups;
7878 uint32_t _clockSpeed;
7979
8080 RingBufferN<AP3_WIRE_RX_BUFFER_LEN> _rxBuffer; // RX Buffer
You can’t perform that action at this time.
0 commit comments