Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
targets/cmsis/TARGET_STM/TARGET_STM32F1/stm32f1xx_hal_can_ex.h@124:6a4a5b7d7324, 2016-05-09 (annotated)
- Committer:
- mbed_official
- Date:
- Mon May 09 18:30:12 2016 +0100
- Revision:
- 124:6a4a5b7d7324
- Parent:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
Synchronized with git revision ad75bdcde34d7da9d54b7669010c7fb968a99c7c
Full URL: https://github.com/mbedmicro/mbed/commit/ad75bdcde34d7da9d54b7669010c7fb968a99c7c/
[STMF1] Stm32f1_hal_cube update
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bogdanm | 0:9b334a45a8ff | 1 | /** |
| bogdanm | 0:9b334a45a8ff | 2 | ****************************************************************************** |
| bogdanm | 0:9b334a45a8ff | 3 | * @file stm32f1xx_hal_can_ex.h |
| bogdanm | 0:9b334a45a8ff | 4 | * @author MCD Application Team |
| mbed_official | 124:6a4a5b7d7324 | 5 | * @version V1.0.4 |
| mbed_official | 124:6a4a5b7d7324 | 6 | * @date 29-April-2016 |
| bogdanm | 0:9b334a45a8ff | 7 | * @brief Header file of CAN HAL Extension module. |
| bogdanm | 0:9b334a45a8ff | 8 | ****************************************************************************** |
| bogdanm | 0:9b334a45a8ff | 9 | * @attention |
| bogdanm | 0:9b334a45a8ff | 10 | * |
| mbed_official | 124:6a4a5b7d7324 | 11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| bogdanm | 0:9b334a45a8ff | 12 | * |
| bogdanm | 0:9b334a45a8ff | 13 | * Redistribution and use in source and binary forms, with or without modification, |
| bogdanm | 0:9b334a45a8ff | 14 | * are permitted provided that the following conditions are met: |
| bogdanm | 0:9b334a45a8ff | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
| bogdanm | 0:9b334a45a8ff | 16 | * this list of conditions and the following disclaimer. |
| bogdanm | 0:9b334a45a8ff | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| bogdanm | 0:9b334a45a8ff | 18 | * this list of conditions and the following disclaimer in the documentation |
| bogdanm | 0:9b334a45a8ff | 19 | * and/or other materials provided with the distribution. |
| bogdanm | 0:9b334a45a8ff | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| bogdanm | 0:9b334a45a8ff | 21 | * may be used to endorse or promote products derived from this software |
| bogdanm | 0:9b334a45a8ff | 22 | * without specific prior written permission. |
| bogdanm | 0:9b334a45a8ff | 23 | * |
| bogdanm | 0:9b334a45a8ff | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| bogdanm | 0:9b334a45a8ff | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| bogdanm | 0:9b334a45a8ff | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| bogdanm | 0:9b334a45a8ff | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| bogdanm | 0:9b334a45a8ff | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| bogdanm | 0:9b334a45a8ff | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| bogdanm | 0:9b334a45a8ff | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| bogdanm | 0:9b334a45a8ff | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| bogdanm | 0:9b334a45a8ff | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| bogdanm | 0:9b334a45a8ff | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| bogdanm | 0:9b334a45a8ff | 34 | * |
| bogdanm | 0:9b334a45a8ff | 35 | ****************************************************************************** |
| bogdanm | 0:9b334a45a8ff | 36 | */ |
| bogdanm | 0:9b334a45a8ff | 37 | |
| bogdanm | 0:9b334a45a8ff | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| bogdanm | 0:9b334a45a8ff | 39 | #ifndef __STM32F1xx_HAL_CAN_EX_H |
| bogdanm | 0:9b334a45a8ff | 40 | #define __STM32F1xx_HAL_CAN_EX_H |
| bogdanm | 0:9b334a45a8ff | 41 | |
| bogdanm | 0:9b334a45a8ff | 42 | #ifdef __cplusplus |
| bogdanm | 0:9b334a45a8ff | 43 | extern "C" { |
| bogdanm | 0:9b334a45a8ff | 44 | #endif |
| bogdanm | 0:9b334a45a8ff | 45 | |
| bogdanm | 0:9b334a45a8ff | 46 | #if defined(STM32F103x6) || defined(STM32F103xB) || defined(STM32F103xE) || \ |
| bogdanm | 0:9b334a45a8ff | 47 | defined(STM32F103xG) || defined(STM32F105xC) || defined(STM32F107xC) |
| bogdanm | 0:9b334a45a8ff | 48 | |
| bogdanm | 0:9b334a45a8ff | 49 | /* Includes ------------------------------------------------------------------*/ |
| bogdanm | 0:9b334a45a8ff | 50 | #include "stm32f1xx_hal_def.h" |
| bogdanm | 0:9b334a45a8ff | 51 | |
| bogdanm | 0:9b334a45a8ff | 52 | /** @addtogroup STM32F1xx_HAL_Driver |
| bogdanm | 0:9b334a45a8ff | 53 | * @{ |
| bogdanm | 0:9b334a45a8ff | 54 | */ |
| bogdanm | 0:9b334a45a8ff | 55 | |
| bogdanm | 0:9b334a45a8ff | 56 | /** @defgroup CANEx CANEx |
| bogdanm | 0:9b334a45a8ff | 57 | * @{ |
| bogdanm | 0:9b334a45a8ff | 58 | */ |
| bogdanm | 0:9b334a45a8ff | 59 | |
| bogdanm | 0:9b334a45a8ff | 60 | /* Exported types ------------------------------------------------------------*/ |
| bogdanm | 0:9b334a45a8ff | 61 | |
| bogdanm | 0:9b334a45a8ff | 62 | /** |
| bogdanm | 0:9b334a45a8ff | 63 | * @brief CAN filter configuration structure definition |
| bogdanm | 0:9b334a45a8ff | 64 | */ |
| bogdanm | 0:9b334a45a8ff | 65 | /* CAN filter banks differences over STM32F1 devices: */ |
| bogdanm | 0:9b334a45a8ff | 66 | /* - STM32F1 Connectivity line: 28 filter banks shared between CAN1 and CAN2 */ |
| bogdanm | 0:9b334a45a8ff | 67 | /* - Other STM32F10x devices: 14 filter banks */ |
| bogdanm | 0:9b334a45a8ff | 68 | |
| bogdanm | 0:9b334a45a8ff | 69 | typedef struct |
| bogdanm | 0:9b334a45a8ff | 70 | { |
| bogdanm | 0:9b334a45a8ff | 71 | uint32_t FilterIdHigh; /*!< Specifies the filter identification number (MSBs for a 32-bit |
| bogdanm | 0:9b334a45a8ff | 72 | configuration, first one for a 16-bit configuration). |
| bogdanm | 0:9b334a45a8ff | 73 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
| bogdanm | 0:9b334a45a8ff | 74 | |
| bogdanm | 0:9b334a45a8ff | 75 | uint32_t FilterIdLow; /*!< Specifies the filter identification number (LSBs for a 32-bit |
| bogdanm | 0:9b334a45a8ff | 76 | configuration, second one for a 16-bit configuration). |
| bogdanm | 0:9b334a45a8ff | 77 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
| bogdanm | 0:9b334a45a8ff | 78 | |
| bogdanm | 0:9b334a45a8ff | 79 | uint32_t FilterMaskIdHigh; /*!< Specifies the filter mask number or identification number, |
| bogdanm | 0:9b334a45a8ff | 80 | according to the mode (MSBs for a 32-bit configuration, |
| bogdanm | 0:9b334a45a8ff | 81 | first one for a 16-bit configuration). |
| bogdanm | 0:9b334a45a8ff | 82 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
| bogdanm | 0:9b334a45a8ff | 83 | |
| bogdanm | 0:9b334a45a8ff | 84 | uint32_t FilterMaskIdLow; /*!< Specifies the filter mask number or identification number, |
| bogdanm | 0:9b334a45a8ff | 85 | according to the mode (LSBs for a 32-bit configuration, |
| bogdanm | 0:9b334a45a8ff | 86 | second one for a 16-bit configuration). |
| bogdanm | 0:9b334a45a8ff | 87 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
| bogdanm | 0:9b334a45a8ff | 88 | |
| bogdanm | 0:9b334a45a8ff | 89 | uint32_t FilterFIFOAssignment; /*!< Specifies the FIFO (0 or 1) which will be assigned to the filter. |
| bogdanm | 0:9b334a45a8ff | 90 | This parameter can be a value of @ref CAN_filter_FIFO */ |
| bogdanm | 0:9b334a45a8ff | 91 | #if defined(STM32F105xC) || defined(STM32F107xC) |
| bogdanm | 0:9b334a45a8ff | 92 | uint32_t FilterNumber; /*!< Specifies the filter which will be initialized. |
| bogdanm | 0:9b334a45a8ff | 93 | This parameter must be a number between Min_Data = 0 and Max_Data = 27. */ |
| bogdanm | 0:9b334a45a8ff | 94 | #else |
| bogdanm | 0:9b334a45a8ff | 95 | uint32_t FilterNumber; /*!< Specifies the filter which will be initialized. |
| bogdanm | 0:9b334a45a8ff | 96 | This parameter must be a number between Min_Data = 0 and Max_Data = 13. */ |
| bogdanm | 0:9b334a45a8ff | 97 | #endif /* STM32F105xC || STM32F107xC */ |
| bogdanm | 0:9b334a45a8ff | 98 | uint32_t FilterMode; /*!< Specifies the filter mode to be initialized. |
| bogdanm | 0:9b334a45a8ff | 99 | This parameter can be a value of @ref CAN_filter_mode */ |
| bogdanm | 0:9b334a45a8ff | 100 | |
| bogdanm | 0:9b334a45a8ff | 101 | uint32_t FilterScale; /*!< Specifies the filter scale. |
| bogdanm | 0:9b334a45a8ff | 102 | This parameter can be a value of @ref CAN_filter_scale */ |
| bogdanm | 0:9b334a45a8ff | 103 | |
| bogdanm | 0:9b334a45a8ff | 104 | uint32_t FilterActivation; /*!< Enable or disable the filter. |
| bogdanm | 0:9b334a45a8ff | 105 | This parameter can be set to ENABLE or DISABLE. */ |
| bogdanm | 0:9b334a45a8ff | 106 | |
| bogdanm | 0:9b334a45a8ff | 107 | uint32_t BankNumber; /*!< Select the start slave bank filter |
| bogdanm | 0:9b334a45a8ff | 108 | This parameter must be a number between Min_Data = 0 and Max_Data = 28. */ |
| bogdanm | 0:9b334a45a8ff | 109 | |
| bogdanm | 0:9b334a45a8ff | 110 | }CAN_FilterConfTypeDef; |
| bogdanm | 0:9b334a45a8ff | 111 | |
| bogdanm | 0:9b334a45a8ff | 112 | /* Exported constants --------------------------------------------------------*/ |
| bogdanm | 0:9b334a45a8ff | 113 | /* Exported macro ------------------------------------------------------------*/ |
| bogdanm | 0:9b334a45a8ff | 114 | /* Private macro -------------------------------------------------------------*/ |
| bogdanm | 0:9b334a45a8ff | 115 | |
| bogdanm | 0:9b334a45a8ff | 116 | /** @defgroup CANEx_Private_Macros CAN Extended Private Macros |
| bogdanm | 0:9b334a45a8ff | 117 | * @{ |
| bogdanm | 0:9b334a45a8ff | 118 | */ |
| bogdanm | 0:9b334a45a8ff | 119 | #if defined(STM32F105xC) || defined(STM32F107xC) |
| bogdanm | 0:9b334a45a8ff | 120 | #define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 27) |
| bogdanm | 0:9b334a45a8ff | 121 | #else |
| bogdanm | 0:9b334a45a8ff | 122 | #define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 13) |
| bogdanm | 0:9b334a45a8ff | 123 | #endif /* STM32F105xC || STM32F107xC */ |
| bogdanm | 0:9b334a45a8ff | 124 | |
| bogdanm | 0:9b334a45a8ff | 125 | /** |
| bogdanm | 0:9b334a45a8ff | 126 | * @} |
| bogdanm | 0:9b334a45a8ff | 127 | */ |
| bogdanm | 0:9b334a45a8ff | 128 | |
| bogdanm | 0:9b334a45a8ff | 129 | |
| bogdanm | 0:9b334a45a8ff | 130 | /** |
| bogdanm | 0:9b334a45a8ff | 131 | * @} |
| bogdanm | 0:9b334a45a8ff | 132 | */ |
| bogdanm | 0:9b334a45a8ff | 133 | |
| bogdanm | 0:9b334a45a8ff | 134 | /** |
| bogdanm | 0:9b334a45a8ff | 135 | * @} |
| bogdanm | 0:9b334a45a8ff | 136 | */ |
| bogdanm | 0:9b334a45a8ff | 137 | |
| bogdanm | 0:9b334a45a8ff | 138 | #endif /* STM32F103x6) || STM32F103xB || STM32F103xE || */ |
| bogdanm | 0:9b334a45a8ff | 139 | /* STM32F103xG) || STM32F105xC || STM32F107xC */ |
| bogdanm | 0:9b334a45a8ff | 140 | |
| bogdanm | 0:9b334a45a8ff | 141 | #ifdef __cplusplus |
| bogdanm | 0:9b334a45a8ff | 142 | } |
| bogdanm | 0:9b334a45a8ff | 143 | #endif |
| bogdanm | 0:9b334a45a8ff | 144 | |
| bogdanm | 0:9b334a45a8ff | 145 | #endif /* __STM32F1xx_HAL_CAN_EX_H */ |
| bogdanm | 0:9b334a45a8ff | 146 | |
| bogdanm | 0:9b334a45a8ff | 147 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |