Skip to content

Patch attiny85 PCMSK register #131

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
Nov 16, 2023
Merged

Conversation

mgrunwald
Copy link

Fix #130 by adding fields for pins where the pin change interrupt can be enabled. I.e. it is possible to use this

self.exint.pcmsk.modify(|_, w| w.pcint0().set_bit());

instead of this:

self.exint.pcmsk.modify(|_, w| w.bits(1));

Since the two most significant bits of PCMSK on the attiny85 are reserved, it would make sense to change the write constraint to [0, 63], but I failed to achieve this. the code is commented in commit 78b331f . Because of this, the PR is still a draft.

@Rahix Rahix force-pushed the patch_attiny85_pcmsk branch from 78b331f to d1f7f93 Compare November 16, 2023 23:44
Copy link
Owner

@Rahix Rahix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

I'm so sorry for loosing track of this :( Thanks a lot again for your work here! It's looking great already. The write-constraint thing is something I'm afraid we'll have to keep as it is for now. This will be fixed as soon as we upgrade to a newer svdtools I believe.

Comment on lines +102 to +105
# This doesn't work:
# _modify:
# PCMSK:
# _write_constraint: [0, 63]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the version of svdtools which we are using at the moment doesn't seem to support updating the write constraint of whole registers :/

Let's keep it the way you wrote it so we can uncomment the block once we upgrade to a version of svdtools that does support it.

@Rahix Rahix marked this pull request as ready for review November 16, 2023 23:49
@Rahix Rahix merged commit 15043b7 into Rahix:main Nov 16, 2023
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.

attiny_hal::pac::exint::pcmsk::W missing BitWriterRaw implementation?
2 participants