Skip to content

Commit f2637d2

Browse files
authored
ports/rp2/mphalport.h: Fix mp_hal_pin_xyz() for pin>=32
Uses gpio_put(), though gpio_set_mask64() might also work. Signed-off-by: Dryw Wade <[email protected]>
1 parent 5dfbd43 commit f2637d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/rp2/mphalport.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ static inline void mp_hal_pin_od_high(mp_hal_pin_obj_t pin) {
182182
}
183183

184184
static inline void mp_hal_pin_low(mp_hal_pin_obj_t pin) {
185-
gpio_clr_mask(1 << pin);
185+
gpio_put(pin, false);
186186
}
187187

188188
static inline void mp_hal_pin_high(mp_hal_pin_obj_t pin) {
189-
gpio_set_mask(1 << pin);
189+
gpio_put(pin, true);
190190
}
191191

192192
enum mp_hal_pin_interrupt_trigger {

0 commit comments

Comments
 (0)