/** * @brief Disables the SDADC peripheral functionaliy * @param Analogx: specifies the SDADC peripheral instance. * This parameter can be: PWR_SDADC_ANALOG1, PWR_SDADC_ANALOG2 or PWR_SDADC_ANALOG3. * @retval None */ void HAL_PWREx_DisableSDADCAnalog(uint32_t Analogx) { /* Check the parameters */ assert_param(IS_PWR_SDADC_ANALOG(Analogx)); PWR->CR &= ~Analogx; }
/** * @brief Enables the SDADC peripheral functionaliy * @param Analogx: specifies the SDADC peripheral instance. * This parameter can be: PWR_SDADC_ANALOG1, PWR_SDADC_ANALOG2 or PWR_SDADC_ANALOG3. * @retval None */ void HAL_PWREx_EnableSDADCAnalog(uint32_t Analogx) { /* Check the parameters */ assert_param(IS_PWR_SDADC_ANALOG(Analogx)); /* Enable PWR clock interface for SDADC use */ __PWR_CLK_ENABLE(); PWR->CR |= Analogx; }
/** * @brief Enables or disables the WakeUp Pin functionality. * @param PWR_SDADCAnalog: specifies the SDADC. * This parameter can be: PWR_SDADCAnalog_1, PWR_SDADCAnalog_2 or PWR_SDADCAnalog_3. * @param NewState: new state of the SDADC Analog functionality. * This parameter can be: ENABLE or DISABLE. * @retval None */ void PWR_SDADCAnalogCmd(uint32_t PWR_SDADCAnalog, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_PWR_SDADC_ANALOG(PWR_SDADCAnalog)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the SDADCx analog */ PWR->CR |= PWR_SDADCAnalog; } else { /* Disable the SDADCx analog */ PWR->CR &= ~PWR_SDADCAnalog; } }