Skip to content

ports/rp2/mphalport.h: Fix mp_hal_pin_xyz() for pin>=32 #16191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ports/rp2/machine_bitstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@

#if MICROPY_PY_MACHINE_BITSTREAM

#if PICO_RP2350
#define MP_HAL_BITSTREAM_NS_OVERHEAD (5)
#else
#define MP_HAL_BITSTREAM_NS_OVERHEAD (9)
#endif

#if PICO_RISCV

Expand Down
4 changes: 2 additions & 2 deletions ports/rp2/mphalport.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ static inline void mp_hal_pin_od_high(mp_hal_pin_obj_t pin) {
}

static inline void mp_hal_pin_low(mp_hal_pin_obj_t pin) {
gpio_clr_mask(1 << pin);
gpio_clr_mask64(UINT64_C(1) << pin);
}

static inline void mp_hal_pin_high(mp_hal_pin_obj_t pin) {
gpio_set_mask(1 << pin);
gpio_set_mask64(UINT64_C(1) << pin);
}

enum mp_hal_pin_interrupt_trigger {
Expand Down
Loading