STM32F439xx HAL User Manual
|
CAN HAL module driver. This file provides firmware functions to manage the following functionalities of the Controller Area Network (CAN) peripheral: + Initialization and de-initialization functions + Configuration functions + Control functions + Interrupts management + Callbacks functions + Peripheral State and Error functions. More...
#include "stm32f4xx_hal.h"
Go to the source code of this file.
Defines | |
#define | CAN_TIMEOUT_VALUE 10U |
Functions | |
HAL_StatusTypeDef | HAL_CAN_Init (CAN_HandleTypeDef *hcan) |
Initializes the CAN peripheral according to the specified parameters in the CAN_InitStruct. | |
HAL_StatusTypeDef | HAL_CAN_DeInit (CAN_HandleTypeDef *hcan) |
Deinitializes the CAN peripheral registers to their default reset values. | |
__weak void | HAL_CAN_MspInit (CAN_HandleTypeDef *hcan) |
Initializes the CAN MSP. | |
__weak void | HAL_CAN_MspDeInit (CAN_HandleTypeDef *hcan) |
DeInitializes the CAN MSP. | |
HAL_StatusTypeDef | HAL_CAN_ConfigFilter (CAN_HandleTypeDef *hcan, CAN_FilterTypeDef *sFilterConfig) |
Configures the CAN reception filter according to the specified parameters in the CAN_FilterInitStruct. | |
HAL_StatusTypeDef | HAL_CAN_Start (CAN_HandleTypeDef *hcan) |
Start the CAN module. | |
HAL_StatusTypeDef | HAL_CAN_Stop (CAN_HandleTypeDef *hcan) |
Stop the CAN module and enable access to configuration registers. | |
HAL_StatusTypeDef | HAL_CAN_RequestSleep (CAN_HandleTypeDef *hcan) |
Request the sleep mode (low power) entry. | |
HAL_StatusTypeDef | HAL_CAN_WakeUp (CAN_HandleTypeDef *hcan) |
Wake up from sleep mode. | |
uint32_t | HAL_CAN_IsSleepActive (CAN_HandleTypeDef *hcan) |
Check is sleep mode is active. | |
HAL_StatusTypeDef | HAL_CAN_AddTxMessage (CAN_HandleTypeDef *hcan, CAN_TxHeaderTypeDef *pHeader, uint8_t aData[], uint32_t *pTxMailbox) |
Add a message to the first free Tx mailbox and activate the corresponding transmission request. | |
HAL_StatusTypeDef | HAL_CAN_AbortTxRequest (CAN_HandleTypeDef *hcan, uint32_t TxMailboxes) |
Abort transmission requests. | |
uint32_t | HAL_CAN_GetTxMailboxesFreeLevel (CAN_HandleTypeDef *hcan) |
Return Tx Mailboxes free level: number of free Tx Mailboxes. | |
uint32_t | HAL_CAN_IsTxMessagePending (CAN_HandleTypeDef *hcan, uint32_t TxMailboxes) |
Check if a transmission request is pending on the selected Tx Mailboxes. | |
uint32_t | HAL_CAN_GetTxTimestamp (CAN_HandleTypeDef *hcan, uint32_t TxMailbox) |
Return timestamp of Tx message sent, if time triggered communication mode is enabled. | |
HAL_StatusTypeDef | HAL_CAN_GetRxMessage (CAN_HandleTypeDef *hcan, uint32_t RxFifo, CAN_RxHeaderTypeDef *pHeader, uint8_t aData[]) |
Get an CAN frame from the Rx FIFO zone into the message RAM. | |
uint32_t | HAL_CAN_GetRxFifoFillLevel (CAN_HandleTypeDef *hcan, uint32_t RxFifo) |
Return Rx FIFO fill level. | |
HAL_StatusTypeDef | HAL_CAN_ActivateNotification (CAN_HandleTypeDef *hcan, uint32_t ActiveITs) |
Enable interrupts. | |
HAL_StatusTypeDef | HAL_CAN_DeactivateNotification (CAN_HandleTypeDef *hcan, uint32_t InactiveITs) |
Disable interrupts. | |
void | HAL_CAN_IRQHandler (CAN_HandleTypeDef *hcan) |
Handles CAN interrupt request. | |
__weak void | HAL_CAN_TxMailbox0CompleteCallback (CAN_HandleTypeDef *hcan) |
Transmission Mailbox 0 complete callback. | |
__weak void | HAL_CAN_TxMailbox1CompleteCallback (CAN_HandleTypeDef *hcan) |
Transmission Mailbox 1 complete callback. | |
__weak void | HAL_CAN_TxMailbox2CompleteCallback (CAN_HandleTypeDef *hcan) |
Transmission Mailbox 2 complete callback. | |
__weak void | HAL_CAN_TxMailbox0AbortCallback (CAN_HandleTypeDef *hcan) |
Transmission Mailbox 0 Cancellation callback. | |
__weak void | HAL_CAN_TxMailbox1AbortCallback (CAN_HandleTypeDef *hcan) |
Transmission Mailbox 1 Cancellation callback. | |
__weak void | HAL_CAN_TxMailbox2AbortCallback (CAN_HandleTypeDef *hcan) |
Transmission Mailbox 2 Cancellation callback. | |
__weak void | HAL_CAN_RxFifo0MsgPendingCallback (CAN_HandleTypeDef *hcan) |
Rx FIFO 0 message pending callback. | |
__weak void | HAL_CAN_RxFifo0FullCallback (CAN_HandleTypeDef *hcan) |
Rx FIFO 0 full callback. | |
__weak void | HAL_CAN_RxFifo1MsgPendingCallback (CAN_HandleTypeDef *hcan) |
Rx FIFO 1 message pending callback. | |
__weak void | HAL_CAN_RxFifo1FullCallback (CAN_HandleTypeDef *hcan) |
Rx FIFO 1 full callback. | |
__weak void | HAL_CAN_SleepCallback (CAN_HandleTypeDef *hcan) |
Sleep callback. | |
__weak void | HAL_CAN_WakeUpFromRxMsgCallback (CAN_HandleTypeDef *hcan) |
WakeUp from Rx message callback. | |
__weak void | HAL_CAN_ErrorCallback (CAN_HandleTypeDef *hcan) |
Error CAN callback. | |
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. |
CAN HAL module driver. This file provides firmware functions to manage the following functionalities of the Controller Area Network (CAN) peripheral: + Initialization and de-initialization functions + Configuration functions + Control functions + Interrupts management + Callbacks functions + Peripheral State and Error functions.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32f4xx_hal_can.c.