Skip to content
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

Some stuff I played with after copying your stuff #5

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

amanjeev
Copy link
Member

mostly for trying out slider part.

@amanjeev amanjeev marked this pull request as draft July 26, 2023 20:10
@jonathanpallant
Copy link
Member

Does this work on hardware?

@amanjeev
Copy link
Member Author

Yes, I have been running this on hardware. it just prints stuff.

@jonathanpallant
Copy link
Member

But do the numbers change when you touch it?

@amanjeev
Copy link
Member Author

amanjeev commented Aug 2, 2023

@jonathanpallant I do not even know how to "read" the value. I am looking at the psoc6-pac/src/csd0 module because thats what i think has the meat for the capsense but obviously I have little understanding how to read through the source of svd2rust.

@jonathanpallant
Copy link
Member

I would start with the data sheet, and/or application note and/or C driver. You'll need to build a mental model of:

  • Initialise the peripheral by writing value X to register Y
  • Read data by looking at status bit Z in register W and then reading from register V, which is in foo-bar units

Once you have that in abstract terms, you can match it up with what the PAC is offering. But you can't start with the PAC because the PAC won't tell you what the registers really or, or how you use them to do the task you wish to accomplish - it's too low level for that.

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