Skip to content

Fix debounce initialization for GPIO_SW4#1

Open
gagannchandra wants to merge 1 commit into
torvalds:mainfrom
gagannchandra:main
Open

Fix debounce initialization for GPIO_SW4#1
gagannchandra wants to merge 1 commit into
torvalds:mainfrom
gagannchandra:main

Conversation

@gagannchandra

Copy link
Copy Markdown

init_sw_pins() passes GPIO_SW3 to both sm=2 and sm=3, leaving sm=3 watching the wrong pin. Since read_switch(3) drains sm=3's RX FIFO which never fills, SW4 never fires no matter how it's wired.
One-line fix: pass GPIO_SW4 to debounce_program_init(pio, 3, ...).


// Line 50

-debounce_program_init(pio, 3, offset, GPIO_SW3);
+debounce_program_init(pio, 3, offset, GPIO_SW4);

@gagannchandra gagannchandra marked this pull request as draft June 3, 2026 17:09
@gagannchandra gagannchandra marked this pull request as ready for review June 8, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant