STM32L486xx HAL User Manual
Functions
Peripheral Control functions
OPAMP Exported Functions

Peripheral Control functions. More...

Functions

HAL_StatusTypeDef HAL_OPAMP_Lock (OPAMP_HandleTypeDef *hopamp)
 Lock the selected OPAMP configuration.
HAL_OPAMP_TrimmingValueTypeDef HAL_OPAMP_GetTrimOffset (OPAMP_HandleTypeDef *hopamp, uint32_t trimmingoffset)
 Return the OPAMP factory trimming value.
HAL_StatusTypeDef HAL_OPAMP_RegisterCallback (OPAMP_HandleTypeDef *hopamp, HAL_OPAMP_CallbackIDTypeDef CallbackID, pOPAMP_CallbackTypeDef pCallback)
 Register a User OPAMP Callback To be used instead of the weak (surcharged) predefined callback.
HAL_StatusTypeDef HAL_OPAMP_UnRegisterCallback (OPAMP_HandleTypeDef *hopamp, HAL_OPAMP_CallbackIDTypeDef CallbackID)
 Unregister a User OPAMP Callback OPAMP Callback is redirected to the weak (surcharged) predefined callback.

Detailed Description

Peripheral Control functions.

 ===============================================================================
                      ##### Peripheral Control functions #####
 =============================================================================== 
    [..]
    This subsection provides a set of functions allowing to control the OPAMP data 
    transfers.




Function Documentation

HAL_OPAMP_TrimmingValueTypeDef HAL_OPAMP_GetTrimOffset ( OPAMP_HandleTypeDef hopamp,
uint32_t  trimmingoffset 
)

Return the OPAMP factory trimming value.

Note:
On STM32L4 OPAMP, user can retrieve factory trimming if OPAMP has never been set to user trimming before. Therefore, this function must be called when OPAMP init parameter "UserTrimming" is set to trimming factory, and before OPAMP calibration (function "HAL_OPAMP_SelfCalibrate()"). Otherwise, factory trimming value cannot be retrieved and error status is returned.
Parameters:
hopamp: OPAMP handle
trimmingoffset: Trimming offset (P or N) This parameter must be a value of OPAMP Factory Trimming
Note:
Calibration parameter retrieved is corresponding to the mode specified in OPAMP init structure (mode normal or low-power). To retrieve calibration parameters for both modes, repeat this function after OPAMP init structure accordingly updated.
Return values:
Trimmingvalue (P or N): range: 0->31 or OPAMP_FACTORYTRIMMING_DUMMY if trimming value is not available

Definition at line 910 of file stm32l4xx_hal_opamp.c.

References assert_param, HAL_OPAMP_STATE_BUSY, HAL_OPAMP_STATE_BUSYLOCKED, HAL_OPAMP_STATE_CALIBBUSY, HAL_OPAMP_STATE_RESET, __OPAMP_HandleTypeDef::Init, __OPAMP_HandleTypeDef::Instance, IS_OPAMP_FACTORYTRIMMING, IS_OPAMP_POWERMODE, OPAMP_FACTORYTRIMMING_DUMMY, OPAMP_FACTORYTRIMMING_P, OPAMP_INPUT_NONINVERTING, OPAMP_POWERMODE_NORMAL, OPAMP_InitTypeDef::PowerMode, and __OPAMP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_OPAMP_Lock ( OPAMP_HandleTypeDef hopamp)

Lock the selected OPAMP configuration.

Note:
On STM32L4, HAL OPAMP lock is software lock only (in contrast of hardware lock available on some other STM32 devices).
Parameters:
hopamp,:OPAMP handle
Return values:
HALstatus

Definition at line 860 of file stm32l4xx_hal_opamp.c.

References assert_param, HAL_OPAMP_STATE_BUSYLOCKED, HAL_OPAMP_STATE_CALIBBUSY, HAL_OPAMP_STATE_READY, HAL_OPAMP_STATE_RESET, __OPAMP_HandleTypeDef::Instance, and __OPAMP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_OPAMP_RegisterCallback ( OPAMP_HandleTypeDef hopamp,
HAL_OPAMP_CallbackIDTypeDef  CallbackID,
pOPAMP_CallbackTypeDef  pCallback 
)

Register a User OPAMP Callback To be used instead of the weak (surcharged) predefined callback.

Parameters:
hopamp: OPAMP handle
CallbackID: ID of the callback to be registered This parameter can be one of the following values:
pCallback: pointer to the Callback function
Return values:
status

Definition at line 1024 of file stm32l4xx_hal_opamp.c.

References HAL_OPAMP_MSP_DEINIT_CB_ID, HAL_OPAMP_MSP_INIT_CB_ID, HAL_OPAMP_STATE_READY, HAL_OPAMP_STATE_RESET, __OPAMP_HandleTypeDef::MspDeInitCallback, __OPAMP_HandleTypeDef::MspInitCallback, and __OPAMP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_OPAMP_UnRegisterCallback ( OPAMP_HandleTypeDef hopamp,
HAL_OPAMP_CallbackIDTypeDef  CallbackID 
)

Unregister a User OPAMP Callback OPAMP Callback is redirected to the weak (surcharged) predefined callback.

Parameters:
hopamp: OPAMP handle
CallbackID: ID of the callback to be unregistered This parameter can be one of the following values:
Return values:
status

Definition at line 1091 of file stm32l4xx_hal_opamp.c.

References HAL_OPAMP_ALL_CB_ID, HAL_OPAMP_MSP_DEINIT_CB_ID, HAL_OPAMP_MSP_INIT_CB_ID, HAL_OPAMP_MspDeInit(), HAL_OPAMP_MspInit(), HAL_OPAMP_STATE_READY, HAL_OPAMP_STATE_RESET, __OPAMP_HandleTypeDef::MspDeInitCallback, __OPAMP_HandleTypeDef::MspInitCallback, and __OPAMP_HandleTypeDef::State.