-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add attiny841 and attiny861 #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! I've got some minor comments, overall the changeset looks good!
f520f94
to
6651fb1
Compare
I still need to figure out the timer stuff, and I probably want to look through the patches a little more closely to make sure that I'm doing it correctly |
f3fd352
to
6483aaf
Compare
I think I've just about figured out the timer stuff, with one caveat: In |
Looks like this slipped through and you're right, they are set/cleared at |
patch/attiny861.yaml
Outdated
AC: | ||
_modify: | ||
ACSRA: | ||
access: read-write | ||
ACSRA: | ||
_modify: | ||
ACIS: | ||
description: "Analog Comparator Interrupt Mode Select" | ||
ACO: | ||
access: read-only | ||
ACIS: | ||
_replace_enum: | ||
ON_TOGGLE: [0, "Interrupt on Toggle"] | ||
# Leaving [1, 'Reserved'] out | ||
ON_FALLING_EDGE: [2, "Interrupt on Falling Edge"] | ||
ON_RISING_EDGE: [3, "Interrupt on Rising Edge"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar change to above should work here as well I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I added this change, it broke the AC patch for atmega328pb, which I think is because of an error in the svd file for that chip. According to the svd file, there's a register called ACSRA with no fields (in addition to the ACSR register with the ACIS field), but the ACSRA field doesn't show up at all in the datasheet as far as I can tell. For now, I made the changes to the common AC patch, and replaced the common patch in atmega328pb.yaml with one that works. I'm not sure this is the best solution though.
It looks like |
ed561b2
to
bbb1670
Compare
If possible, that would of course be the best!
I guess this is highly project specific. Here's my take: I think it is very important that every "atomic" change goes into a separate commit. I.e. every change that makes "sense" on its own and can stand without the following changes being needed should be separated. The reason for this is that this means the git history is a clean record of what was done with the project. If I find a bug in a few years, I can just If multiple changes happen in a single commit or if an "atomic" change is split out over multiple commits, this is of course not going to work effectively. Now, to archieve this clean separation, there are two ways:
I see that you've already followed the first route which is really nice (thanks a lot!). So I have no problem if you add more changes into this series. A minor nag if you want to make it even more perfect: You could reorder the commits slightly so that each one could possibly compile (right now the ATmega328PB fix is after the changes to the AC common patch). But that's really a minor detail. On a side note: There is currently a merge conflict. Please rebase on master to fix :) |
bbb1670
to
cce853a
Compare
I've |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good and thanks for taking the time to properly split out the commits!
Thanks for your work in this PR! |
Preliminary pull request adding attiny841 and attiny861 chips to go with Rahix/avr-hal#105.