Closed pigrew closed 4 years ago
@therealprof
Could you review this PR? I think with this one, and fixing PLL multiplier calculation, USB will be functional on the F070.
@therealprof
A changelog entry has been added (and I squashed/force-pushed the change). Thanks!
No, thank you!
This adds an RCC API feature to set the USB clock source. This is necessary for STM32F070 and also if a crystal is desired to be used for a USB clock (instead of the RCC).
Similar to yesterday's patch, this has lots of
cfg
attributes to control which features are available for the various MCU models. It looks like we could create a new attribute macro likecfg_has_usb
to apply the proper device list, but I'm leaning towards the simplicity of what this PRcontains.This does not yet make USB F070 USB work (yet), as the PLL multipliers are not calculated correctly (related to #78), but it is another step in that direction.
This should close #83.