avr-hal
avr-hal copied to clipboard
Add attiny841 and attiny861
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
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.
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.
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 ...
t841 | t861 | |
---|---|---|
gpio | a | a,b |
timer | 1x 8bit, 2x 16bit | 1x 8bit, 1x 16/8bit hybrid |
adc | 10bit | 10bit |
ac | 2x | 1x |
comms | SPI,I2C (slave only), 2x USART | USI |
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.
If I do fix this pull request, I'll probably do it by reimplementing it from scratch.