obdev / v-usb

A Firmware-Only USB implementation for Atmel's AVR Microcontrollers
1.21k stars 243 forks source link

Allow osctune.h to deal with F_CPU defines that end in 'UL' or 'L'. Also add more explanatory comments. #34

Open th-in-gs opened 1 year ago

th-in-gs commented 1 year ago

The meat of the change here is to allow osctune.h to deal with F_CPU defines that end in 'UL' or 'L' (e.g. 12000000UL), as they do (maybe just in some toolchains?) nowadays. The assembler can't handle the letter suffixes, so we create another macro, F_CPU_NUMERIC, with the letters stripped.

I also commented a lot of osctune.h while working out for myself what it did (there are no changes ot the algorithm, just comments).