新增禁用 JTAG 的函数
This commit is contained in:
parent
9a33bab547
commit
db39c97cc4
@ -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 报告错误文件、行数并进入死循环
|
* @brief 错误处理函数。调用后通过 printf 报告错误文件、行数并进入死循环
|
||||||
* @param file: pointer to the source file name
|
* @param file: pointer to the source file name
|
||||||
|
|||||||
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
void SystemClock_Config(void);
|
void SystemClock_Config(void);
|
||||||
|
|
||||||
|
void DisableJTAG(void);
|
||||||
|
|
||||||
void Error_Handler(uint8_t *file, uint32_t line);
|
void Error_Handler(uint8_t *file, uint32_t line);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user