串口和中断写完
This commit is contained in:
@@ -1,64 +1,5 @@
|
||||
#include "Bsp.h"
|
||||
|
||||
void AllPeriphClockDisable(void);
|
||||
|
||||
/**
|
||||
* @brief 关闭所有外设时钟
|
||||
* @note void
|
||||
* @param void
|
||||
* @retval void
|
||||
*/
|
||||
void AllPeriphClockDisable(void)
|
||||
{
|
||||
// ==================== GPIOA 组 ====================
|
||||
#ifdef GPIOA
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, DISABLE);
|
||||
#endif
|
||||
#ifdef GPIOB
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, DISABLE);
|
||||
// ==================== GPIOB 组 ====================
|
||||
#endif
|
||||
#ifdef GPIOC
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, DISABLE);
|
||||
// ==================== GPIOC 组 ====================
|
||||
#endif
|
||||
#ifdef GPIOD
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, DISABLE);
|
||||
// ==================== GPIOD 组 ====================
|
||||
#endif
|
||||
#ifdef GPIOE
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, DISABLE);
|
||||
// ==================== GPIOE 组 ====================
|
||||
#endif
|
||||
#ifdef GPIOF
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF, DISABLE);
|
||||
// ==================== GPIOF 组 ====================
|
||||
#endif
|
||||
#ifdef GPIOG
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOG, DISABLE);
|
||||
// ==================== GPIOG 组 ====================
|
||||
#endif
|
||||
|
||||
#ifdef USART1
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, DISABLE);
|
||||
#endif
|
||||
|
||||
#ifdef USART2
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, DISABLE);
|
||||
#endif
|
||||
|
||||
#ifdef USART3
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, DISABLE);
|
||||
#endif
|
||||
|
||||
#ifdef UART4
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART4, DISABLE);
|
||||
#endif
|
||||
|
||||
#ifdef UART5
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART5, DISABLE);
|
||||
#endif
|
||||
}
|
||||
//
|
||||
// #ifdef USE_DIGITAL_OUTPUT
|
||||
// GPIO_ST DigiTalOutPut[DO_NUM] =
|
||||
|
||||
Reference in New Issue
Block a user