can fixes are compile tested only. I don't have those boards.
f3 i2c is tested on i2c and gives the same results
l1 low power demo seems to have been broken for some time already.
=> should be fixed, but not something I'm going to work on right now.
The "timer" example is actually "the same" for both f1 and f4. Do a
sanity sweep over the commentary, remove all vestiges that this was
cloned from a motor control example, and synchronize both examples.
Future work should extract the common portions "somewhere" but at least
make them consistent for now.
This example was functionally similar to the "other" example, but had
the actual functional mouse movement disabled. To reduce maintennance
cost with slightly divergent examples, simply drop the less useful
example.
The example is pointlessly complicated and includes lots of dead code,
but at least remove the wasteful and confusing references to the
temperature channel as pointed out on github.
Using GPIOA_IDR directly looks a bit arcane, and the example can benefit
from introducing gpio_get() and how to use it. The stm32f0-discovery
example already does it like this.
Instead of OOCD_SERIAL triggering an attempt to use a specific ftdi based
adapter, introduce common target/interface pairs, OOCD_INTERFACE and
OOCD_TARGET, and an override via OOCD_FILE allowing full control.
Further, attempt to connect to a running openocd instance to flash if possible.
This _will not_ work well if you have multiple openocd instances open at once,
but that's a rare use case.
Examples:
OOCD_INTERFACE=stlink-v2
OOCD_TARGET=stm32f0x
--> openocd ... -f interface/stlink-v2.cfg -f target/stm32f0x.cfg)
OOCD_FILE=board/ek-lm4f120xl.cfg
--> openocd ... -f $(OOCD_FILE) (ie, the variable is passed untouched)
As part of implementing this, correct variables that were always wrong, and
update the openocd flashing commands to use current commands.
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>
The unique serial number from the device unique signature block was never used
in any examples. Add it to the these two usb midi examples, to have a user for
this api available for reference.
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 :)
Correctly migrate stm32f103_usb_driver to st_usbfs_v1_driver instead of the
f107 driver.
Fixes: 976720c355
Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Be specifically careful with the usb examples. There is likely some
breakage to be expected, not sure I updated all the drivers to the
correct types for the respective chips.
As found in 6f2b39c1be6a8b9531264d92138dc2629d51cfa0, you can't just register a
control callback by itself, you can only register them in the set config
callback, (or, at least, _after_ set config has been done.
This has been compile tested only for the extra examples that were found to
have this failing pattern.
This has been broken since f87170e when set config started clearing control
handlers to be re-registered by different configurations.
Fix this example to use a set config callback to setup control transfer
callbacks, just like CDC-ACM demos. With this fix, this demo works with
dfu-tool 0.8
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
This example takes advantage of the big Flash memory space and
uses the standard library functions printf, and fgets to
implement a simple interactive application.
This example is just using buffers and built in alpha overlay
functionality to animate a dmond floating on a checker board. After
initializing of the frame buffers only 7 registers are being modified to
implement the animation.
This version is the ASCII one but uses the LCD display
that is attached to the board for a more colorful result.
This example also zooms into a more "interesting" place in the set so
the display stays interesting during the full 100 generations.