1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Remove USE_SWDIO, simply refer to DEBUG (#12361)

Remove USE_SWDIO, simply refer to debug

Command line of `make TARGET=STM32F405 DEBUG=GDB` will trigger this.

Alternative is simply `make TARGET=STM32F405 EXTRA_FLAGS="-DDEBUG"`
This commit is contained in:
J Blackman 2023-02-15 07:37:16 +11:00 committed by GitHub
parent 4fe980384c
commit 3598f3e41a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 84 additions and 16 deletions

View file

@ -256,20 +256,6 @@ static void sdCardAndFSInit(void)
}
#endif
#ifdef USE_SWDIO
static void swdPinsInit(void)
{
IO_t io = IOGetByTag(DEFIO_TAG_E(PA13)); // SWDIO
if (IOGetOwner(io) == OWNER_FREE) {
IOInit(io, OWNER_SWD, 0);
}
io = IOGetByTag(DEFIO_TAG_E(PA14)); // SWCLK
if (IOGetOwner(io) == OWNER_FREE) {
IOInit(io, OWNER_SWD, 0);
}
}
#endif
void init(void)
{
#ifdef SERIAL_PORT_COUNT
@ -1030,8 +1016,8 @@ void init(void)
spiInitBusDMA();
#endif
#ifdef USE_SWDIO
swdPinsInit();
#ifdef DEBUG
debugInit();
#endif
unusedPinsInit();