mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
/*
|
|
* This file is part of Betaflight.
|
|
*
|
|
* Betaflight is free software. You can redistribute this software
|
|
* and/or modify this software under the terms of the GNU General
|
|
* Public License as published by the Free Software Foundation,
|
|
* either version 3 of the License, or (at your option) any later
|
|
* version.
|
|
*
|
|
* Betaflight is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
* See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public
|
|
* License along with this software.
|
|
*
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "platform.h"
|
|
#include "build/debug.h"
|
|
#include "drivers/io.h"
|
|
|
|
void debugInit(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);
|
|
}
|
|
}
|