remove unused code
This commit is contained in:
parent
bae09e3165
commit
589c5814b1
|
@ -80,55 +80,20 @@ const struct UTIL_LPM_Driver_s UTIL_PowerDriver =
|
|||
|
||||
void PWR_EnterOffMode(void)
|
||||
{
|
||||
#if 0
|
||||
//HAL_GPIO_WritePin(GPIOB, GPIO_PIN_2, GPIO_PIN_RESET); /* LED OFF */
|
||||
HAL_SuspendTick();
|
||||
HAL_UART_DeInit(&huart2);
|
||||
//LL_PWR_ClearFlag_WU();
|
||||
//__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
|
||||
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
|
||||
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_LPMODES);
|
||||
//LL_PWR_ClearFlag_WU();
|
||||
HAL_PWR_EnterSTANDBYMode();
|
||||
#endif
|
||||
POWER_OFF;
|
||||
//HAL_UART_DeInit(&huart2);
|
||||
//vcom_DeInit();
|
||||
HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All);
|
||||
HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All);
|
||||
HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All);
|
||||
HAL_SuspendTick();
|
||||
HAL_PWR_EnterSTANDBYMode();
|
||||
#if 0
|
||||
LED_OFF;
|
||||
HAL_UART_DeInit(&huart2);
|
||||
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);//禁用所有使用的唤醒源:PWR_WAKEUP_PIN1 connected to PA.00
|
||||
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);//清除所有相关的唤醒标志
|
||||
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);//启用连接到PA.00的WakeUp Pin
|
||||
HAL_PWR_EnterSTANDBYMode();//进入待机模式
|
||||
|
||||
/* USER CODE BEGIN EnterOffMode_1 */
|
||||
HAL_PWR_EnterSTANDBYMode();
|
||||
/* USER CODE END EnterOffMode_1 */
|
||||
#endif
|
||||
}
|
||||
|
||||
void PWR_ExitOffMode(void)
|
||||
{
|
||||
/* USER CODE BEGIN ExitOffMode_1 */
|
||||
#if 1
|
||||
POWER_ON;
|
||||
HAL_ResumeTick();
|
||||
//__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
|
||||
//HAL_GPIO_WritePin(GPIOB, GPIO_PIN_2, GPIO_PIN_SET); /* LED ON */
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
|
||||
LED_ON;
|
||||
HAL_Delay(200);
|
||||
#endif
|
||||
/* USER CODE END ExitOffMode_1 */
|
||||
}
|
||||
|
||||
|
@ -136,8 +101,7 @@ void PWR_EnterStopMode(void)
|
|||
{
|
||||
/* USER CODE BEGIN EnterStopMode_1 */
|
||||
POWER_OFF;
|
||||
//HAL_UART_DeInit(&huart2);
|
||||
//vcom_DeInit();
|
||||
|
||||
HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All);
|
||||
HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All);
|
||||
HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All);
|
||||
|
|
|
@ -65,20 +65,8 @@ extern UART_HandleTypeDef huart2;
|
|||
extern DMA_HandleTypeDef hdma_i2c2_rx;
|
||||
extern DMA_HandleTypeDef hdma_i2c2_tx;
|
||||
|
||||
//extern DMA_HandleTypeDef hdma_spi1_rx;
|
||||
//extern DMA_HandleTypeDef hdma_spi1_tx;
|
||||
//extern SPI_HandleTypeDef hspi1;
|
||||
|
||||
|
||||
//extern DMA_HandleTypeDef hdma_tim1_up;
|
||||
//extern DMA_HandleTypeDef hdma_tim2_up;
|
||||
//extern TIM_HandleTypeDef htim1;
|
||||
//extern TIM_HandleTypeDef htim2;
|
||||
//extern TIM_HandleTypeDef htim16;
|
||||
extern DMA_HandleTypeDef hdma_usart2_tx;
|
||||
#if 0
|
||||
extern DMA_HandleTypeDef hdma_usart2_rx;
|
||||
#endif
|
||||
|
||||
|
||||
/* USER CODE BEGIN EV */
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue