The function `rcc_set_lpuart1_sel()` was incorrectly using `RCC_CCIPR_LPTIM1SEL_SHIFT`
instead of `RCC_CCIPR_LPUART1SEL_SHIFT`, causing incorrect LPUART1 clock source selection.
This patch corrects the bit shift to ensure the LPUART1SEL field is properly updated.
To verify check RM0377 Reference manual section 7.3.19.
calling sys.exit directly is so so ruuude.
I'm not testing every path right now, but this is vastly better already.
Signed-off-by: Karl Palsson <karlp@tweak.au>
Other families used fdcanX_itY already, and that matches the terminology
of the reference manual, so move to that style for consistency.
Signed-off-by: Karl Palsson <karlp@tweak.au>
The swapped lines generated the wrong nvic.h, then jumping into the wrong ISR.
See data sheet RM0440rev7 (page442, table 97).
Reviewed-by: Karl Palsson <karlp@tweak.au>
Fixes issue #1482: Incorrect interpretation of disconnected parameter in st_usbfs_v2_disconnect
The `disconnected` parameter was interpreted incorrectly: When set to true it connected but should disconnect.
Reviewed-by: Karl Palsson <karlp@tweak.au>
Some class headers were not including stdint.h themselves, despite
relying on those types, and relying on them already being included
earlier elsewhere. Consistently include stdint.h where it's used.
Fixes: https://github.com/libopencm3/libopencm3/issues/1471
Signed-off-by: Karl Palsson <karlp@tweak.au>
Removed newline between the comment block and function definition
It enables vscode intellisense to display documentation about functions
Reviewed-by: Karl Palsson <karlp@tweak.au>
Now that all families have support for calculating the clock of the
uart, use that layer. Slightly slower for "old" families, but the only
way to be correct for newer families.
Reviewed-by: Karl Palsson <karlp@tweak.au>
Required so that the common uart infrastructure can be updated. This was
the last family to receive this implementation.
Signed-off-by: Karl Palsson <karlp@tweak.au>
Follow HACKING specifications, be consistent with all other parts.
Yes, the SEL suffix is kinda superfluous, but it's _consistent_ which is
why we do it.
Signed-off-by: Karl Palsson <karlp@tweak.au>
Cleanup one function at a time. Use the correct doxygen references, use
unshifted forms in user facing apis. Yes, only the trigger at the
moment, as the polarity is shared.
Signed-off-by: Karl Palsson <karlp@tweak.au>
Add definitions for all the specific options, as is done for other
families.
Reviewed-by: Karl Palsson <karlp@tweak.au>
(Added extra g0 definitions that were missed)