Using the latest (as of today) gcc-arm-embedded toolchain caused two build
failures similar to:
error: unknown type name 'cookie_io_functions_t'
These custom IO functions are now protected by a define, so define _GNU_SOURCE
which enables all such areas. This is a libc issue.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
This brings in the new ADC api for STM32 parts.
Update to new standardized ADC apis.
Drops pointless channel definitions, uses common names for common functions.
No functional changes.
Based on work in: https://github.com/libopencm3/libopencm3-examples/pull/130
Update documentation and comments in code to reflect reality.
Ensure that GPIO pin output speed is actually set, to ensure that 48Mhz sysclk
output is functional.
Actually set AF, instead of relying on reset values.
Replace the systick code, the core of this example, with some code that has
less traps and surprises. Instead of trying to get a direct interrupt x times
per second, and reguarly running into problems with the 24 bit counter limit,
use a method that triggers an interrupt every x ms instead. Tested MCO and
blink rates with a logic analyser, properly verified working now :)
While nano specs are certainly handy, it should be documented how to use them,
not turned on by default. People with otherwise valid toolchains, who might
simply not care about nano specs are unable to build the examples with these
options.
This example is a merge of Chuck McManis's example for F4 and onnokort's system clock setting test blink example for demonstration issue, corrected in #224.
The LED in any available clock setting flashes four times per second.