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:
Kojto
Date:
Tue Feb 14 11:24:20 2017 +0000
Revision:
136:ef9c61f8c49f
Parent:
135:176b8275d35d
Child:
139:856d2700e60b
Release 136 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723

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