In addition to stdint.h, MSC directly relies on the usbd_device type
definition existing. Ensure it has included it's own dependencies.
Fixes: https://github.com/libopencm3/libopencm3/issues/1471
Signed-off-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>
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)
CCR register definitions were completely wrong, both decimal/hex mixups,
and straightup transcriptions from the reference manual errors.
Unify the styles for both g0 and g4, using the same (duplicated)
function for both implmentations.
Reviewed-by: Karl Palsson <karlp@tweak.au>
Adds handling for missing cases. While i2c only has 3 cases, uarts have
all 4, so make sure they're handled properly.
Removes duplicated/redundant definitions.
Adds doxygen wrappers, even if only for internal use.
Fixes: e41ac6ea71 stm32: added peripheral clock get helpers for all stm32
Signed-of-by: Karl Palsson <karlp@tweak.au>
It's simply a wrapper around rcc_reset_pulse already.
Just drop it. See 034dbf20ff for the same deletion for timers.
Signed-off-by: Karl Palsson <karlp@tweak.au>
It's simply a wrapper around rcc_reset_pulse already.
Just drop it. See 034dbf20ff for the same deletion for timers.
Signed-off-by: Karl Palsson <karlp@tweak.au>
A bunch of periphs on newer parts weren't defined. Add their
enable/reset bit definitions so they can be used.
Signed-off-by: Karl Palsson <karlp@tweak.au>
Updated to RM0444_rev5
Breaking: renames some irqs to be more specific and better match with
refman. We're still in the "between" tags, so break all the toys!
Signed-off-by: Karl Palsson <karlp@tweak.au>
Fixes: https://github.com/libopencm3/libopencm3/issues/1446
Fixes: 18f4d7c1b7 stm32f3: rtc: include correct shared header
No testing on real hardware, but the docs imply that this should have
always had the "basic" rtc-v2 peripheral.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Avoid use of the gnu specific "asm" keyword, and use the __asm__
keyword, as used everywhere else in the library. This fixes compilation
in C11, and unifies all uses of asm literals in the codebase.
Reported-by: @dragonmux
Fixes: https://github.com/libopencm3/libopencm3/pull/1425
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
- rcc_get_i2c_clk_freq: Add support by taking RCC_CCIPR2 into account for I2C4.
- rcc_get_timer_clk_freq: Add support for LP timers
- rcc_get_usart_clk_freq: Fix APB freq used for LPUART1 and UART1, respectively.
This commit adds support for NRF52 TWI Master mode and slightly extends
existing I2C API. This is a breaking change, while mode selection needs to be
done during enabling I2C. There is one additional breaking change done because:
1) Unicore MX API design was PITA for writes
2) It is incompatible with EasyDMA
I strongly apologize to all two users who might be affected by this change.
Presumably copy/paste error in original submission.
Verified in RM0440rev1 and rev5.
Fixes: c26eab251
Reported-by: qyx on the internet
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
* merged: nrf tree from unicore-mx
* fixed: small changes to make merged code play with rest of locm3 again
* added: linker script generator defines for nRF51/52 stubs
* added: doxygen support
This removes code and changes names and styles where relevant to be more
inline with normal libopencm3.
NRF52x library is built for hardfloat, M4F by default. The M4 no float
variants are less common, and if needed, the library can be built
manually for those variants. Unless some very common boards show up
using those parts, we don't need an extra library build.
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Tested-by: Karl Palsson <karlp@tweak.net.au>