Просмотр исходного кода

[HAL][PWR] Add UNUSED() macro to avoid the generation of a warning related to the unused argument 'Regulator'

Tasnim 2 лет назад
Родитель
Сommit
46af2b5952
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      Src/stm32f4xx_hal_pwr.c

+ 3 - 0
Src/stm32f4xx_hal_pwr.c

@@ -378,6 +378,9 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
   */
 void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
 {
+  /* Prevent unused argument(s) compilation warning */
+  UNUSED(Regulator);
+
   /* Check the parameters */
   assert_param(IS_PWR_REGULATOR(Regulator));
   assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));