Skip to content

remaps PatchSM CV input pins to match documented order in datasheet, … - #19

Merged
CorvusPrudens merged 1 commit into
CorvusPrudens:sample-ratefrom
stephenhensley:patchsm-ADC-remap
Jun 26, 2026
Merged

CorvusPrudens merged 1 commit into
CorvusPrudens:sample-ratefrom
stephenhensley:patchsm-ADC-remap

Conversation

@stephenhensley

Copy link
Copy Markdown

So this was ... weird to figure out.

But basically, what it seems like is that the ADC number mapping that is used elsewhere are remapped into a different order than the pinout implies.
Since all other integrations are either using libDaisy (hvcc, oopsy, etc.), or are modified copies of some of the sources (DaisyDuino) the ADC pins are typically configured at the SOM level and accessed in a separately indexed order.

This order is built in libDaisy with these pin definitions and then reordered for the ADCs.

So in order for consumers of the patch_sm gpio in rust to have a consistent experience, we need to similarly remap these pins. I chose to do this directly at the GPIO mapping to keep it simplest, and added multiple comments to explain the oddity.

@CorvusPrudens
CorvusPrudens merged commit 657768e into CorvusPrudens:sample-rate Jun 26, 2026
5 of 8 checks passed
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.

2 participants