atsam-rs / atsam4-hal

Apache License 2.0
5 stars 3 forks source link

Add support for Timers (TC) #18

Closed haata closed 3 years ago

haata commented 3 years ago

atsam4s_a, atsam4s_b

Only basic timer functionality for now. Out-of-scope features

haata commented 3 years ago

Still trying the figure out the best way to do this. Currently the problem is that there are can be multiple Timer Modules (usually 0 through 2). And each module has 3 channels.

For the most part each channel is an independent channel and can be configured separately. Unfortunately there are some shared registers in the module as well. On top of that, I haven't figured out a way to assign specific registers to a struct yet. Ideally, each Timer Module Channel would own their specific registers. The Timer Module would own any of the generic registers for the module.

haata commented 3 years ago

Fixed with PR #47