-
Notifications
You must be signed in to change notification settings - Fork 221
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 #105
Conversation
d56e9c7
to
d5663fe
Compare
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.
Hey,
thanks for this PR! How similar are these two MCUs? Would it make sense to provide a single HAL crate for both of them? I'm looking into keeping the number of HAL crates as low as possible, see #94 ...
I've made the requested changes On combining the crates, these two chips are unfortunately pretty different (different number of pins, different peripherals), so I don't think it would make sense to group them together. |
@@ -28,6 +28,12 @@ | |||
"attiny88": { | |||
"cpu": "attiny88", | |||
}, | |||
"attiny841": { | |||
"cpu": "attiny841", |
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.
I think this needs to be avr25
to recreate your original spec files:
"cpu": "attiny841", | |
"cpu": "avr25", |
"cpu": "attiny841", | ||
}, | ||
"attiny861": { | ||
"cpu": "attiny861", |
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.
Same here:
"cpu": "attiny861", | |
"cpu": "avr25", |
Different pins shouldn't be a problem. Can you list the peripheral differences? The key question is whether the peripherals that exist in both devices differ from each other. If not, I'd be very much in favor of a single HAL. I know I am pushing pretty strong for the unification because, as outlined in #94, the current state of many crates with duplicated code is absolutely unmaintainable for me ... |
The biggest difference is the serial communication options. I'd say the t861 is closer to the t85 than the t841 in terms of peripherals. |
07f189a
to
5dc5a81
Compare
If I do fix this pull request, I'll probably do it by reimplementing it from scratch. |
Preliminary pull request adding attiny841 and attiny861 chips. I tested a blink example on both, and it works in both cases, but I haven't tested much else.
It might also be worth mentioning in the README or something that the attiny841 is not supported by the current version of avrdude, so you need to add a section to the .avrduderc