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:
<>
Date:
Wed Apr 12 16:07:08 2017 +0100
Revision:
140:97feb9bacc10
Parent:
128:9bcdf88f62b0
Child:
145:64910690c574
Release 140 of the mbed library

Ports for Upcoming Targets

3841: Add nRf52840 target https://github.com/ARMmbed/mbed-os/pull/3841
3992: Introducing UBLOX_C030 platform. https://github.com/ARMmbed/mbed-os/pull/3992

Fixes and Changes

3951: [NUCLEO_F303ZE] Correct ARDUINO pin https://github.com/ARMmbed/mbed-os/pull/3951
4021: Fixing a macro to detect when RTOS was in use for the NRF52840_DK https://github.com/ARMmbed/mbed-os/pull/4021
3979: KW24D: Add missing SPI defines and Arduino connector definitions https://github.com/ARMmbed/mbed-os/pull/3979
3990: UBLOX_C027: construct a ticker-based wait, rather than calling wait_ms(), in the https://github.com/ARMmbed/mbed-os/pull/3990
4003: Fixed OBOE in async serial tx for NRF52 target, fixes #4002 https://github.com/ARMmbed/mbed-os/pull/4003
4012: STM32: Correct I2C master error handling https://github.com/ARMmbed/mbed-os/pull/4012
4020: NUCLEO_L011K4 remove unsupported tool chain files https://github.com/ARMmbed/mbed-os/pull/4020
4065: K66F: Move bss section to m_data_2 Section https://github.com/ARMmbed/mbed-os/pull/4065
4014: Issue 3763: Reduce heap allocation in the GCC linker file https://github.com/ARMmbed/mbed-os/pull/4014
4030: [STM32L0] reduce IAR heap and stack size for small targets https://github.com/ARMmbed/mbed-os/pull/4030
4109: NUCLEO_L476RG : minor serial pin update https://github.com/ARMmbed/mbed-os/pull/4109
3982: Ticker - kl25z bugfix for handling events in the past https://github.com/ARMmbed/mbed-os/pull/3982

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 122:f9eeca106725 1 /**
Kojto 122:f9eeca106725 2 ******************************************************************************
Kojto 122:f9eeca106725 3 * @file stm32l4xx_hal_can.h
Kojto 122:f9eeca106725 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.5.1
Kojto 122:f9eeca106725 6 * @date 31-May-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 __STM32L4xx_CAN_H
Kojto 122:f9eeca106725 40 #define __STM32L4xx_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 "stm32l4xx_hal_def.h"
Kojto 122:f9eeca106725 48
Kojto 122:f9eeca106725 49 /** @addtogroup STM32L4xx_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 = 0x00, /*!< CAN not yet initialized or disabled */
Kojto 122:f9eeca106725 68 HAL_CAN_STATE_READY = 0x01, /*!< CAN initialized and ready for use */
Kojto 122:f9eeca106725 69 HAL_CAN_STATE_BUSY = 0x02, /*!< CAN process is ongoing */
Kojto 122:f9eeca106725 70 HAL_CAN_STATE_BUSY_TX = 0x12, /*!< CAN process is ongoing */
Kojto 122:f9eeca106725 71 HAL_CAN_STATE_BUSY_RX = 0x22, /*!< CAN process is ongoing */
Kojto 122:f9eeca106725 72 HAL_CAN_STATE_BUSY_TX_RX = 0x32, /*!< CAN process is ongoing */
Kojto 122:f9eeca106725 73 HAL_CAN_STATE_TIMEOUT = 0x03, /*!< Timeout state */
Kojto 122:f9eeca106725 74 HAL_CAN_STATE_ERROR = 0x04 /*!< 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 CAN_Error_Code CAN Error Code
Kojto 122:f9eeca106725 249 * @{
Kojto 122:f9eeca106725 250 */
Kojto 122:f9eeca106725 251 #define HAL_CAN_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
Kojto 122:f9eeca106725 252 #define HAL_CAN_ERROR_EWG ((uint32_t)0x00000001) /*!< EWG error */
Kojto 122:f9eeca106725 253 #define HAL_CAN_ERROR_EPV ((uint32_t)0x00000002) /*!< EPV error */
Kojto 122:f9eeca106725 254 #define HAL_CAN_ERROR_BOF ((uint32_t)0x00000004) /*!< BOF error */
Kojto 122:f9eeca106725 255 #define HAL_CAN_ERROR_STF ((uint32_t)0x00000008) /*!< Stuff error */
Kojto 122:f9eeca106725 256 #define HAL_CAN_ERROR_FOR ((uint32_t)0x00000010) /*!< Form error */
Kojto 122:f9eeca106725 257 #define HAL_CAN_ERROR_ACK ((uint32_t)0x00000020) /*!< Acknowledgment error */
Kojto 122:f9eeca106725 258 #define HAL_CAN_ERROR_BR ((uint32_t)0x00000040) /*!< Bit recessive */
Kojto 122:f9eeca106725 259 #define HAL_CAN_ERROR_BD ((uint32_t)0x00000080) /*!< LEC dominant */
Kojto 122:f9eeca106725 260 #define HAL_CAN_ERROR_CRC ((uint32_t)0x00000100) /*!< 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 initialization Status
Kojto 122:f9eeca106725 266 * @{
Kojto 122:f9eeca106725 267 */
Kojto 122:f9eeca106725 268 #define CAN_INITSTATUS_FAILED ((uint32_t)0x00000000) /*!< CAN initialization failed */
Kojto 122:f9eeca106725 269 #define CAN_INITSTATUS_SUCCESS ((uint32_t)0x00000001) /*!< 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)0x00000000) /*!< 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
Kojto 122:f9eeca106725 286 /** @defgroup CAN_synchronisation_jump_width CAN Synchronization Jump Width
Kojto 122:f9eeca106725 287 * @{
Kojto 122:f9eeca106725 288 */
Kojto 122:f9eeca106725 289 #define CAN_SJW_1TQ ((uint32_t)0x00000000) /*!< 1 time quantum */
Kojto 122:f9eeca106725 290 #define CAN_SJW_2TQ ((uint32_t)CAN_BTR_SJW_0) /*!< 2 time quantum */
Kojto 122:f9eeca106725 291 #define CAN_SJW_3TQ ((uint32_t)CAN_BTR_SJW_1) /*!< 3 time quantum */
Kojto 122:f9eeca106725 292 #define CAN_SJW_4TQ ((uint32_t)CAN_BTR_SJW) /*!< 4 time quantum */
Kojto 122:f9eeca106725 293 /**
Kojto 122:f9eeca106725 294 * @}
Kojto 122:f9eeca106725 295 */
Kojto 122:f9eeca106725 296
Kojto 122:f9eeca106725 297 /** @defgroup CAN_time_quantum_in_bit_segment_1 CAN Time Quantum in Bit Segment 1
Kojto 122:f9eeca106725 298 * @{
Kojto 122:f9eeca106725 299 */
Kojto 122:f9eeca106725 300 #define CAN_BS1_1TQ ((uint32_t)0x00000000) /*!< 1 time quantum */
Kojto 122:f9eeca106725 301 #define CAN_BS1_2TQ ((uint32_t)CAN_BTR_TS1_0) /*!< 2 time quantum */
Kojto 122:f9eeca106725 302 #define CAN_BS1_3TQ ((uint32_t)CAN_BTR_TS1_1) /*!< 3 time quantum */
Kojto 122:f9eeca106725 303 #define CAN_BS1_4TQ ((uint32_t)(CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 4 time quantum */
Kojto 122:f9eeca106725 304 #define CAN_BS1_5TQ ((uint32_t)CAN_BTR_TS1_2) /*!< 5 time quantum */
Kojto 122:f9eeca106725 305 #define CAN_BS1_6TQ ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_0)) /*!< 6 time quantum */
Kojto 122:f9eeca106725 306 #define CAN_BS1_7TQ ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_1)) /*!< 7 time quantum */
Kojto 122:f9eeca106725 307 #define CAN_BS1_8TQ ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 8 time quantum */
Kojto 122:f9eeca106725 308 #define CAN_BS1_9TQ ((uint32_t)CAN_BTR_TS1_3) /*!< 9 time quantum */
Kojto 122:f9eeca106725 309 #define CAN_BS1_10TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_0)) /*!< 10 time quantum */
Kojto 122:f9eeca106725 310 #define CAN_BS1_11TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_1)) /*!< 11 time quantum */
Kojto 122:f9eeca106725 311 #define CAN_BS1_12TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 12 time quantum */
Kojto 122:f9eeca106725 312 #define CAN_BS1_13TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2)) /*!< 13 time quantum */
Kojto 122:f9eeca106725 313 #define CAN_BS1_14TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2 | CAN_BTR_TS1_0)) /*!< 14 time quantum */
Kojto 122:f9eeca106725 314 #define CAN_BS1_15TQ ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2 | CAN_BTR_TS1_1)) /*!< 15 time quantum */
Kojto 122:f9eeca106725 315 #define CAN_BS1_16TQ ((uint32_t)CAN_BTR_TS1) /*!< 16 time quantum */
Kojto 122:f9eeca106725 316 /**
Kojto 122:f9eeca106725 317 * @}
Kojto 122:f9eeca106725 318 */
Kojto 122:f9eeca106725 319
Kojto 122:f9eeca106725 320 /** @defgroup CAN_time_quantum_in_bit_segment_2 CAN Time Quantum in Bit Segment 2
Kojto 122:f9eeca106725 321 * @{
Kojto 122:f9eeca106725 322 */
Kojto 122:f9eeca106725 323 #define CAN_BS2_1TQ ((uint32_t)0x00000000) /*!< 1 time quantum */
Kojto 122:f9eeca106725 324 #define CAN_BS2_2TQ ((uint32_t)CAN_BTR_TS2_0) /*!< 2 time quantum */
Kojto 122:f9eeca106725 325 #define CAN_BS2_3TQ ((uint32_t)CAN_BTR_TS2_1) /*!< 3 time quantum */
Kojto 122:f9eeca106725 326 #define CAN_BS2_4TQ ((uint32_t)(CAN_BTR_TS2_1 | CAN_BTR_TS2_0)) /*!< 4 time quantum */
Kojto 122:f9eeca106725 327 #define CAN_BS2_5TQ ((uint32_t)CAN_BTR_TS2_2) /*!< 5 time quantum */
Kojto 122:f9eeca106725 328 #define CAN_BS2_6TQ ((uint32_t)(CAN_BTR_TS2_2 | CAN_BTR_TS2_0)) /*!< 6 time quantum */
Kojto 122:f9eeca106725 329 #define CAN_BS2_7TQ ((uint32_t)(CAN_BTR_TS2_2 | CAN_BTR_TS2_1)) /*!< 7 time quantum */
Kojto 122:f9eeca106725 330 #define CAN_BS2_8TQ ((uint32_t)CAN_BTR_TS2) /*!< 8 time quantum */
Kojto 122:f9eeca106725 331 /**
Kojto 122:f9eeca106725 332 * @}
Kojto 122:f9eeca106725 333 */
Kojto 122:f9eeca106725 334
Kojto 122:f9eeca106725 335 /** @defgroup CAN_filter_mode CAN Filter Mode
Kojto 122:f9eeca106725 336 * @{
Kojto 122:f9eeca106725 337 */
Kojto 122:f9eeca106725 338 #define CAN_FILTERMODE_IDMASK ((uint8_t)0x00) /*!< Identifier mask mode */
Kojto 122:f9eeca106725 339 #define CAN_FILTERMODE_IDLIST ((uint8_t)0x01) /*!< Identifier list mode */
Kojto 122:f9eeca106725 340 /**
Kojto 122:f9eeca106725 341 * @}
Kojto 122:f9eeca106725 342 */
Kojto 122:f9eeca106725 343
Kojto 122:f9eeca106725 344 /** @defgroup CAN_filter_scale CAN Filter Scale
Kojto 122:f9eeca106725 345 * @{
Kojto 122:f9eeca106725 346 */
Kojto 122:f9eeca106725 347 #define CAN_FILTERSCALE_16BIT ((uint8_t)0x00) /*!< Two 16-bit filters */
Kojto 122:f9eeca106725 348 #define CAN_FILTERSCALE_32BIT ((uint8_t)0x01) /*!< One 32-bit filter */
Kojto 122:f9eeca106725 349 /**
Kojto 122:f9eeca106725 350 * @}
Kojto 122:f9eeca106725 351 */
Kojto 122:f9eeca106725 352
Kojto 122:f9eeca106725 353 /** @defgroup CAN_filter_FIFO CAN Filter FIFO
Kojto 122:f9eeca106725 354 * @{
Kojto 122:f9eeca106725 355 */
Kojto 122:f9eeca106725 356 #define CAN_FILTER_FIFO0 ((uint8_t)0x00) /*!< Filter FIFO 0 assignment for filter x */
Kojto 122:f9eeca106725 357 #define CAN_FILTER_FIFO1 ((uint8_t)0x01) /*!< Filter FIFO 1 assignment for filter x */
Kojto 122:f9eeca106725 358 /**
Kojto 122:f9eeca106725 359 * @}
Kojto 122:f9eeca106725 360 */
Kojto 122:f9eeca106725 361
Kojto 122:f9eeca106725 362 /** @defgroup CAN_identifier_type CAN Identifier Type
Kojto 122:f9eeca106725 363 * @{
Kojto 122:f9eeca106725 364 */
Kojto 122:f9eeca106725 365 #define CAN_ID_STD ((uint32_t)0x00000000) /*!< Standard Id */
Kojto 122:f9eeca106725 366 #define CAN_ID_EXT ((uint32_t)0x00000004) /*!< Extended Id */
Kojto 122:f9eeca106725 367 /**
Kojto 122:f9eeca106725 368 * @}
Kojto 122:f9eeca106725 369 */
Kojto 122:f9eeca106725 370
Kojto 122:f9eeca106725 371 /** @defgroup CAN_remote_transmission_request CAN Remote Transmission Request
Kojto 122:f9eeca106725 372 * @{
Kojto 122:f9eeca106725 373 */
Kojto 122:f9eeca106725 374 #define CAN_RTR_DATA ((uint32_t)0x00000000) /*!< Data frame */
Kojto 122:f9eeca106725 375 #define CAN_RTR_REMOTE ((uint32_t)0x00000002) /*!< Remote frame */
Kojto 122:f9eeca106725 376 /**
Kojto 122:f9eeca106725 377 * @}
Kojto 122:f9eeca106725 378 */
Kojto 122:f9eeca106725 379
Kojto 122:f9eeca106725 380 /** @defgroup CAN_receive_FIFO_number_constants CAN Receive FIFO Number
Kojto 122:f9eeca106725 381 * @{
Kojto 122:f9eeca106725 382 */
Kojto 122:f9eeca106725 383 #define CAN_FIFO0 ((uint8_t)0x00) /*!< CAN FIFO 0 used to receive */
Kojto 122:f9eeca106725 384 #define CAN_FIFO1 ((uint8_t)0x01) /*!< CAN FIFO 1 used to receive */
Kojto 122:f9eeca106725 385 /**
Kojto 122:f9eeca106725 386 * @}
Kojto 122:f9eeca106725 387 */
Kojto 122:f9eeca106725 388
Kojto 122:f9eeca106725 389 /** @defgroup CAN_flags CAN Flags
Kojto 122:f9eeca106725 390 * @{
Kojto 122:f9eeca106725 391 */
Kojto 122:f9eeca106725 392 /* If the flag is 0x3XXXXXXX, it means that it can be used with CAN_GetFlagStatus()
Kojto 122:f9eeca106725 393 and CAN_ClearFlag() functions. */
Kojto 122:f9eeca106725 394 /* If the flag is 0x1XXXXXXX, it means that it can only be used with
Kojto 122:f9eeca106725 395 CAN_GetFlagStatus() function. */
Kojto 122:f9eeca106725 396
Kojto 122:f9eeca106725 397 /* Transmit Flags */
Kojto 122:f9eeca106725 398 #define CAN_FLAG_RQCP0 ((uint32_t)0x00000500) /*!< Request MailBox0 flag */
Kojto 122:f9eeca106725 399 #define CAN_FLAG_RQCP1 ((uint32_t)0x00000508) /*!< Request MailBox1 flag */
Kojto 122:f9eeca106725 400 #define CAN_FLAG_RQCP2 ((uint32_t)0x00000510) /*!< Request MailBox2 flag */
Kojto 122:f9eeca106725 401 #define CAN_FLAG_TXOK0 ((uint32_t)0x00000501) /*!< Transmission OK MailBox0 flag */
Kojto 122:f9eeca106725 402 #define CAN_FLAG_TXOK1 ((uint32_t)0x00000509) /*!< Transmission OK MailBox1 flag */
Kojto 122:f9eeca106725 403 #define CAN_FLAG_TXOK2 ((uint32_t)0x00000511) /*!< Transmission OK MailBox2 flag */
Kojto 122:f9eeca106725 404 #define CAN_FLAG_TME0 ((uint32_t)0x0000051A) /*!< Transmit mailbox 0 empty flag */
Kojto 122:f9eeca106725 405 #define CAN_FLAG_TME1 ((uint32_t)0x0000051B) /*!< Transmit mailbox 0 empty flag */
Kojto 122:f9eeca106725 406 #define CAN_FLAG_TME2 ((uint32_t)0x0000051C) /*!< Transmit mailbox 0 empty flag */
Kojto 122:f9eeca106725 407
Kojto 122:f9eeca106725 408 /* Receive Flags */
Kojto 122:f9eeca106725 409 #define CAN_FLAG_FF0 ((uint32_t)0x00000203) /*!< FIFO 0 Full flag */
Kojto 122:f9eeca106725 410 #define CAN_FLAG_FOV0 ((uint32_t)0x00000204) /*!< FIFO 0 Overrun flag */
Kojto 122:f9eeca106725 411
Kojto 122:f9eeca106725 412 #define CAN_FLAG_FF1 ((uint32_t)0x00000403) /*!< FIFO 1 Full flag */
Kojto 122:f9eeca106725 413 #define CAN_FLAG_FOV1 ((uint32_t)0x00000404) /*!< FIFO 1 Overrun flag */
Kojto 122:f9eeca106725 414
Kojto 122:f9eeca106725 415 /* Operating Mode Flags */
Kojto 122:f9eeca106725 416 #define CAN_FLAG_WKU ((uint32_t)0x00000103) /*!< Wake up flag */
Kojto 122:f9eeca106725 417 #define CAN_FLAG_SLAK ((uint32_t)0x00000101) /*!< Sleep acknowledge flag */
Kojto 122:f9eeca106725 418 #define CAN_FLAG_SLAKI ((uint32_t)0x00000104) /*!< Sleep acknowledge flag */
Kojto 122:f9eeca106725 419 /* @note When SLAK interrupt is disabled (SLKIE=0), no polling on SLAKI is possible.
Kojto 122:f9eeca106725 420 In this case the SLAK bit can be polled.*/
Kojto 122:f9eeca106725 421
Kojto 122:f9eeca106725 422 /* Error Flags */
Kojto 122:f9eeca106725 423 #define CAN_FLAG_EWG ((uint32_t)0x00000300) /*!< Error warning flag */
Kojto 122:f9eeca106725 424 #define CAN_FLAG_EPV ((uint32_t)0x00000301) /*!< Error passive flag */
Kojto 122:f9eeca106725 425 #define CAN_FLAG_BOF ((uint32_t)0x00000302) /*!< Bus-Off flag */
Kojto 122:f9eeca106725 426 /**
Kojto 122:f9eeca106725 427 * @}
Kojto 122:f9eeca106725 428 */
Kojto 122:f9eeca106725 429
Kojto 122:f9eeca106725 430 /** @defgroup CAN_interrupts CAN Interrupts
Kojto 122:f9eeca106725 431 * @{
Kojto 122:f9eeca106725 432 */
Kojto 122:f9eeca106725 433 #define CAN_IT_TME ((uint32_t)CAN_IER_TMEIE) /*!< Transmit mailbox empty interrupt */
Kojto 122:f9eeca106725 434
Kojto 122:f9eeca106725 435 /* Receive Interrupts */
Kojto 122:f9eeca106725 436 #define CAN_IT_FMP0 ((uint32_t)CAN_IER_FMPIE0) /*!< FIFO 0 message pending interrupt */
Kojto 122:f9eeca106725 437 #define CAN_IT_FF0 ((uint32_t)CAN_IER_FFIE0) /*!< FIFO 0 full interrupt */
Kojto 122:f9eeca106725 438 #define CAN_IT_FOV0 ((uint32_t)CAN_IER_FOVIE0) /*!< FIFO 0 overrun interrupt */
Kojto 122:f9eeca106725 439 #define CAN_IT_FMP1 ((uint32_t)CAN_IER_FMPIE1) /*!< FIFO 1 message pending interrupt */
Kojto 122:f9eeca106725 440 #define CAN_IT_FF1 ((uint32_t)CAN_IER_FFIE1) /*!< FIFO 1 full interrupt */
Kojto 122:f9eeca106725 441 #define CAN_IT_FOV1 ((uint32_t)CAN_IER_FOVIE1) /*!< FIFO 1 overrun interrupt */
Kojto 122:f9eeca106725 442
Kojto 122:f9eeca106725 443 /* Operating Mode Interrupts */
Kojto 122:f9eeca106725 444 #define CAN_IT_WKU ((uint32_t)CAN_IER_WKUIE) /*!< Wake-up interrupt */
Kojto 122:f9eeca106725 445 #define CAN_IT_SLK ((uint32_t)CAN_IER_SLKIE) /*!< Sleep acknowledge interrupt */
Kojto 122:f9eeca106725 446
Kojto 122:f9eeca106725 447 /* Error Interrupts */
Kojto 122:f9eeca106725 448 #define CAN_IT_EWG ((uint32_t)CAN_IER_EWGIE) /*!< Error warning interrupt */
Kojto 122:f9eeca106725 449 #define CAN_IT_EPV ((uint32_t)CAN_IER_EPVIE) /*!< Error passive interrupt */
Kojto 122:f9eeca106725 450 #define CAN_IT_BOF ((uint32_t)CAN_IER_BOFIE) /*!< Bus-off interrupt */
Kojto 122:f9eeca106725 451 #define CAN_IT_LEC ((uint32_t)CAN_IER_LECIE) /*!< Last error code interrupt */
Kojto 122:f9eeca106725 452 #define CAN_IT_ERR ((uint32_t)CAN_IER_ERRIE) /*!< Error Interrupt */
Kojto 122:f9eeca106725 453
Kojto 122:f9eeca106725 454 /**
Kojto 122:f9eeca106725 455 * @}
Kojto 122:f9eeca106725 456 */
Kojto 122:f9eeca106725 457
Kojto 122:f9eeca106725 458 /* Mailboxes definition */
Kojto 122:f9eeca106725 459 #define CAN_TXMAILBOX_0 ((uint8_t)0x00)
Kojto 122:f9eeca106725 460 #define CAN_TXMAILBOX_1 ((uint8_t)0x01)
Kojto 122:f9eeca106725 461 #define CAN_TXMAILBOX_2 ((uint8_t)0x02)
Kojto 122:f9eeca106725 462
Kojto 122:f9eeca106725 463 /**
Kojto 122:f9eeca106725 464 * @}
Kojto 122:f9eeca106725 465 */
Kojto 122:f9eeca106725 466
Kojto 122:f9eeca106725 467 /* Exported macros -----------------------------------------------------------*/
Kojto 122:f9eeca106725 468 /** @defgroup CAN_Exported_Macro CAN Exported Macros
Kojto 122:f9eeca106725 469 * @{
Kojto 122:f9eeca106725 470 */
Kojto 122:f9eeca106725 471
Kojto 122:f9eeca106725 472 /** @brief Reset CAN handle state.
Kojto 122:f9eeca106725 473 * @param __HANDLE__: CAN handle.
Kojto 122:f9eeca106725 474 * @retval None
Kojto 122:f9eeca106725 475 */
Kojto 122:f9eeca106725 476 #define __HAL_CAN_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CAN_STATE_RESET)
Kojto 122:f9eeca106725 477
Kojto 122:f9eeca106725 478 /**
Kojto 122:f9eeca106725 479 * @brief Enable the specified CAN interrupt.
Kojto 122:f9eeca106725 480 * @param __HANDLE__: CAN handle.
Kojto 122:f9eeca106725 481 * @param __INTERRUPT__: CAN Interrupt.
Kojto 122:f9eeca106725 482 * @retval None
Kojto 122:f9eeca106725 483 */
Kojto 122:f9eeca106725 484 #define __HAL_CAN_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IER) |= (__INTERRUPT__))
Kojto 122:f9eeca106725 485
Kojto 122:f9eeca106725 486 /**
Kojto 122:f9eeca106725 487 * @brief Disable the specified CAN interrupt.
Kojto 122:f9eeca106725 488 * @param __HANDLE__: CAN handle.
Kojto 122:f9eeca106725 489 * @param __INTERRUPT__: CAN Interrupt.
Kojto 122:f9eeca106725 490 * @retval None
Kojto 122:f9eeca106725 491 */
Kojto 122:f9eeca106725 492 #define __HAL_CAN_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IER) &= ~(__INTERRUPT__))
Kojto 122:f9eeca106725 493
Kojto 122:f9eeca106725 494 /**
Kojto 122:f9eeca106725 495 * @brief Return the number of pending received messages.
Kojto 122:f9eeca106725 496 * @param __HANDLE__: CAN handle.
Kojto 122:f9eeca106725 497 * @param __FIFONUMBER__: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
Kojto 122:f9eeca106725 498 * @retval The number of pending message.
Kojto 122:f9eeca106725 499 */
Kojto 122:f9eeca106725 500 #define __HAL_CAN_MSG_PENDING(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
Kojto 122:f9eeca106725 501 ((uint8_t)((__HANDLE__)->Instance->RF0R&(uint32_t)0x03)) : ((uint8_t)((__HANDLE__)->Instance->RF1R&(uint32_t)0x03)))
Kojto 122:f9eeca106725 502
Kojto 122:f9eeca106725 503 /** @brief Check whether the specified CAN flag is set or not.
Kojto 122:f9eeca106725 504 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 505 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 506 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 507 * @arg CAN_TSR_RQCP0: Request MailBox0 Flag
Kojto 122:f9eeca106725 508 * @arg CAN_TSR_RQCP1: Request MailBox1 Flag
Kojto 122:f9eeca106725 509 * @arg CAN_TSR_RQCP2: Request MailBox2 Flag
Kojto 122:f9eeca106725 510 * @arg CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag
Kojto 122:f9eeca106725 511 * @arg CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag
Kojto 122:f9eeca106725 512 * @arg CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag
Kojto 122:f9eeca106725 513 * @arg CAN_FLAG_TME0: Transmit mailbox 0 empty Flag
Kojto 122:f9eeca106725 514 * @arg CAN_FLAG_TME1: Transmit mailbox 1 empty Flag
Kojto 122:f9eeca106725 515 * @arg CAN_FLAG_TME2: Transmit mailbox 2 empty Flag
Kojto 122:f9eeca106725 516 * @arg CAN_FLAG_FMP0: FIFO 0 Message Pending Flag
Kojto 122:f9eeca106725 517 * @arg CAN_FLAG_FF0: FIFO 0 Full Flag
Kojto 122:f9eeca106725 518 * @arg CAN_FLAG_FOV0: FIFO 0 Overrun Flag
Kojto 122:f9eeca106725 519 * @arg CAN_FLAG_FMP1: FIFO 1 Message Pending Flag
Kojto 122:f9eeca106725 520 * @arg CAN_FLAG_FF1: FIFO 1 Full Flag
Kojto 122:f9eeca106725 521 * @arg CAN_FLAG_FOV1: FIFO 1 Overrun Flag
Kojto 122:f9eeca106725 522 * @arg CAN_FLAG_WKU: Wake up Flag
Kojto 122:f9eeca106725 523 * @arg CAN_FLAG_SLAK: Sleep acknowledge Flag
Kojto 122:f9eeca106725 524 * @arg CAN_FLAG_SLAKI: Sleep acknowledge Flag
Kojto 122:f9eeca106725 525 * @arg CAN_FLAG_EWG: Error Warning Flag
Kojto 122:f9eeca106725 526 * @arg CAN_FLAG_EPV: Error Passive Flag
Kojto 122:f9eeca106725 527 * @arg CAN_FLAG_BOF: Bus-Off Flag
Kojto 122:f9eeca106725 528 * @retval The new state of __FLAG__ (TRUE or FALSE).
Kojto 122:f9eeca106725 529 */
Kojto 122:f9eeca106725 530 #define __HAL_CAN_GET_FLAG(__HANDLE__, __FLAG__) \
Kojto 122:f9eeca106725 531 ((((__FLAG__) >> 8) == 5)? ((((__HANDLE__)->Instance->TSR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 532 (((__FLAG__) >> 8) == 2)? ((((__HANDLE__)->Instance->RF0R) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 533 (((__FLAG__) >> 8) == 4)? ((((__HANDLE__)->Instance->RF1R) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 534 (((__FLAG__) >> 8) == 1)? ((((__HANDLE__)->Instance->MSR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 535 ((((__HANDLE__)->Instance->ESR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))))
Kojto 122:f9eeca106725 536
Kojto 122:f9eeca106725 537 /** @brief Clear the specified CAN pending flag.
Kojto 122:f9eeca106725 538 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 539 * @param __FLAG__: specifies the flag to check.
Kojto 122:f9eeca106725 540 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 541 * @arg CAN_TSR_RQCP0: Request MailBox0 Flag
Kojto 122:f9eeca106725 542 * @arg CAN_TSR_RQCP1: Request MailBox1 Flag
Kojto 122:f9eeca106725 543 * @arg CAN_TSR_RQCP2: Request MailBox2 Flag
Kojto 122:f9eeca106725 544 * @arg CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag
Kojto 122:f9eeca106725 545 * @arg CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag
Kojto 122:f9eeca106725 546 * @arg CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag
Kojto 122:f9eeca106725 547 * @arg CAN_FLAG_TME0: Transmit mailbox 0 empty Flag
Kojto 122:f9eeca106725 548 * @arg CAN_FLAG_TME1: Transmit mailbox 1 empty Flag
Kojto 122:f9eeca106725 549 * @arg CAN_FLAG_TME2: Transmit mailbox 2 empty Flag
Kojto 122:f9eeca106725 550 * @arg CAN_FLAG_FMP0: FIFO 0 Message Pending Flag
Kojto 122:f9eeca106725 551 * @arg CAN_FLAG_FF0: FIFO 0 Full Flag
Kojto 122:f9eeca106725 552 * @arg CAN_FLAG_FOV0: FIFO 0 Overrun Flag
Kojto 122:f9eeca106725 553 * @arg CAN_FLAG_FMP1: FIFO 1 Message Pending Flag
Kojto 122:f9eeca106725 554 * @arg CAN_FLAG_FF1: FIFO 1 Full Flag
Kojto 122:f9eeca106725 555 * @arg CAN_FLAG_FOV1: FIFO 1 Overrun Flag
Kojto 122:f9eeca106725 556 * @arg CAN_FLAG_WKU: Wake up Flag
Kojto 122:f9eeca106725 557 * @arg CAN_FLAG_SLAKI: Sleep acknowledge Flag
Kojto 122:f9eeca106725 558 * @retval The new state of __FLAG__ (TRUE or FALSE).
Kojto 122:f9eeca106725 559 */
Kojto 122:f9eeca106725 560 #define __HAL_CAN_CLEAR_FLAG(__HANDLE__, __FLAG__) \
Kojto 122:f9eeca106725 561 ((((__FLAG__) >> 8U) == 5)? (((__HANDLE__)->Instance->TSR) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 562 (((__FLAG__) >> 8U) == 2)? (((__HANDLE__)->Instance->RF0R) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 563 (((__FLAG__) >> 8U) == 4)? (((__HANDLE__)->Instance->RF1R) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): \
Kojto 122:f9eeca106725 564 (((__FLAG__) >> 8U) == 1)? (((__HANDLE__)->Instance->MSR) = (1U << ((__FLAG__) & CAN_FLAG_MASK))): 0)
Kojto 122:f9eeca106725 565
Kojto 122:f9eeca106725 566
Kojto 122:f9eeca106725 567 /** @brief Check whether the specified CAN interrupt source is enabled or not.
Kojto 122:f9eeca106725 568 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 569 * @param __INTERRUPT__: specifies the CAN interrupt source to check.
Kojto 122:f9eeca106725 570 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 571 * @arg CAN_IT_TME: Transmit mailbox empty interrupt enable
Kojto 122:f9eeca106725 572 * @arg CAN_IT_FMP0: FIFO0 message pending interrupt enable
Kojto 122:f9eeca106725 573 * @arg CAN_IT_FMP1: FIFO1 message pending interrupt enable
Kojto 122:f9eeca106725 574 * @retval The new state of __IT__ (TRUE or FALSE).
Kojto 122:f9eeca106725 575 */
Kojto 122:f9eeca106725 576 #define __HAL_CAN_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
Kojto 122:f9eeca106725 577
Kojto 122:f9eeca106725 578 /**
Kojto 122:f9eeca106725 579 * @brief Check the transmission status of a CAN Frame.
Kojto 122:f9eeca106725 580 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 581 * @param __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.
Kojto 122:f9eeca106725 582 * @retval The new status of transmission (TRUE or FALSE).
Kojto 122:f9eeca106725 583 */
Kojto 122:f9eeca106725 584 #define __HAL_CAN_TRANSMIT_STATUS(__HANDLE__, __TRANSMITMAILBOX__)\
Kojto 122:f9eeca106725 585 (((__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 586 ((__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 587 ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)) == (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)))
Kojto 122:f9eeca106725 588
Kojto 122:f9eeca106725 589
Kojto 122:f9eeca106725 590
Kojto 122:f9eeca106725 591 /**
Kojto 122:f9eeca106725 592 * @brief Release the specified receive FIFO.
Kojto 122:f9eeca106725 593 * @param __HANDLE__: CAN handle.
Kojto 122:f9eeca106725 594 * @param __FIFONUMBER__: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
Kojto 122:f9eeca106725 595 * @retval None
Kojto 122:f9eeca106725 596 */
Kojto 122:f9eeca106725 597 #define __HAL_CAN_FIFO_RELEASE(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
Kojto 122:f9eeca106725 598 ((__HANDLE__)->Instance->RF0R |= CAN_RF0R_RFOM0) : ((__HANDLE__)->Instance->RF1R |= CAN_RF1R_RFOM1))
Kojto 122:f9eeca106725 599
Kojto 122:f9eeca106725 600 /**
Kojto 122:f9eeca106725 601 * @brief Cancel a transmit request.
Kojto 122:f9eeca106725 602 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 603 * @param __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.
Kojto 122:f9eeca106725 604 * @retval None
Kojto 122:f9eeca106725 605 */
Kojto 122:f9eeca106725 606 #define __HAL_CAN_CANCEL_TRANSMIT(__HANDLE__, __TRANSMITMAILBOX__)\
Kojto 122:f9eeca106725 607 (((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((__HANDLE__)->Instance->TSR |= CAN_TSR_ABRQ0) :\
Kojto 122:f9eeca106725 608 ((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((__HANDLE__)->Instance->TSR |= CAN_TSR_ABRQ1) :\
Kojto 122:f9eeca106725 609 ((__HANDLE__)->Instance->TSR |= CAN_TSR_ABRQ2))
Kojto 122:f9eeca106725 610
Kojto 122:f9eeca106725 611 /**
Kojto 122:f9eeca106725 612 * @brief Enable or disable the DBG Freeze for CAN.
Kojto 122:f9eeca106725 613 * @param __HANDLE__: specifies the CAN Handle.
Kojto 122:f9eeca106725 614 * @param __NEWSTATE__: new state of the CAN peripheral.
Kojto 122:f9eeca106725 615 * This parameter can be: ENABLE (CAN reception/transmission is frozen
Kojto 122:f9eeca106725 616 * during debug. Reception FIFO can still be accessed/controlled normally)
Kojto 122:f9eeca106725 617 * or DISABLE (CAN is working during debug).
Kojto 122:f9eeca106725 618 * @retval None
Kojto 122:f9eeca106725 619 */
Kojto 122:f9eeca106725 620 #define __HAL_CAN_DBG_FREEZE(__HANDLE__, __NEWSTATE__) (((__NEWSTATE__) == ENABLE)? \
Kojto 122:f9eeca106725 621 ((__HANDLE__)->Instance->MCR |= CAN_MCR_DBF) : ((__HANDLE__)->Instance->MCR &= ~CAN_MCR_DBF))
Kojto 122:f9eeca106725 622
Kojto 122:f9eeca106725 623 /**
Kojto 122:f9eeca106725 624 * @}
Kojto 122:f9eeca106725 625 */
Kojto 122:f9eeca106725 626
Kojto 122:f9eeca106725 627 /* Exported functions --------------------------------------------------------*/
Kojto 122:f9eeca106725 628 /** @addtogroup CAN_Exported_Functions CAN Exported Functions
Kojto 122:f9eeca106725 629 * @{
Kojto 122:f9eeca106725 630 */
Kojto 122:f9eeca106725 631
Kojto 122:f9eeca106725 632 /** @defgroup CAN_Exported_Functions_Group1 Initialization and de-initialization functions
Kojto 122:f9eeca106725 633 * @brief Initialization and Configuration functions
Kojto 122:f9eeca106725 634 * @{
Kojto 122:f9eeca106725 635 */
Kojto 122:f9eeca106725 636 /* addtogroup and de-initialization functions *****************************/
Kojto 122:f9eeca106725 637 HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 638 HAL_StatusTypeDef HAL_CAN_ConfigFilter(CAN_HandleTypeDef* hcan, CAN_FilterConfTypeDef* sFilterConfig);
Kojto 122:f9eeca106725 639 HAL_StatusTypeDef HAL_CAN_DeInit(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 640 void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 641 void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 642 /**
Kojto 122:f9eeca106725 643 * @}
Kojto 122:f9eeca106725 644 */
Kojto 122:f9eeca106725 645
Kojto 122:f9eeca106725 646 /** @addtogroup CAN_Exported_Functions_Group2 Input and Output operation functions
Kojto 122:f9eeca106725 647 * @brief I/O operation functions
Kojto 122:f9eeca106725 648 * @{
Kojto 122:f9eeca106725 649 */
Kojto 122:f9eeca106725 650 /* IO operation functions *****************************************************/
Kojto 122:f9eeca106725 651 HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t Timeout);
Kojto 122:f9eeca106725 652 HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 653 HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef *hcan, uint8_t FIFONumber, uint32_t Timeout);
Kojto 122:f9eeca106725 654 HAL_StatusTypeDef HAL_CAN_Receive_IT(CAN_HandleTypeDef *hcan, uint8_t FIFONumber);
Kojto 122:f9eeca106725 655 HAL_StatusTypeDef HAL_CAN_Sleep(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 656 HAL_StatusTypeDef HAL_CAN_WakeUp(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 657 void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 658 void HAL_CAN_TxCpltCallback(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 659 void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 660 void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 661 /**
Kojto 122:f9eeca106725 662 * @}
Kojto 122:f9eeca106725 663 */
Kojto 122:f9eeca106725 664
Kojto 122:f9eeca106725 665 /** @addtogroup CAN_Exported_Functions_Group3 Peripheral State and Error functions
Kojto 122:f9eeca106725 666 * @brief CAN Peripheral State functions
Kojto 122:f9eeca106725 667 * @{
Kojto 122:f9eeca106725 668 */
Kojto 122:f9eeca106725 669 /* Peripheral State and Error functions ***************************************/
Kojto 122:f9eeca106725 670 uint32_t HAL_CAN_GetError(CAN_HandleTypeDef *hcan);
Kojto 122:f9eeca106725 671 HAL_CAN_StateTypeDef HAL_CAN_GetState(CAN_HandleTypeDef* hcan);
Kojto 122:f9eeca106725 672 /**
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 /* Private types -------------------------------------------------------------*/
Kojto 122:f9eeca106725 681 /* Private constants ---------------------------------------------------------*/
Kojto 122:f9eeca106725 682 /** @defgroup CAN_Private_Constants CAN Private Constants
Kojto 122:f9eeca106725 683 * @{
Kojto 122:f9eeca106725 684 */
Kojto 122:f9eeca106725 685 /** @defgroup CAN_transmit_constants CAN Transmit Constants
Kojto 122:f9eeca106725 686 * @{
Kojto 122:f9eeca106725 687 */
Kojto 122:f9eeca106725 688 #define CAN_TXSTATUS_NOMAILBOX ((uint8_t)0x04) /*!< CAN cell did not provide CAN_TxStatus_NoMailBox */
Kojto 122:f9eeca106725 689 /**
Kojto 122:f9eeca106725 690 * @}
Kojto 122:f9eeca106725 691 */
Kojto 122:f9eeca106725 692 #define CAN_FLAG_MASK ((uint32_t)0x000000FF)
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 macros ------------------------------------------------------------*/
Kojto 122:f9eeca106725 700 /** @defgroup CAN_Private_Macros CAN Private Macros
Kojto 122:f9eeca106725 701 * @{
Kojto 122:f9eeca106725 702 */
Kojto 122:f9eeca106725 703
Kojto 122:f9eeca106725 704 #define IS_CAN_MODE(MODE) (((MODE) == CAN_MODE_NORMAL) || \
Kojto 122:f9eeca106725 705 ((MODE) == CAN_MODE_LOOPBACK)|| \
Kojto 122:f9eeca106725 706 ((MODE) == CAN_MODE_SILENT) || \
Kojto 122:f9eeca106725 707 ((MODE) == CAN_MODE_SILENT_LOOPBACK))
Kojto 122:f9eeca106725 708
Kojto 122:f9eeca106725 709 #define IS_CAN_SJW(SJW) (((SJW) == CAN_SJW_1TQ) || ((SJW) == CAN_SJW_2TQ)|| \
Kojto 122:f9eeca106725 710 ((SJW) == CAN_SJW_3TQ) || ((SJW) == CAN_SJW_4TQ))
Kojto 122:f9eeca106725 711
Kojto 122:f9eeca106725 712 #define IS_CAN_BS1(BS1) ((BS1) <= CAN_BS1_16TQ)
Kojto 122:f9eeca106725 713
Kojto 122:f9eeca106725 714 #define IS_CAN_BS2(BS2) ((BS2) <= CAN_BS2_8TQ)
Kojto 122:f9eeca106725 715
Kojto 122:f9eeca106725 716 #define IS_CAN_PRESCALER(PRESCALER) (((PRESCALER) >= 1) && ((PRESCALER) <= 1024))
Kojto 122:f9eeca106725 717
Kojto 122:f9eeca106725 718 #define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 27)
Kojto 122:f9eeca106725 719
Kojto 122:f9eeca106725 720 #define IS_CAN_FILTER_MODE(MODE) (((MODE) == CAN_FILTERMODE_IDMASK) || \
Kojto 122:f9eeca106725 721 ((MODE) == CAN_FILTERMODE_IDLIST))
Kojto 122:f9eeca106725 722
Kojto 122:f9eeca106725 723 #define IS_CAN_FILTER_SCALE(SCALE) (((SCALE) == CAN_FILTERSCALE_16BIT) || \
Kojto 122:f9eeca106725 724 ((SCALE) == CAN_FILTERSCALE_32BIT))
Kojto 122:f9eeca106725 725
Kojto 122:f9eeca106725 726 #define IS_CAN_FILTER_FIFO(FIFO) (((FIFO) == CAN_FILTER_FIFO0) || \
Kojto 122:f9eeca106725 727 ((FIFO) == CAN_FILTER_FIFO1))
Kojto 122:f9eeca106725 728
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
Kojto 122:f9eeca106725 733 #define IS_CAN_STDID(STDID) ((STDID) <= ((uint32_t)0x7FF))
Kojto 122:f9eeca106725 734
Kojto 122:f9eeca106725 735 #define IS_CAN_EXTID(EXTID) ((EXTID) <= ((uint32_t)0x1FFFFFFF))
Kojto 122:f9eeca106725 736
Kojto 122:f9eeca106725 737 #define IS_CAN_DLC(DLC) ((DLC) <= ((uint8_t)0x08))
Kojto 122:f9eeca106725 738
Kojto 122:f9eeca106725 739 #define IS_CAN_IDTYPE(IDTYPE) (((IDTYPE) == CAN_ID_STD) || \
Kojto 122:f9eeca106725 740 ((IDTYPE) == CAN_ID_EXT))
Kojto 122:f9eeca106725 741
Kojto 122:f9eeca106725 742 #define IS_CAN_RTR(RTR) (((RTR) == CAN_RTR_DATA) || ((RTR) == CAN_RTR_REMOTE))
Kojto 122:f9eeca106725 743
Kojto 122:f9eeca106725 744 #define IS_CAN_FIFO(FIFO) (((FIFO) == CAN_FIFO0) || ((FIFO) == CAN_FIFO1))
Kojto 122:f9eeca106725 745
Kojto 122:f9eeca106725 746 /**
Kojto 122:f9eeca106725 747 * @}
Kojto 122:f9eeca106725 748 */
Kojto 122:f9eeca106725 749
Kojto 122:f9eeca106725 750 /* Private functions ---------------------------------------------------------*/
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 /* __STM32L4xx_CAN_H */
Kojto 122:f9eeca106725 766
Kojto 122:f9eeca106725 767
Kojto 122:f9eeca106725 768 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/