8000 rp2pio: fix occasional bug when not using OUT pins by jepler · Pull Request #6863 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

rp2pio: fix occasional bug when not using OUT pins #6863

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 1 commit into from
Sep 4, 2022
Merged
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
3 changes: 3 additions & 0 deletions ports/raspberrypi/common-hal/rp2pio/StateMachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self,
}

static uint32_t mask_and_rotate(const mcu_pin_obj_t *first_pin, uint32_t bit_count, uint32_t value) {
if (!first_pin) {
return 0;
}
value = value & ((1 << bit_count) - 1);
uint32_t shift = first_pin->number;
return value << shift | value >> (32 - shift);
Expand Down
0