STM32L4xx_HAL_Driver  1.14.0
Peripheral State functions

Peripheral State functions. More...

Functions

HAL_COMP_StateTypeDef HAL_COMP_GetState (COMP_HandleTypeDef *hcomp)
 Return the COMP handle state. More...
 
uint32_t HAL_COMP_GetError (COMP_HandleTypeDef *hcomp)
 Return the COMP error code. More...
 

Detailed Description

Peripheral State functions.

 ===============================================================================
                      ##### Peripheral State functions #####
 ===============================================================================
    [..]
    This subsection permit to get in run-time the status of the peripheral.

Function Documentation

◆ HAL_COMP_GetError()

uint32_t HAL_COMP_GetError ( COMP_HandleTypeDef hcomp)

Return the COMP error code.

Parameters
hcompCOMP handle
Return values
COMPerror code

Definition at line 1024 of file stm32l4xx_hal_comp.c.

1025 {
1026  /* Check the parameters */
1027  assert_param(IS_COMP_ALL_INSTANCE(hcomp->Instance));
1028 
1029  return hcomp->ErrorCode;
1030 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ HAL_COMP_GetState()

HAL_COMP_StateTypeDef HAL_COMP_GetState ( COMP_HandleTypeDef hcomp)

Return the COMP handle state.

Parameters
hcompCOMP handle
Return values
HALstate

Definition at line 1004 of file stm32l4xx_hal_comp.c.

1005 {
1006  /* Check the COMP handle allocation */
1007  if(hcomp == NULL)
1008  {
1009  return HAL_COMP_STATE_RESET;
1010  }
1011 
1012  /* Check the parameter */
1013  assert_param(IS_COMP_ALL_INSTANCE(hcomp->Instance));
1014 
1015  /* Return HAL COMP handle state */
1016  return hcomp->State;
1017 }
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))