mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

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

Committer:
mbed_official
Date:
Fri Aug 14 13:15:17 2015 +0100
Revision:
610:813dcc80987e
Synchronized with git revision 6d84db41c6833e0b9b024741eb0616a5f62d5599

Full URL: https://github.com/mbedmicro/mbed/commit/6d84db41c6833e0b9b024741eb0616a5f62d5599/

DISCO_F746NG - Improvements

Who changed what in which revision?

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