The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Thu Jul 06 15:30:22 2017 +0100
Revision:
146:22da6e220af6
Parent:
139:856d2700e60b
Release 146 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /**
Kojto 122:f9eeca106725 2 ******************************************************************************
Kojto 122:f9eeca106725 3 * @file stm32f7xx_hal_can.h
Kojto 122:f9eeca106725 4 * @author MCD Application Team
AnnaBridge 146:22da6e220af6 5 * @version V1.2.2
AnnaBridge 146:22da6e220af6 6 * @date 14-April-2017
Kojto 122:f9eeca106725 7 * @brief Header file of CAN HAL module.
Kojto 122:f9eeca106725 8 ******************************************************************************
Kojto 122:f9eeca106725 9 * @attention
Kojto 122:f9eeca106725 10 *
AnnaBridge 146:22da6e220af6 11 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
Kojto 122:f9eeca106725 12 *
Kojto 122:f9eeca106725 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 122:f9eeca106725 14 * are permitted provided that the following conditions are met:
Kojto 122:f9eeca106725 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 122:f9eeca106725 16 * this list of conditions and the following disclaimer.
Kojto 122:f9eeca106725 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 122:f9eeca106725 18 * this list of conditions and the following disclaimer in the documentation
Kojto 122:f9eeca106725 19 * and/or other materials provided with the distribution.
Kojto 122:f9eeca106725 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 122:f9eeca106725 21 * may be used to endorse or promote products derived from this software
Kojto 122:f9eeca106725 22 * without specific prior written permission.
Kojto 122:f9eeca106725 23 *
Kojto 122:f9eeca106725 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 122:f9eeca106725 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 122:f9eeca106725 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 122:f9eeca106725 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 122:f9eeca106725 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 122:f9eeca106725 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 122:f9eeca106725 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 122:f9eeca106725 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 122:f9eeca106725 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 122:f9eeca106725 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 122:f9eeca106725 34 *
Kojto 122:f9eeca106725 35 ******************************************************************************
Kojto 122:f9eeca106725 36 */
Kojto 122:f9eeca106725 37
Kojto 122:f9eeca106725 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 122:f9eeca106725 39 #ifndef __STM32F7xx_HAL_CAN_H
Kojto 122:f9eeca106725 40 #define __STM32F7xx_HAL_CAN_H
Kojto 122:f9eeca106725 41
Kojto 122:f9eeca106725 42 #ifdef __cplusplus
Kojto 122:f9eeca106725 43 extern "C" {
Kojto 122:f9eeca106725 44 #endif
Kojto 122:f9eeca106725 45
Kojto 122:f9eeca106725 46 /* Includes ------------------------------------------------------------------*/
Kojto 122:f9eeca106725 47 #include "stm32f7xx_hal_def.h"
Kojto 122:f9eeca106725 48
Kojto 122:f9eeca106725 49 /** @addtogroup STM32F7xx_HAL_Driver
Kojto 122:f9eeca106725 50 * @{
Kojto 122:f9eeca106725 51 */
Kojto 122:f9eeca106725 52
Kojto 122:f9eeca106725 53 /** @addtogroup CAN
Kojto 122:f9eeca106725 54 * @{
Kojto 122:f9eeca106725 55 */
Kojto 122:f9eeca106725 56
Kojto 122:f9eeca106725 57 /* Exported types ------------------------------------------------------------*/
Kojto 122:f9eeca106725 58 /** @defgroup CAN_Exported_Types CAN Exported Types
Kojto 122:f9eeca106725 59 * @{
Kojto 122:f9eeca106725 60 */
Kojto 122:f9eeca106725 61
Kojto 122:f9eeca106725 62 /**
Kojto 122:f9eeca106725 63 * @brief HAL State structures definition
Kojto 122:f9eeca106725 64 */
Kojto 122:f9eeca106725 65 typedef enum
Kojto 122:f9eeca106725 66 {
Kojto 122:f9eeca106725 67 HAL_CAN_STATE_RESET = 0x00U, /*!< CAN not yet initialized or disabled */
Kojto 122:f9eeca106725 68 HAL_CAN_STATE_READY = 0x01U, /*!< CAN initialized and ready for use */
Kojto 122:f9eeca106725 69 HAL_CAN_STATE_BUSY = 0x02U, /*!< CAN process is ongoing */
Kojto 122:f9eeca106725 70 HAL_CAN_STATE_BUSY_TX = 0x12U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 71 HAL_CAN_STATE_BUSY_RX0 = 0x22U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 72 HAL_CAN_STATE_BUSY_RX1 = 0x32U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 73 HAL_CAN_STATE_BUSY_TX_RX0 = 0x42U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 74 HAL_CAN_STATE_BUSY_TX_RX1 = 0x52U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 75 HAL_CAN_STATE_BUSY_RX0_RX1 = 0x62U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 76 HAL_CAN_STATE_BUSY_TX_RX0_RX1 = 0x72U, /*!< CAN process is ongoing */
AnnaBridge 146:22da6e220af6 77 HAL_CAN_STATE_TIMEOUT = 0x03U, /*!< CAN in Timeout state */
Kojto 122:f9eeca106725 78 HAL_CAN_STATE_ERROR = 0x04U /*!< CAN error state */
Kojto 122:f9eeca106725 79
Kojto 122:f9eeca106725 80 }HAL_CAN_StateTypeDef;
Kojto 122:f9eeca106725 81
Kojto 122:f9eeca106725 82 /**
Kojto 122:f9eeca106725 83 * @brief CAN init structure definition
Kojto 122:f9eeca106725 84 */
Kojto 122:f9eeca106725 85 typedef struct
Kojto 122:f9eeca106725 86 {
Kojto 122:f9eeca106725 87 uint32_t Prescaler; /*!< Specifies the length of a time quantum.
Kojto 122:f9eeca106725 88 This parameter must be a number between Min_Data = 1 and Max_Data = 1024 */
Kojto 122:f9eeca106725 89
Kojto 122:f9eeca106725 90 uint32_t Mode; /*!< Specifies the CAN operating mode.
Kojto 122:f9eeca106725 91 This parameter can be a value of @ref CAN_operating_mode */
Kojto 122:f9eeca106725 92
Kojto 122:f9eeca106725 93 uint32_t SJW; /*!< Specifies the maximum number of time quanta
Kojto 122:f9eeca106725 94 the CAN hardware is allowed to lengthen or
Kojto 122:f9eeca106725 95 shorten a bit to perform resynchronization.
Kojto 122:f9eeca106725 96 This parameter can be a value of @ref CAN_synchronisation_jump_width */
Kojto 122:f9eeca106725 97
Kojto 122:f9eeca106725 98 uint32_t BS1; /*!< Specifies the number of time quanta in Bit Segment 1.
Kojto 122:f9eeca106725 99 This parameter can be a value of @ref CAN_time_quantum_in_bit_segment_1 */
Kojto 122:f9eeca106725 100
Kojto 122:f9eeca106725 101 uint32_t BS2; /*!< Specifies the number of time quanta in Bit Segment 2.
Kojto 122:f9eeca106725 102 This parameter can be a value of @ref CAN_time_quantum_in_bit_segment_2 */
Kojto 122:f9eeca106725 103
Kojto 122:f9eeca106725 104 uint32_t TTCM; /*!< Enable or disable the time triggered communication mode.
Kojto 122:f9eeca106725 105 This parameter can be set to ENABLE or DISABLE. */
Kojto 122:f9eeca106725 106
Kojto 122:f9eeca106725 107 uint32_t ABOM; /*!< Enable or disable the automatic bus-off management.
Kojto 122:f9eeca106725 108 This parameter can be set to ENABLE or DISABLE */
Kojto 122:f9eeca106725 109
Kojto 122:f9eeca106725 110 uint32_t AWUM; /*!< Enable or disable the automatic wake-up mode.
Kojto 122:f9eeca106725 111 This parameter can be set to ENABLE or DISABLE */
Kojto 122:f9eeca106725 112
Kojto 122:f9eeca106725 113 uint32_t NART; /*!< Enable or disable the non-automatic retransmission mode.
Kojto 122:f9eeca106725 114 This parameter can be set to ENABLE or DISABLE */
Kojto 122:f9eeca106725 115
Kojto 122:f9eeca106725 116 uint32_t RFLM; /*!< Enable or disable the receive FIFO Locked mode.
Kojto 122:f9eeca106725 117 This parameter can be set to ENABLE or DISABLE */
Kojto 122:f9eeca106725 118
Kojto 122:f9eeca106725 119 uint32_t TXFP; /*!< Enable or disable the transmit FIFO priority.
Kojto 122:f9eeca106725 120 This parameter can be set to ENABLE or DISABLE */
Kojto 122:f9eeca106725 121 }CAN_InitTypeDef;
Kojto 122:f9eeca106725 122
Kojto 122:f9eeca106725 123 /**
Kojto 122:f9eeca106725 124 * @brief CAN filter configuration structure definition
Kojto 122:f9eeca106725 125 */
Kojto 122:f9eeca106725 126 typedef struct
Kojto 122:f9eeca106725 127 {
Kojto 122:f9eeca106725 128 uint32_t FilterIdHigh; /*!< Specifies the filter identification number (MSBs for a 32-bit
Kojto 122:f9eeca106725 129 configuration, first one for a 16-bit configuration).
Kojto 122:f9eeca106725 130 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
Kojto 122:f9eeca106725 131
Kojto 122:f9eeca106725 132 uint32_t FilterIdLow; /*!< Specifies the filter identification number (LSBs for a 32-bit
Kojto 122:f9eeca106725 133 configuration, second one for a 16-bit configuration).
Kojto 122:f9eeca106725 134 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
Kojto 122:f9eeca106725 135
Kojto 122:f9eeca106725 136 uint32_t FilterMaskIdHigh; /*!< Specifies the filter mask number or identification number,
Kojto 122:f9eeca106725 137 according to the mode (MSBs for a 32-bit configuration,
Kojto 122:f9eeca106725 138 first one for a 16-bit configuration).
Kojto 122:f9eeca106725 139 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
Kojto 122:f9eeca106725 140
Kojto 122:f9eeca106725 141 uint32_t FilterMaskIdLow; /*!< Specifies the filter mask number or identification number,
Kojto 122:f9eeca106725 142 according to the mode (LSBs for a 32-bit configuration,
Kojto 122:f9eeca106725 143 second one for a 16-bit configuration).
Kojto 122:f9eeca106725 144 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */
Kojto 122:f9eeca106725 145
Kojto 122:f9eeca106725 146 uint32_t FilterFIFOAssignment; /*!< Specifies the FIFO (0 or 1) which will be assigned to the filter.
Kojto 122:f9eeca106725 147 This parameter can be a value of @ref CAN_filter_FIFO */
Kojto 122:f9eeca106725 148
Kojto 122:f9eeca106725 149 uint32_t FilterNumber; /*!< Specifies the filter which will be initialized.
Kojto 122:f9eeca106725 150 This parameter must be a number between Min_Data = 0 and Max_Data = 27 */
Kojto 122:f9eeca106725 151
Kojto 122:f9eeca106725 152 uint32_t FilterMode; /*!< Specifies the filter mode to be initialized.
Kojto 122:f9eeca106725 153 This parameter can be a value of @ref CAN_filter_mode */
Kojto 122:f9eeca106725 154
Kojto 122:f9eeca106725 155 uint32_t FilterScale; /*!< Specifies the filter scale.
Kojto 122:f9eeca106725 156 This parameter can be a value of @ref CAN_filter_scale */
Kojto 122:f9eeca106725 157
Kojto 122:f9eeca106725 158 uint32_t FilterActivation; /*!< Enable or disable the filter.
Kojto 122:f9eeca106725 159 This parameter can be set to ENABLE or DISABLE. */
Kojto 122:f9eeca106725 160
Kojto 122:f9eeca106725 161 uint32_t BankNumber; /*!< Select the start slave bank filter.
Kojto 122:f9eeca106725 162 This parameter must be a number between Min_Data = 0 and Max_Data = 28 */
Kojto 122:f9eeca106725 163
Kojto 122:f9eeca106725 164 }CAN_FilterConfTypeDef;
Kojto 122:f9eeca106725 165
Kojto 122:f9eeca106725 166 /**
Kojto 122:f9eeca106725 167 * @brief CAN Tx message structure definition
Kojto 122:f9eeca106725 168 */
Kojto 122:f9eeca106725 169 typedef struct
Kojto 122:f9eeca106725 170 {
Kojto 122:f9eeca106725 171 uint32_t StdId; /*!< Specifies the standard identifier.
Kojto 122:f9eeca106725 172 This parameter must be a number between Min_Data = 0 and Max_Data = 0x7FF */
Kojto 122:f9eeca106725 173
Kojto 122:f9eeca106725 174 uint32_t ExtId; /*!< Specifies the extended identifier.
Kojto 122:f9eeca106725 175 This parameter must be a number between Min_Data = 0 and Max_Data = 0x1FFFFFFF */
Kojto 122:f9eeca106725 176
Kojto 122:f9eeca106725 177 uint32_t IDE; /*!< Specifies the type of identifier for the message that will be transmitted.
Kojto 122:f9eeca106725 178 This parameter can be a value of @ref CAN_Identifier_Type */
Kojto 122:f9eeca106725 179
Kojto 122:f9eeca106725 180 uint32_t RTR; /*!< Specifies the type of frame for the message that will be transmitted.
Kojto 122:f9eeca106725 181 This parameter can be a value of @ref CAN_remote_transmission_request */
Kojto 122:f9eeca106725 182
Kojto 122:f9eeca106725 183 uint32_t DLC; /*!< Specifies the length of the frame that will be transmitted.
Kojto 122:f9eeca106725 184 This parameter must be a number between Min_Data = 0 and Max_Data = 8 */
Kojto 122:f9eeca106725 185
Kojto 122:f9eeca106725 186 uint8_t Data[8]; /*!< Contains the data to be transmitted.
Kojto 122:f9eeca106725 187 This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF */
Kojto 122:f9eeca106725 188
Kojto 122:f9eeca106725 189 }CanTxMsgTypeDef;
Kojto 122:f9eeca106725 190
Kojto 122:f9eeca106725 191 /**
Kojto 122:f9eeca106725 192 * @brief CAN Rx message structure definition
Kojto 122:f9eeca106725 193 */
Kojto 122:f9eeca106725 194 typedef struct
Kojto 122:f9eeca106725 195 {
Kojto 122:f9eeca106725 196 uint32_t StdId; /*!< Specifies the standard identifier.
Kojto 122:f9eeca106725 197 This parameter must be a number between Min_Data = 0 and Max_Data = 0x7FF */
Kojto 122:f9eeca106725 198
Kojto 122:f9eeca106725 199 uint32_t ExtId; /*!< Specifies the extended identifier.
Kojto 122:f9eeca106725 200 This parameter must be a number between Min_Data = 0 and Max_Data = 0x1FFFFFFF */
Kojto 122:f9eeca106725 201
Kojto 122:f9eeca106725 202 uint32_t IDE; /*!< Specifies the type of identifier for the message that will be received.
Kojto 122:f9eeca106725 203 This parameter can be a value of @ref CAN_Identifier_Type */
Kojto 122:f9eeca106725 204
Kojto 122:f9eeca106725 205 uint32_t RTR; /*!< Specifies the type of frame for the received message.
Kojto 122:f9eeca106725 206 This parameter can be a value of @ref CAN_remote_transmission_request */
Kojto 122:f9eeca106725 207
Kojto 122:f9eeca106725 208 uint32_t DLC; /*!< Specifies the length of the frame that will be received.
Kojto 122:f9eeca106725 209 This parameter must be a number between Min_Data = 0 and Max_Data = 8 */
Kojto 122:f9eeca106725 210
Kojto 122:f9eeca106725 211 uint8_t Data[8]; /*!< Contains the data to be received.
Kojto 122:f9eeca106725 212 This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF */
Kojto 122:f9eeca106725 213
Kojto 122:f9eeca106725 214 uint32_t FMI; /*!< Specifies the index of the filter the message stored in the mailbox passes through.
Kojto 122:f9eeca106725 215 This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF */
Kojto 122:f9eeca106725 216
Kojto 122:f9eeca106725 217 uint32_t FIFONumber; /*!< Specifies the receive FIFO number.
Kojto 122:f9eeca106725 218 This parameter can be CAN_FIFO0 or CAN_FIFO1 */
Kojto 122:f9eeca106725 219
Kojto 122:f9eeca106725 220 }CanRxMsgTypeDef;
Kojto 122:f9eeca106725 221
Kojto 122:f9eeca106725 222 /**
Kojto 122:f9eeca106725 223 * @brief CAN handle Structure definition
Kojto 122:f9eeca106725 224 */
Kojto 122:f9eeca106725 225 typedef struct
Kojto 122:f9eeca106725 226 {
AnnaBridge 146:22da6e220af6 227 CAN_TypeDef *Instance; /*!< Register base address */
Kojto 122:f9eeca106725 228
AnnaBridge 146:22da6e220af6 229 CAN_InitTypeDef Init; /*!< CAN required parameters */
Kojto 122:f9eeca106725 230
AnnaBridge 146:22da6e220af6 231 CanTxMsgTypeDef* pTxMsg; /*!< Pointer to transmit structure */
Kojto 122:f9eeca106725 232
AnnaBridge 146:22da6e220af6 233 CanRxMsgTypeDef* pRxMsg; /*!< Pointer to reception structure for RX FIFO0 msg */
AnnaBridge 146:22da6e220af6 234
AnnaBridge 146:22da6e220af6 235 CanRxMsgTypeDef* pRx1Msg; /*!< Pointer to reception structure for RX FIFO1 msg */
Kojto 122:f9eeca106725 236
AnnaBridge 146:22da6e220af6 237 __IO HAL_CAN_StateTypeDef State; /*!< CAN communication state */
Kojto 122:f9eeca106725 238
AnnaBridge 146:22da6e220af6 239 HAL_LockTypeDef Lock; /*!< CAN locking object */
Kojto 122:f9eeca106725 240
<> 139:856d2700e60b 241 __IO uint32_t ErrorCode; /*!< CAN Error code
<> 139:856d2700e60b 242 This parameter can be a value of @ref CAN_Error_Code */
Kojto 122:f9eeca106725 243 }CAN_HandleTypeDef;
Kojto 122:f9eeca106725 244
Kojto 122:f9eeca106725 245 /**
Kojto 122:f9eeca106725 246 * @}
Kojto 122:f9eeca106725 247 */
Kojto 122:f9eeca106725 248
Kojto 122:f9eeca106725 249 /* Exported constants --------------------------------------------------------*/
Kojto 122:f9eeca106725 250 /** @defgroup CAN_Exported_Constants CAN Exported Constants
Kojto 122:f9eeca106725 251 * @{
Kojto 122:f9eeca106725 252 */
Kojto 122:f9eeca106725 253
<> 139:856d2700e60b 254 /** @defgroup CAN_Error_Code CAN Error Code
Kojto 122:f9eeca106725 255 * @{
Kojto 122:f9eeca106725 256 */
AnnaBridge 146:22da6e220af6 257 #define HAL_CAN_ERROR_NONE 0x00000000U /*!< No error */
AnnaBridge 146:22da6e220af6 258 #define HAL_CAN_ERROR_EWG 0x00000001U /*!< EWG error */
AnnaBridge 146:22da6e220af6 259 #define HAL_CAN_ERROR_EPV 0x00000002U /*!< EPV error */
AnnaBridge 146:22da6e220af6 260 #define HAL_CAN_ERROR_BOF 0x00000004U /*!< BOF error */
AnnaBridge 146:22da6e220af6 261 #define HAL_CAN_ERROR_STF 0x00000008U /*!< Stuff error */
AnnaBridge 146:22da6e220af6 262 #define HAL_CAN_ERROR_FOR 0x00000010U /*!< Form error */
AnnaBridge 146:22da6e220af6 263 #define HAL_CAN_ERROR_ACK 0x00000020U /*!< Acknowledgment error */
AnnaBridge 146:22da6e220af6 264 #define HAL_CAN_ERROR_BR 0x00000040U /*!< Bit recessive */
AnnaBridge 146:22da6e220af6 265 #define HAL_CAN_ERROR_BD 0x00000080U /*!< LEC dominant */
AnnaBridge 146:22da6e220af6 266 #define HAL_CAN_ERROR_CRC 0x00000100U /*!< LEC transfer error */
AnnaBridge 146:22da6e220af6 267 #define HAL_CAN_ERROR_FOV0 0x00000200U /*!< FIFO0 overrun error */
AnnaBridge 146:22da6e220af6 268 #define HAL_CAN_ERROR_FOV1 0x00000400U /*!< FIFO1 overrun error */
AnnaBridge 146:22da6e220af6 269 #define HAL_CAN_ERROR_TXFAIL 0x00000800U /*!< Transmit failure */
Kojto 122:f9eeca106725 270 /**
Kojto 122:f9eeca106725 271 * @}
Kojto 122:f9eeca106725 272 */
Kojto 122:f9eeca106725 273
Kojto 122:f9eeca106725 274 /** @defgroup CAN_InitStatus CAN InitStatus
Kojto 122:f9eeca106725 275 * @{
Kojto 122:f9eeca106725 276 */
Kojto 122:f9eeca106725 277 #define CAN_INITSTATUS_FAILED ((uint8_t)0x00U) /*!< CAN initialization failed */
Kojto 122:f9eeca106725 278 #define CAN_INITSTATUS_SUCCESS ((uint8_t)0x01U) /*!< CAN initialization OK */
Kojto 122:f9eeca106725 279 /**
Kojto 122:f9eeca106725 280 * @}
Kojto 122:f9eeca106725 281 */
Kojto 122:f9eeca106725 282
Kojto 122:f9eeca106725 283 /** @defgroup CAN_operating_mode CAN Operating Mode
Kojto 122:f9eeca106725 284 * @{
Kojto 122:f9eeca106725 285 */
Kojto 122:f9eeca106725 286 #define CAN_MODE_NORMAL ((uint32_t)0x00000000U) /*!< Normal mode */
Kojto 122:f9eeca106725 287 #define CAN_MODE_LOOPBACK ((uint32_t)CAN_BTR_LBKM) /*!< Loopback mode */
Kojto 122:f9eeca106725 288 #define CAN_MODE_SILENT ((uint32_t)CAN_BTR_SILM) /*!< Silent mode */
Kojto 122:f9eeca106725 289 #define CAN_MODE_SILENT_LOOPBACK ((uint32_t)(CAN_BTR_LBKM | CAN_BTR_SILM)) /*!< Loopback combined with silent mode */
Kojto 122:f9eeca106725 290 /**
Kojto 122:f9eeca106725 291 * @}
Kojto 122:f9eeca106725 292 */
Kojto 122:f9eeca106725 293
Kojto 122:f9eeca106725 294 /** @defgroup CAN_synchronisation_jump_width CAN Synchronisation Jump Width
Kojto 122:f9eeca106725 295 * @{
Kojto 122:f9eeca106725 296 */
Kojto 122:f9eeca106725 297 #define CAN_SJW_1TQ ((uint32_t)0x00000000U) /*!< 1 time quantum */
Kojto 122:f9eeca106725 298 #define CAN_SJW_2TQ ((uint32_t)CAN_BTR_SJW_0) /*!< 2 time quantum */
Kojto 122:f9eeca106725 299 #define CAN_SJW_3TQ ((uint32_t)CAN_BTR_SJW_1) /*!< 3 time quantum */
Kojto 122:f9eeca106725 300 #define CAN_SJW_4TQ ((uint32_t)CAN_BTR_SJW) /*!< 4 time quantum */
Kojto 122:f9eeca106725 301 /**
Kojto 122:f9eeca106725 302 * @}
Kojto 122:f9eeca106725 303 */
Kojto 122:f9eeca106725 304
Kojto 122:f9eeca106725 305 /** @defgroup CAN_time_quantum_in_bit_segment_1 CAN Time Quantum in bit segment 1
Kojto 122:f9eeca106725 306 * @{
Kojto 122:f9eeca106725 307 */
Kojto 122:f9eeca106725 308 #define CAN_BS1_1TQ ((uint32_t)0x00000000U) /*!< 1 time quantum */
Kojto 122:f9eeca106725 309 #define CAN_BS1_2TQ ((uint32_t)CAN_BTR_TS1_0) /*!< 2 time quantum */
Kojto 122:f9eeca106725 310 #define CAN_BS1_3TQ ((uint32_t)CAN_BTR_TS1_1) /*!< 3 time quantum */
Kojto 122:f9eeca106725 311 #define CAN_BS1_4TQ ((uint32_t)(CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 4 time quantum */
Kojto 122:f9eeca106725 312 #define CAN_BS1_5TQ ((uint32_t)CAN_BTR_TS1_2) /*!< 5 time quantum */
Kojto 122:f9eeca106725 313 #define CAN_BS1_6TQ ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_0)) /*!< 6 time quantum */
Kojto 122:f9eeca106725 314 #define CAN_BS1_7TQ ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_1)) /*!< 7 time quantum */
Kojto 122:f9eeca106725 315 #define CAN_BS1_8TQ ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 8 time quantum */
Kojto 122:f9eeca106725 316 #define CAN_BS1_9TQ ((uint32_t)CAN_BTR_TS1_3) /*!< 9 time quantum */
Kojto 122:f9eeca106725 317 #define CAN_BS1_10TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_0)) /*!< 10 time quantum */
Kojto 122:f9eeca106725 318 #define CAN_BS1_11TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_1)) /*!< 11 time quantum */
Kojto 122:f9eeca106725 319 #define CAN_BS1_12TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 12 time quantum */
Kojto 122:f9eeca106725 320 #define CAN_BS1_13TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2)) /*!< 13 time quantum */
Kojto 122:f9eeca106725 321 #define CAN_BS1_14TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2 | CAN_BTR_TS1_0)) /*!< 14 time quantum */
Kojto 122:f9eeca106725 322 #define CAN_BS1_15TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2 | CAN_BTR_TS1_1)) /*!< 15 time quantum */
Kojto 122:f9eeca106725 323 #define CAN_BS1_16TQ ((uint32_t)CAN_BTR_TS1) /*!< 16 time quantum */
Kojto 122:f9eeca106725 324 /**
Kojto 122:f9eeca106725 325 * @}
Kojto 122:f9eeca106725 326 */
Kojto 122:f9eeca106725 327
Kojto 122:f9eeca106725 328 /** @defgroup CAN_time_quantum_in_bit_segment_2 CAN Time Quantum in bit segment 2
Kojto 122:f9eeca106725 329 * @{
Kojto 122:f9eeca106725 330 */
Kojto 122:f9eeca106725 331 #define CAN_BS2_1TQ ((uint32_t)0x00000000U) /*!< 1 time quantum */
Kojto 122:f9eeca106725 332 #define CAN_BS2_2TQ ((uint32_t)CAN_BTR_TS2_0) /*!< 2 time quantum */
Kojto 122:f9eeca106725 333 #define CAN_BS2_3TQ ((uint32_t)CAN_BTR_TS2_1) /*!< 3 time quantum */
Kojto 122:f9eeca106725 334 #define CAN_BS2_4TQ ((uint32_t)(CAN_BTR_TS2_1 | CAN_BTR_TS2_0)) /*!< 4 time quantum */
Kojto 122:f9eeca106725 335 #define CAN_BS2_5TQ ((uint32_t)CAN_BTR_TS2_2) /*!< 5 time quantum */
Kojto 122:f9eeca106725 336 #define CAN_BS2_6TQ ((uint32_t)(CAN_BTR_TS2_2 | CAN_BTR_TS2_0)) /*!< 6 time quantum */
Kojto 122:f9eeca106725 337 #define CAN_BS2_7TQ ((uint32_t)(CAN_BTR_TS2_2 | CAN_BTR_TS2_1)) /*!< 7 time quantum */
Kojto 122:f9eeca106725 338 #define CAN_BS2_8TQ ((uint32_t)CAN_BTR_TS2) /*!< 8 time quantum */
Kojto 122:f9eeca106725 339 /**
Kojto 122:f9eeca106725 340 * @}
Kojto 122:f9eeca106725 341 */
Kojto 122:f9eeca106725 342
Kojto 122:f9eeca106725 343 /** @defgroup CAN_filter_mode CAN Filter Mode
Kojto 122:f9eeca106725 344 * @{
Kojto 122:f9eeca106725 345 */
Kojto 122:f9eeca106725 346 #define CAN_FILTERMODE_IDMASK ((uint8_t)0x00U) /*!< Identifier mask mode */
Kojto 122:f9eeca106725 347 #define CAN_FILTERMODE_IDLIST ((uint8_t)0x01U) /*!< Identifier list mode */
Kojto 122:f9eeca106725 348 /**
Kojto 122:f9eeca106725 349 * @}
Kojto 122:f9eeca106725 350 */
Kojto 122:f9eeca106725 351
Kojto 122:f9eeca106725 352 /** @defgroup CAN_filter_scale CAN Filter Scale
Kojto 122:f9eeca106725 353 * @{
Kojto 122:f9eeca106725 354 */
Kojto 122:f9eeca106725 355 #define CAN_FILTERSCALE_16BIT ((uint8_t)0x00U) /*!< Two 16-bit filters */
Kojto 122:f9eeca106725 356 #define CAN_FILTERSCALE_32BIT ((uint8_t)0x01U) /*!< One 32-bit filter */
Kojto 122:f9eeca106725 357 /**
Kojto 122:f9eeca106725 358 * @}
Kojto 122:f9eeca106725 359 */
Kojto 122:f9eeca106725 360
Kojto 122:f9eeca106725 361 /** @defgroup CAN_filter_FIFO CAN Filter FIFO
Kojto 122:f9eeca106725 362 * @{
Kojto 122:f9eeca106725 363 */
Kojto 122:f9eeca106725 364 #define CAN_FILTER_FIFO0 ((uint8_t)0x00U) /*!< Filter FIFO 0 assignment for filter x */
Kojto 122:f9eeca106725 365 #define CAN_FILTER_FIFO1 ((uint8_t)0x01U) /*!< Filter FIFO 1 assignment for filter x */
Kojto 122:f9eeca106725 366 /**
Kojto 122:f9eeca106725 367 * @}
Kojto 122:f9eeca106725 368 */
Kojto 122:f9eeca106725 369
Kojto 122:f9eeca106725 370 /** @defgroup CAN_Identifier_Type CAN Identifier Type
Kojto 122:f9eeca106725 371 * @{
Kojto 122:f9eeca106725 372 */
Kojto 122:f9eeca106725 373 #define CAN_ID_STD ((uint32_t)0x00000000U) /*!< Standard Id */
Kojto 122:f9eeca106725 374 #define CAN_ID_EXT ((uint32_t)0x00000004U) /*!< Extended Id */
Kojto 122:f9eeca106725 375 /**
Kojto 122:f9eeca106725 376 * @}
Kojto 122:f9eeca106725 377 */
Kojto 122:f9eeca106725 378
Kojto 122:f9eeca106725 379 /** @defgroup CAN_remote_transmission_request CAN Remote Transmission Request
Kojto 122:f9eeca106725 380 * @{
Kojto 122:f9eeca106725 381 */
Kojto 122:f9eeca106725 382 #define CAN_RTR_DATA ((uint32_t)0x00000000U) /*!< Data frame */
Kojto 122:f9eeca106725 383 #define CAN_RTR_REMOTE ((uint32_t)0x00000002U) /*!< Remote frame */
Kojto 122:f9eeca106725 384 /**
Kojto 122:f9eeca106725 385 * @}
Kojto 122:f9eeca106725 386 */
Kojto 122:f9eeca106725 387
Kojto 122:f9eeca106725 388 /** @defgroup CAN_receive_FIFO_number_constants CAN Receive FIFO Number Constants
Kojto 122:f9eeca106725 389 * @{
Kojto 122:f9eeca106725 390 */
Kojto 122:f9eeca106725 391 #define CAN_FIFO0 ((uint8_t)0x00U) /*!< CAN FIFO 0 used to receive */
Kojto 122:f9eeca106725 392 #define CAN_FIFO1 ((uint8_t)0x01U) /*!< CAN FIFO 1 used to receive */
Kojto 122:f9eeca106725 393 /**
Kojto 122:f9eeca106725 394 * @}
Kojto 122:f9eeca106725 395 */
Kojto 122:f9eeca106725 396
Kojto 122:f9eeca106725 397 /** @defgroup CAN_flags CAN Flags
Kojto 122:f9eeca106725 398 * @{
Kojto 122:f9eeca106725 399 */
Kojto 122:f9eeca106725 400 /* If the flag is 0x3XXXXXXX, it means that it can be used with CAN_GetFlagStatus()
Kojto 122:f9eeca106725 401 and CAN_ClearFlag() functions. */
Kojto 122:f9eeca106725 402 /* If the flag is 0x1XXXXXXX, it means that it can only be used with
Kojto 122:f9eeca106725 403 CAN_GetFlagStatus() function. */
Kojto 122:f9eeca106725 404
Kojto 122:f9eeca106725 405 /* Transmit Flags */
Kojto 122:f9eeca106725 406 #define CAN_FLAG_RQCP0 ((uint32_t)0x00000500U) /*!< Request MailBox0 flag */
Kojto 122:f9eeca106725 407 #define CAN_FLAG_RQCP1 ((uint32_t)0x00000508U) /*!< Request MailBox1 flag */
Kojto 122:f9eeca106725 408 #define CAN_FLAG_RQCP2 ((uint32_t)0x00000510U) /*!< Request MailBox2 flag */
Kojto 122:f9eeca106725 409 #define CAN_FLAG_TXOK0 ((uint32_t)0x00000501U) /*!< Transmission OK MailBox0 flag */
Kojto 122:f9eeca106725 410 #define CAN_FLAG_TXOK1 ((uint32_t)0x00000509U) /*!< Transmission OK MailBox1 flag */
Kojto 122:f9eeca106725 411 #define CAN_FLAG_TXOK2 ((uint32_t)0x00000511U) /*!< Transmission OK MailBox2 flag */
Kojto 122:f9eeca106725 412 #define CAN_FLAG_TME0 ((uint32_t)0x0000051AU) /*!< Transmit mailbox 0 empty flag */
Kojto 122:f9eeca106725 413 #define CAN_FLAG_TME1 ((uint32_t)0x0000051BU) /*!< Transmit mailbox 0 empty flag */
Kojto 122:f9eeca106725 414 #define CAN_FLAG_TME2 ((uint32_t)0x0000051CU) /*!< Transmit mailbox 0 empty flag */
Kojto 122:f9eeca106725 415
Kojto 122:f9eeca106725 416 /* Receive Flags */
Kojto 122:f9eeca106725 417 #define CAN_FLAG_FF0 ((uint32_t)0x00000203U) /*!< FIFO 0 Full flag */
Kojto 122:f9eeca106725 418 #define CAN_FLAG_FOV0 ((uint32_t)0x00000204U) /*!< FIFO 0 Overrun flag */
Kojto 122:f9eeca106725 419
Kojto 122:f9eeca106725 420 #define CAN_FLAG_FF1 ((uint32_t)0x00000403U) /*!< FIFO 1 Full flag */
Kojto 122:f9eeca106725 421 #define CAN_FLAG_FOV1 ((uint32_t)0x00000404U) /*!< FIFO 1 Overrun flag */
Kojto 122:f9eeca106725 422
Kojto 122:f9eeca106725 423 /* Operating Mode Flags */
Kojto 122:f9eeca106725 424 #define CAN_FLAG_INAK ((uint32_t)0x00000100U) /*!< Initialization acknowledge flag */
Kojto 122:f9eeca106725 425 #define CAN_FLAG_SLAK ((uint32_t)0x00000101U) /*!< Sleep acknowledge flag */
Kojto 122:f9eeca106725 426 #define CAN_FLAG_ERRI ((uint32_t)0x00000102U) /*!< Error flag */
Kojto 122:f9eeca106725 427 #define CAN_FLAG_WKU ((uint32_t)0x00000103U) /*!< Wake up flag */
Kojto 122:f9eeca106725 428 #define CAN_FLAG_SLAKI ((uint32_t)0x00000104U) /*!< Sleep acknowledge flag */
Kojto 122:f9eeca106725 429
Kojto 122:f9eeca106725 430 /* @note When SLAK interrupt is disabled (SLKIE=0), no polling on SLAKI is possible.
Kojto 122:f9eeca106725 431 In this case the SLAK bit can be polled.*/
Kojto 122:f9eeca106725 432
Kojto 122:f9eeca106725 433 /* Error Flags */
Kojto 122:f9eeca106725 434 #define CAN_FLAG_EWG ((uint32_t)0x00000300U) /*!< Error warning flag */
Kojto 122:f9eeca106725 435 #define CAN_FLAG_EPV ((uint32_t)0x00000301U) /*!< Error passive flag */
Kojto 122:f9eeca106725 436 #define CAN_FLAG_BOF ((uint32_t)0x00000302U) /*!< Bus-Off flag */
Kojto 122:f9eeca106725 437 /**
Kojto 122:f9eeca106725 438 * @}
Kojto 122:f9eeca106725 439 */
Kojto 122:f9eeca106725 440
Kojto 122:f9eeca106725 441 /** @defgroup CAN_Interrupts CAN Interrupts
Kojto 122:f9eeca106725 442 * @{
Kojto 122:f9eeca106725 443 */
Kojto 122:f9eeca106725 444 #define CAN_IT_TME ((uint32_t)CAN_IER_TMEIE) /*!< Transmit mailbox empty interrupt */
Kojto 122:f9eeca106725 445
Kojto 122:f9eeca106725 446 /* Receive Interrupts */
Kojto 122:f9eeca106725 447 #define CAN_IT_FMP0 ((uint32_t)CAN_IER_FMPIE0) /*!< FIFO 0 message pending interrupt */
Kojto 122:f9eeca106725 448 #define CAN_IT_FF0 ((uint32_t)CAN_IER_FFIE0) /*!< FIFO 0 full interrupt */
Kojto 122:f9eeca106725 449 #define CAN_IT_FOV0 ((uint32_t)CAN_IER_FOVIE0) /*!< FIFO 0 overrun interrupt */
Kojto 122:f9eeca106725 450 #define CAN_IT_FMP1 ((uint32_t)CAN_IER_FMPIE1) /*!< FIFO 1 message pending interrupt */
Kojto 122:f9eeca106725 451 #define CAN_IT_FF1 ((uint32_t)CAN_IER_FFIE1) /*!< FIFO 1 full interrupt */
Kojto 122:f9eeca106725 452 #define CAN_IT_FOV1 ((uint32_t)CAN_IER_FOVIE1) /*!< FIFO 1 overrun interrupt */
Kojto 122:f9eeca106725 453
Kojto 122:f9eeca106725 454 /* Operating Mode Interrupts */
Kojto 122:f9eeca106725 455 #define CAN_IT_WKU ((uint32_t)CAN_IER_WKUIE) /*!< Wake-up interrupt */
Kojto 122:f9eeca106725 456 #define CAN_IT_SLK ((uint32_t)CAN_IER_SLKIE) /*!< Sleep acknowledge interrupt */
Kojto 122:f9eeca106725 457
Kojto 122:f9eeca106725 458 /* Error Interrupts */
Kojto 122:f9eeca106725 459 #define CAN_IT_EWG ((uint32_t)CAN_IER_EWGIE) /*!< Error warning interrupt */
Kojto 122:f9eeca106725 460 #define CAN_IT_EPV ((uint32_t)CAN_IER_EPVIE) /*!< Error passive interrupt */
Kojto 122:f9eeca106725 461 #define CAN_IT_BOF ((uint32_t)CAN_IER_BOFIE) /*!< Bus-off interrupt */
Kojto 122:f9eeca106725 462 #define CAN_IT_LEC ((uint32_t)CAN_IER_LECIE) /*!< Last error code interrupt */
Kojto 122:f9eeca106725 463 #define CAN_IT_ERR ((uint32_t)CAN_IER_ERRIE) /*!< Error Interrupt */
Kojto 122:f9eeca106725 464 /**
Kojto 122:f9eeca106725 465 * @}
Kojto 122:f9eeca106725 466 */
Kojto 122:f9eeca106725 467
Kojto 122:f9eeca106725 468 /** @defgroup CAN_Mailboxes_Definition CAN Mailboxes Definition
Kojto 122:f9eeca106725 469 * @{
Kojto 122:f9eeca106725 470 */
Kojto 122:f9eeca106725 471 #define CAN_TXMAILBOX_0 ((uint8_t)0x00U)
Kojto 122:f9eeca106725 472 #define CAN_TXMAILBOX_1 ((uint8_t)0x01U)
Kojto 122:f9eeca106725 473 #define CAN_TXMAILBOX_2 ((uint8_t)0x02U)
Kojto 122:f9eeca106725 474 /**
Kojto 122:f9eeca106725 475 * @}
Kojto 122:f9eeca106725 476 */
Kojto 122:f9eeca106725 477
Kojto 122:f9eeca106725 478 /**
Kojto 122:f9eeca106725 479 * @}
Kojto 122:f9eeca106725 480 */
Kojto 122:f9eeca106725 481
Kojto 122:f9eeca106725 482 /* Exported macro ------------------------------------------------------------*/
Kojto 122:f9eeca106725 483 /** @defgroup CAN_Exported_Macros CAN Exported Macros
Kojto 122:f9eeca106725 484 * @{
Kojto 122:f9eeca106725 485 */
Kojto 122:f9eeca106725 486
Kojto 122:f9eeca106725 487 /** @brief Reset CAN handle state
Kojto 122:f9eeca106725 488 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 489 * @retval None
Kojto 122:f9eeca106725 490 */
Kojto 122:f9eeca106725 491 #define __HAL_CAN_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CAN_STATE_RESET)
Kojto 122:f9eeca106725 492
Kojto 122:f9eeca106725 493 /**
Kojto 122:f9eeca106725 494 * @brief Enable the specified CAN interrupts.
Kojto 122:f9eeca106725 495 * @param __HANDLE__: CAN handle
Kojto 122:f9eeca106725 496 * @param __INTERRUPT__: CAN Interrupt
Kojto 122:f9eeca106725 497 * @retval None
Kojto 122:f9eeca106725 498 */
Kojto 122:f9eeca106725 499 #define __HAL_CAN_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IER) |= (__INTERRUPT__))
Kojto 122:f9eeca106725 500
Kojto 122:f9eeca106725 501 /**
Kojto 122:f9eeca106725 502 * @brief Disable the specified CAN interrupts.
Kojto 122:f9eeca106725 503 * @param __HANDLE__: CAN handle
Kojto 122:f9eeca106725 504 * @param __INTERRUPT__: CAN Interrupt
Kojto 122:f9eeca106725 505 * @retval None
Kojto 122:f9eeca106725 506 */
Kojto 122:f9eeca106725 507 #define __HAL_CAN_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IER) &= ~(__INTERRUPT__))
Kojto 122:f9eeca106725 508
Kojto 122:f9eeca106725 509 /**
Kojto 122:f9eeca106725 510 * @brief Return the number of pending received messages.
Kojto 122:f9eeca106725 511 * @param __HANDLE__: CAN handle
Kojto 122:f9eeca106725 512 * @param __FIFONUMBER__: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
Kojto 122:f9eeca106725 513 * @retval The number of pending message.
Kojto 122:f9eeca106725 514 */
Kojto 122:f9eeca106725 515 #define __HAL_CAN_MSG_PENDING(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
Kojto 122:f9eeca106725 516 ((uint8_t)((__HANDLE__)->Instance->RF0R&(uint32_t)0x03)) : ((uint8_t)((__HANDLE__)->Instance->RF1R&(uint32_t)0x03)))
Kojto 122:f9eeca106725 517
Kojto 122:f9eeca106725 518 /** @brief Check whether the specified CAN flag is set or not.
Kojto 122:f9eeca106725 519 * @param __HANDLE__: CAN Handle
Kojto 122:f9eeca106725 520 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 521 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 522 * @arg CAN_TSR_RQCP0: Request MailBox0 Flag
Kojto 122:f9eeca106725 523 * @arg CAN_TSR_RQCP1: Request MailBox1 Flag
Kojto 122:f9eeca106725 524 * @arg CAN_TSR_RQCP2: Request MailBox2 Flag
Kojto 122:f9eeca106725 525 * @arg CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag
Kojto 122:f9eeca106725 526 * @arg CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag
Kojto 122:f9eeca106725 527 * @arg CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag
Kojto 122:f9eeca106725 528 * @arg CAN_FLAG_TME0: Transmit mailbox 0 empty Flag
Kojto 122:f9eeca106725 529 * @arg CAN_FLAG_TME1: Transmit mailbox 1 empty Flag
Kojto 122:f9eeca106725 530 * @arg CAN_FLAG_TME2: Transmit mailbox 2 empty Flag
Kojto 122:f9eeca106725 531 * @arg CAN_FLAG_FMP0: FIFO 0 Message Pending Flag
Kojto 122:f9eeca106725 532 * @arg CAN_FLAG_FF0: FIFO 0 Full Flag
Kojto 122:f9eeca106725 533 * @arg CAN_FLAG_FOV0: FIFO 0 Overrun Flag
Kojto 122:f9eeca106725 534 * @arg CAN_FLAG_FMP1: FIFO 1 Message Pending Flag
Kojto 122:f9eeca106725 535 * @arg CAN_FLAG_FF1: FIFO 1 Full Flag
Kojto 122:f9eeca106725 536 * @arg CAN_FLAG_FOV1: FIFO 1 Overrun Flag
Kojto 122:f9eeca106725 537 * @arg CAN_FLAG_WKU: Wake up Flag
Kojto 122:f9eeca106725 538 * @arg CAN_FLAG_SLAK: Sleep acknowledge Flag
Kojto 122:f9eeca106725 539 * @arg CAN_FLAG_SLAKI: Sleep acknowledge Flag
Kojto 122:f9eeca106725 540 * @arg CAN_FLAG_EWG: Error Warning Flag
Kojto 122:f9eeca106725 541 * @arg CAN_FLAG_EPV: Error Passive Flag
Kojto 122:f9eeca106725 542 * @arg CAN_FLAG_BOF: Bus-Off Flag
Kojto 122:f9eeca106725 543 * @retval The new state of __FLAG__ (TRUE or FALSE).
Kojto 122:f9eeca106725 544 */
Kojto 122:f9eeca106725 545 #define __HAL_CAN_GET_FLAG(__HANDLE__, __FLAG__) \
Kojto 122:f9eeca106725 546 ((((__FLAG__) >> 8) == 5)? ((((__HANDLE__)->Instance->TSR) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 547 (((__FLAG__) >> 8) == 2)? ((((__HANDLE__)->Instance->RF0R) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 548 (((__FLAG__) >> 8) == 4)? ((((__HANDLE__)->Instance->RF1R) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 549 (((__FLAG__) >> 8) == 1)? ((((__HANDLE__)->Instance->MSR) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 550 ((((__HANDLE__)->Instance->ESR) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))))
Kojto 122:f9eeca106725 551
Kojto 122:f9eeca106725 552 /** @brief Clear the specified CAN pending flag.
Kojto 122:f9eeca106725 553 * @param __HANDLE__: CAN Handle.
Kojto 122:f9eeca106725 554 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 555 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 556 * @arg CAN_TSR_RQCP0: Request MailBox0 Flag
Kojto 122:f9eeca106725 557 * @arg CAN_TSR_RQCP1: Request MailBox1 Flag
Kojto 122:f9eeca106725 558 * @arg CAN_TSR_RQCP2: Request MailBox2 Flag
Kojto 122:f9eeca106725 559 * @arg CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag
Kojto 122:f9eeca106725 560 * @arg CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag
Kojto 122:f9eeca106725 561 * @arg CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag
Kojto 122:f9eeca106725 562 * @arg CAN_FLAG_TME0: Transmit mailbox 0 empty Flag
Kojto 122:f9eeca106725 563 * @arg CAN_FLAG_TME1: Transmit mailbox 1 empty Flag
Kojto 122:f9eeca106725 564 * @arg CAN_FLAG_TME2: Transmit mailbox 2 empty Flag
Kojto 122:f9eeca106725 565 * @arg CAN_FLAG_FMP0: FIFO 0 Message Pending Flag
Kojto 122:f9eeca106725 566 * @arg CAN_FLAG_FF0: FIFO 0 Full Flag
Kojto 122:f9eeca106725 567 * @arg CAN_FLAG_FOV0: FIFO 0 Overrun Flag
Kojto 122:f9eeca106725 568 * @arg CAN_FLAG_FMP1: FIFO 1 Message Pending Flag
Kojto 122:f9eeca106725 569 * @arg CAN_FLAG_FF1: FIFO 1 Full Flag
Kojto 122:f9eeca106725 570 * @arg CAN_FLAG_FOV1: FIFO 1 Overrun Flag
Kojto 122:f9eeca106725 571 * @arg CAN_FLAG_WKU: Wake up Flag
Kojto 122:f9eeca106725 572 * @arg CAN_FLAG_SLAK: Sleep acknowledge Flag
Kojto 122:f9eeca106725 573 * @arg CAN_FLAG_SLAKI: Sleep acknowledge Flag
Kojto 122:f9eeca106725 574 * @retval The new state of __FLAG__ (TRUE or FALSE).
Kojto 122:f9eeca106725 575 */
Kojto 122:f9eeca106725 576 #define __HAL_CAN_CLEAR_FLAG(__HANDLE__, __FLAG__) \
Kojto 122:f9eeca106725 577 ((((__FLAG__) >> 8) == 5)? (((__HANDLE__)->Instance->TSR) = ((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 578 (((__FLAG__) >> 8) == 2)? (((__HANDLE__)->Instance->RF0R) = ((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 579 (((__FLAG__) >> 8) == 4)? (((__HANDLE__)->Instance->RF1R) = ((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 580 (((__HANDLE__)->Instance->MSR) = ((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))))
Kojto 122:f9eeca106725 581
Kojto 122:f9eeca106725 582 /** @brief Check if the specified CAN interrupt source is enabled or disabled.
Kojto 122:f9eeca106725 583 * @param __HANDLE__: CAN Handle
Kojto 122:f9eeca106725 584 * @param __INTERRUPT__: specifies the CAN interrupt source to check.
Kojto 122:f9eeca106725 585 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 586 * @arg CAN_IT_TME: Transmit mailbox empty interrupt enable
Kojto 122:f9eeca106725 587 * @arg CAN_IT_FMP0: FIFO0 message pending interrupt enable
Kojto 122:f9eeca106725 588 * @arg CAN_IT_FMP1: FIFO1 message pending interrupt enable
Kojto 122:f9eeca106725 589 * @retval The new state of __IT__ (TRUE or FALSE).
Kojto 122:f9eeca106725 590 */
Kojto 122:f9eeca106725 591 #define __HAL_CAN_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
Kojto 122:f9eeca106725 592
Kojto 122:f9eeca106725 593 /**
Kojto 122:f9eeca106725 594 * @brief Check the transmission status of a CAN Frame.
Kojto 122:f9eeca106725 595 * @param __HANDLE__: CAN Handle
Kojto 122:f9eeca106725 596 * @param __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.
Kojto 122:f9eeca106725 597 * @retval The new status of transmission (TRUE or FALSE).
Kojto 122:f9eeca106725 598 */
Kojto 122:f9eeca106725 599 #define __HAL_CAN_TRANSMIT_STATUS(__HANDLE__, __TRANSMITMAILBOX__)\
Kojto 122:f9eeca106725 600 (((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP0 | CAN_TSR_TXOK0 | CAN_TSR_TME0)) == (CAN_TSR_RQCP0 | CAN_TSR_TXOK0 | CAN_TSR_TME0)) :\
Kojto 122:f9eeca106725 601 ((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP1 | CAN_TSR_TXOK1 | CAN_TSR_TME1)) == (CAN_TSR_RQCP1 | CAN_TSR_TXOK1 | CAN_TSR_TME1)) :\
Kojto 122:f9eeca106725 602 ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)) == (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)))
Kojto 122:f9eeca106725 603
Kojto 122:f9eeca106725 604 /**
Kojto 122:f9eeca106725 605 * @brief Release the specified receive FIFO.
Kojto 122:f9eeca106725 606 * @param __HANDLE__: CAN handle
Kojto 122:f9eeca106725 607 * @param __FIFONUMBER__: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
Kojto 122:f9eeca106725 608 * @retval None
Kojto 122:f9eeca106725 609 */
Kojto 122:f9eeca106725 610 #define __HAL_CAN_FIFO_RELEASE(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
Kojto 122:f9eeca106725 611 ((__HANDLE__)->Instance->RF0R = CAN_RF0R_RFOM0) : ((__HANDLE__)->Instance->RF1R = CAN_RF1R_RFOM1))
Kojto 122:f9eeca106725 612
Kojto 122:f9eeca106725 613 /**
Kojto 122:f9eeca106725 614 * @brief Cancel a transmit request.
Kojto 122:f9eeca106725 615 * @param __HANDLE__: CAN Handle
Kojto 122:f9eeca106725 616 * @param __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.
Kojto 122:f9eeca106725 617 * @retval None
Kojto 122:f9eeca106725 618 */
Kojto 122:f9eeca106725 619 #define __HAL_CAN_CANCEL_TRANSMIT(__HANDLE__, __TRANSMITMAILBOX__)\
Kojto 122:f9eeca106725 620 (((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((__HANDLE__)->Instance->TSR = CAN_TSR_ABRQ0) :\
Kojto 122:f9eeca106725 621 ((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((__HANDLE__)->Instance->TSR = CAN_TSR_ABRQ1) :\
Kojto 122:f9eeca106725 622 ((__HANDLE__)->Instance->TSR = CAN_TSR_ABRQ2))
Kojto 122:f9eeca106725 623
Kojto 122:f9eeca106725 624 /**
Kojto 122:f9eeca106725 625 * @brief Enable or disable the DBG Freeze for CAN.
Kojto 122:f9eeca106725 626 * @param __HANDLE__: CAN Handle
Kojto 122:f9eeca106725 627 * @param __NEWSTATE__: new state of the CAN peripheral.
Kojto 122:f9eeca106725 628 * This parameter can be: ENABLE (CAN reception/transmission is frozen
Kojto 122:f9eeca106725 629 * during debug. Reception FIFOs can still be accessed/controlled normally)
Kojto 122:f9eeca106725 630 * or DISABLE (CAN is working during debug).
Kojto 122:f9eeca106725 631 * @retval None
Kojto 122:f9eeca106725 632 */
Kojto 122:f9eeca106725 633 #define __HAL_CAN_DBG_FREEZE(__HANDLE__, __NEWSTATE__) (((__NEWSTATE__) == ENABLE)? \
Kojto 122:f9eeca106725 634 ((__HANDLE__)->Instance->MCR |= CAN_MCR_DBF) : ((__HANDLE__)->Instance->MCR &= ~CAN_MCR_DBF))
Kojto 122:f9eeca106725 635
Kojto 122:f9eeca106725 636 /**
Kojto 122:f9eeca106725 637 * @}
Kojto 122:f9eeca106725 638 */
Kojto 122:f9eeca106725 639
Kojto 122:f9eeca106725 640 /* Exported functions --------------------------------------------------------*/
Kojto 122:f9eeca106725 641 /** @addtogroup CAN_Exported_Functions
Kojto 122:f9eeca106725 642 * @{
Kojto 122:f9eeca106725 643 */
Kojto 122:f9eeca106725 644
Kojto 122:f9eeca106725 645 /** @addtogroup CAN_Exported_Functions_Group1
Kojto 122:f9eeca106725 646 * @{
Kojto 122:f9eeca106725 647 */
Kojto 122:f9eeca106725 648 /* Initialization/de-initialization functions ***********************************/
Kojto 122:f9eeca106725 649 HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 650 HAL_StatusTypeDef HAL_CAN_ConfigFilter(CAN_HandleTypeDef* hcan, CAN_FilterConfTypeDef* sFilterConfig);
Kojto 122:f9eeca106725 651 HAL_StatusTypeDef HAL_CAN_DeInit(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 652 void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 653 void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 654 /**
Kojto 122:f9eeca106725 655 * @}
Kojto 122:f9eeca106725 656 */
Kojto 122:f9eeca106725 657
Kojto 122:f9eeca106725 658 /** @addtogroup CAN_Exported_Functions_Group2
Kojto 122:f9eeca106725 659 * @{
Kojto 122:f9eeca106725 660 */
Kojto 122:f9eeca106725 661 /* I/O operation functions ******************************************************/
Kojto 122:f9eeca106725 662 HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t Timeout);
Kojto 122:f9eeca106725 663 HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 664 HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef *hcan, uint8_t FIFONumber, uint32_t Timeout);
Kojto 122:f9eeca106725 665 HAL_StatusTypeDef HAL_CAN_Receive_IT(CAN_HandleTypeDef *hcan, uint8_t FIFONumber);
Kojto 122:f9eeca106725 666 HAL_StatusTypeDef HAL_CAN_Sleep(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 667 HAL_StatusTypeDef HAL_CAN_WakeUp(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 668 void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 669 void HAL_CAN_TxCpltCallback(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 670 void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 671 void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 672 /**
Kojto 122:f9eeca106725 673 * @}
Kojto 122:f9eeca106725 674 */
Kojto 122:f9eeca106725 675
Kojto 122:f9eeca106725 676 /** @addtogroup CAN_Exported_Functions_Group3
Kojto 122:f9eeca106725 677 * @{
Kojto 122:f9eeca106725 678 */
Kojto 122:f9eeca106725 679 /* Peripheral State functions ***************************************************/
Kojto 122:f9eeca106725 680 uint32_t HAL_CAN_GetError(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 681 HAL_CAN_StateTypeDef HAL_CAN_GetState(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 682 /**
Kojto 122:f9eeca106725 683 * @}
Kojto 122:f9eeca106725 684 */
Kojto 122:f9eeca106725 685
Kojto 122:f9eeca106725 686 /**
Kojto 122:f9eeca106725 687 * @}
Kojto 122:f9eeca106725 688 */
Kojto 122:f9eeca106725 689
Kojto 122:f9eeca106725 690 /* Private types -------------------------------------------------------------*/
Kojto 122:f9eeca106725 691 /** @defgroup CAN_Private_Types CAN Private Types
Kojto 122:f9eeca106725 692 * @{
Kojto 122:f9eeca106725 693 */
Kojto 122:f9eeca106725 694
Kojto 122:f9eeca106725 695 /**
Kojto 122:f9eeca106725 696 * @}
Kojto 122:f9eeca106725 697 */
Kojto 122:f9eeca106725 698
Kojto 122:f9eeca106725 699 /* Private variables ---------------------------------------------------------*/
Kojto 122:f9eeca106725 700 /** @defgroup CAN_Private_Variables CAN Private Variables
Kojto 122:f9eeca106725 701 * @{
Kojto 122:f9eeca106725 702 */
Kojto 122:f9eeca106725 703
Kojto 122:f9eeca106725 704 /**
Kojto 122:f9eeca106725 705 * @}
Kojto 122:f9eeca106725 706 */
Kojto 122:f9eeca106725 707
Kojto 122:f9eeca106725 708 /* Private constants ---------------------------------------------------------*/
Kojto 122:f9eeca106725 709 /** @defgroup CAN_Private_Constants CAN Private Constants
Kojto 122:f9eeca106725 710 * @{
Kojto 122:f9eeca106725 711 */
Kojto 122:f9eeca106725 712 #define CAN_TXSTATUS_NOMAILBOX ((uint8_t)0x04U) /*!< CAN cell did not provide CAN_TxStatus_NoMailBox */
Kojto 122:f9eeca106725 713 #define CAN_FLAG_MASK ((uint32_t)0x000000FFU)
Kojto 122:f9eeca106725 714 /**
Kojto 122:f9eeca106725 715 * @}
Kojto 122:f9eeca106725 716 */
Kojto 122:f9eeca106725 717
Kojto 122:f9eeca106725 718 /* Private macros ------------------------------------------------------------*/
Kojto 122:f9eeca106725 719 /** @defgroup CAN_Private_Macros CAN Private Macros
Kojto 122:f9eeca106725 720 * @{
Kojto 122:f9eeca106725 721 */
Kojto 122:f9eeca106725 722 #define IS_CAN_MODE(MODE) (((MODE) == CAN_MODE_NORMAL) || \
Kojto 122:f9eeca106725 723 ((MODE) == CAN_MODE_LOOPBACK)|| \
Kojto 122:f9eeca106725 724 ((MODE) == CAN_MODE_SILENT) || \
Kojto 122:f9eeca106725 725 ((MODE) == CAN_MODE_SILENT_LOOPBACK))
Kojto 122:f9eeca106725 726 #define IS_CAN_SJW(SJW) (((SJW) == CAN_SJW_1TQ) || ((SJW) == CAN_SJW_2TQ)|| \
Kojto 122:f9eeca106725 727 ((SJW) == CAN_SJW_3TQ) || ((SJW) == CAN_SJW_4TQ))
Kojto 122:f9eeca106725 728 #define IS_CAN_BS1(BS1) ((BS1) <= CAN_BS1_16TQ)
Kojto 122:f9eeca106725 729 #define IS_CAN_BS2(BS2) ((BS2) <= CAN_BS2_8TQ)
Kojto 122:f9eeca106725 730 #define IS_CAN_PRESCALER(PRESCALER) (((PRESCALER) >= 1) && ((PRESCALER) <= 1024))
Kojto 122:f9eeca106725 731 #define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 27)
Kojto 122:f9eeca106725 732 #define IS_CAN_FILTER_MODE(MODE) (((MODE) == CAN_FILTERMODE_IDMASK) || \
Kojto 122:f9eeca106725 733 ((MODE) == CAN_FILTERMODE_IDLIST))
Kojto 122:f9eeca106725 734 #define IS_CAN_FILTER_SCALE(SCALE) (((SCALE) == CAN_FILTERSCALE_16BIT) || \
Kojto 122:f9eeca106725 735 ((SCALE) == CAN_FILTERSCALE_32BIT))
Kojto 122:f9eeca106725 736 #define IS_CAN_FILTER_FIFO(FIFO) (((FIFO) == CAN_FILTER_FIFO0) || \
Kojto 122:f9eeca106725 737 ((FIFO) == CAN_FILTER_FIFO1))
Kojto 122:f9eeca106725 738 #define IS_CAN_BANKNUMBER(BANKNUMBER) ((BANKNUMBER) <= 28)
Kojto 122:f9eeca106725 739
Kojto 122:f9eeca106725 740 #define IS_CAN_TRANSMITMAILBOX(TRANSMITMAILBOX) ((TRANSMITMAILBOX) <= ((uint8_t)0x02))
Kojto 122:f9eeca106725 741 #define IS_CAN_STDID(STDID) ((STDID) <= ((uint32_t)0x7FF))
Kojto 122:f9eeca106725 742 #define IS_CAN_EXTID(EXTID) ((EXTID) <= ((uint32_t)0x1FFFFFFF))
Kojto 122:f9eeca106725 743 #define IS_CAN_DLC(DLC) ((DLC) <= ((uint8_t)0x08))
Kojto 122:f9eeca106725 744
Kojto 122:f9eeca106725 745 #define IS_CAN_IDTYPE(IDTYPE) (((IDTYPE) == CAN_ID_STD) || \
Kojto 122:f9eeca106725 746 ((IDTYPE) == CAN_ID_EXT))
Kojto 122:f9eeca106725 747 #define IS_CAN_RTR(RTR) (((RTR) == CAN_RTR_DATA) || ((RTR) == CAN_RTR_REMOTE))
Kojto 122:f9eeca106725 748 #define IS_CAN_FIFO(FIFO) (((FIFO) == CAN_FIFO0) || ((FIFO) == CAN_FIFO1))
Kojto 122:f9eeca106725 749
Kojto 122:f9eeca106725 750 /**
Kojto 122:f9eeca106725 751 * @}
Kojto 122:f9eeca106725 752 */
Kojto 122:f9eeca106725 753
Kojto 122:f9eeca106725 754 /* Private functions ---------------------------------------------------------*/
Kojto 122:f9eeca106725 755 /** @defgroup CAN_Private_Functions CAN Private Functions
Kojto 122:f9eeca106725 756 * @{
Kojto 122:f9eeca106725 757 */
Kojto 122:f9eeca106725 758
Kojto 122:f9eeca106725 759 /**
Kojto 122:f9eeca106725 760 * @}
Kojto 122:f9eeca106725 761 */
Kojto 122:f9eeca106725 762 /**
Kojto 122:f9eeca106725 763 * @}
Kojto 122:f9eeca106725 764 */
Kojto 122:f9eeca106725 765
Kojto 122:f9eeca106725 766 /**
Kojto 122:f9eeca106725 767 * @}
Kojto 122:f9eeca106725 768 */
Kojto 122:f9eeca106725 769
Kojto 122:f9eeca106725 770 #ifdef __cplusplus
Kojto 122:f9eeca106725 771 }
Kojto 122:f9eeca106725 772 #endif
Kojto 122:f9eeca106725 773
Kojto 122:f9eeca106725 774 #endif /* __STM32F7xx_CAN_H */
Kojto 122:f9eeca106725 775
Kojto 122:f9eeca106725 776
Kojto 122:f9eeca106725 777 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/