Dennis-van-Gils / SAMD51_InterruptTimer

SAMD51 Interrupt Timer library for e.g. Adafruit M4 Metro/Feather/ItsyBitsy Express
MIT License
25 stars 7 forks source link

Fix minor comment typo; add some remedial information. #9

Closed integerbasic closed 3 years ago

integerbasic commented 3 years ago

Thank you for this excellent library! I am enjoying using it in my projects. I am new to the SAMD hardware, so I am reading through libraries such as this to gain some understanding of the lower-level peripheral management. I was a little confused by the macro definition CPU_HZ=48000000, because the feature description for the M4 Express says it runs at 120MHz. Running the example creates a 5Hz signal as promised, so I knew the code was correct.

After doing some research I think I understand the clock handling that is in effect for this code, and this pull request is just a humble suggestion for some comment changes that might help other newcomers like myself.

1) Fix typo in comment; GCLK 1 is used; not GCLK 0. 2) Change macro name (CPU_HZ -> GCLK1_HZ) to better match what it refers to. 3) Add some comments to explain assumptions about device vendor clock setup.

Dennis-van-Gils commented 3 years ago

Thanks a lot, integerbasic. Your well-explained commit has been merged.