STM32F439xx HAL User Manual
Functions
Peripheral State and Error functions
CAN Exported Functions

CAN Peripheral State functions. More...

Functions

HAL_CAN_StateTypeDef HAL_CAN_GetState (CAN_HandleTypeDef *hcan)
 Return the CAN state.
uint32_t HAL_CAN_GetError (CAN_HandleTypeDef *hcan)
 Return the CAN error code.
HAL_StatusTypeDef HAL_CAN_ResetError (CAN_HandleTypeDef *hcan)
 Reset the CAN error code.

Detailed Description

CAN Peripheral State functions.

  ==============================================================================
            ##### Peripheral State and Error functions #####
  ==============================================================================
    [..]
    This subsection provides functions allowing to :
      (+) HAL_CAN_GetState()  : Return the CAN state.
      (+) HAL_CAN_GetError()  : Return the CAN error codes if any.
      (+) HAL_CAN_ResetError(): Reset the CAN error codes if any.


Function Documentation

uint32_t HAL_CAN_GetError ( CAN_HandleTypeDef hcan)

Return the CAN error code.

Parameters:
hcanpointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN.
Return values:
CANError Code

Definition at line 1939 of file stm32f4xx_hal_can.c.

References __CAN_HandleTypeDef::ErrorCode.

Return the CAN state.

Parameters:
hcanpointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN.
Return values:
HALstate

Definition at line 1908 of file stm32f4xx_hal_can.c.

References HAL_CAN_STATE_LISTENING, HAL_CAN_STATE_READY, HAL_CAN_STATE_SLEEP_ACTIVE, HAL_CAN_STATE_SLEEP_PENDING, __CAN_HandleTypeDef::Instance, and __CAN_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CAN_ResetError ( CAN_HandleTypeDef hcan)

Reset the CAN error code.

Parameters:
hcanpointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN.
Return values:
HALstatus

Definition at line 1951 of file stm32f4xx_hal_can.c.

References __CAN_HandleTypeDef::ErrorCode, HAL_CAN_ERROR_NOT_INITIALIZED, HAL_CAN_STATE_LISTENING, HAL_CAN_STATE_READY, and __CAN_HandleTypeDef::State.