Code re-organisation: src/platform/xxx for the MCU type (#13955)
[betaflight.git] / src / platform / AT32 / debug.c
blob038ed5a196bda03f04e48ba3e28a29cd7ff44b0e
1 /*
2 * This file is part of Betaflight.
4 * Betaflight is free software. You can redistribute this software
5 * and/or modify this software under the terms of the GNU General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or (at your option) any later
8 * version.
10 * Betaflight is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
22 #include "platform.h"
23 #include "build/debug.h"
24 #include "drivers/io.h"
26 void debugInit(void)
28 IO_t io = IOGetByTag(DEFIO_TAG_E(PA13)); // SWDIO
29 if (IOGetOwner(io) == OWNER_FREE) {
30 IOInit(io, OWNER_SWD, 0);
32 io = IOGetByTag(DEFIO_TAG_E(PA14)); // SWCLK
33 if (IOGetOwner(io) == OWNER_FREE) {
34 IOInit(io, OWNER_SWD, 0);