新增禁用 JTAG 的函数

This commit is contained in:
lxbpxylps@126.com 2021-10-12 23:37:32 +08:00
parent 9a33bab547
commit db39c97cc4
2 changed files with 11 additions and 0 deletions

View File

@ -52,6 +52,15 @@ void SystemClock_Config(void)
}
}
/**
* @brief JTAG GPIO
*/
void DisableJTAG(void)
{
__HAL_RCC_AFIO_CLK_ENABLE();
__HAL_AFIO_REMAP_SWJ_NOJTAG();
}
/**
* @brief printf
* @param file: pointer to the source file name

View File

@ -21,6 +21,8 @@
void SystemClock_Config(void);
void DisableJTAG(void);
void Error_Handler(uint8_t *file, uint32_t line);
#endif