To enable debugging, we need to stop using the SWD GPIO pins, which
are normally used to trigger boot-time firmware behavior -- SWDIO is
used to force entry to the boot loader while SWDCLK is used to force
default frequency and callsign.
This patch makes it easy to edit ao_pins.h to disable the default
frequency option.
Signed-off-by: Keith Packard <keithp@keithp.com>
#include <ao.h>
#include <ao_exti.h>
+#if HAS_FORCE_FREQ
static void
ao_check_recovery(void)
{
ao_gpio_set_mode(AO_RECOVERY_PORT, AO_RECOVERY_PIN, 0);
ao_disable_port(AO_RECOVERY_PORT);
}
+#endif
int
main(void)
{
+#if HAS_FORCE_FREQ
ao_check_recovery();
+#endif
ao_clock_init();
ao_task_init();