STM32L4xx_HAL_Driver  1.14.0
Peripheral Control functions

Peripheral Control functions. More...

Functions

HAL_StatusTypeDef HAL_OPAMPEx_Unlock (OPAMP_HandleTypeDef *hopamp)
 Unlock the selected OPAMP configuration. More...
 

Detailed Description

Peripheral Control functions.

 ===============================================================================
             ##### Peripheral Control functions #####
 ===============================================================================
    [..]
      (+) OPAMP unlock.

Function Documentation

◆ HAL_OPAMPEx_Unlock()

HAL_StatusTypeDef HAL_OPAMPEx_Unlock ( OPAMP_HandleTypeDef hopamp)

Unlock the selected OPAMP configuration.

Note
This function must be called only when OPAMP is in state "locked".
Parameters
hopampOPAMP handle
Return values
HALstatus

Definition at line 396 of file stm32l4xx_hal_opamp_ex.c.

397 {
398  HAL_StatusTypeDef status = HAL_OK;
399 
400  /* Check the OPAMP handle allocation */
401  /* Check if OPAMP locked */
402  if(hopamp == NULL)
403  {
404  status = HAL_ERROR;
405  }
406  /* Check the OPAMP handle allocation */
407  /* Check if OPAMP locked */
408  else if(hopamp->State == HAL_OPAMP_STATE_BUSYLOCKED)
409  {
410  /* Check the parameter */
411  assert_param(IS_OPAMP_ALL_INSTANCE(hopamp->Instance));
412 
413  /* OPAMP state changed to locked */
414  hopamp->State = HAL_OPAMP_STATE_BUSY;
415  }
416  else
417  {
418  status = HAL_ERROR;
419  }
420 
421  return status;
422 }
return HAL_OK
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))