Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /** |
2 | ****************************************************************************** |
||
3 | * @file stm32f1xx_hal_can_ex_legacy.h |
||
4 | * @author MCD Application Team |
||
5 | * @brief Header file of CAN HAL Extension module. |
||
6 | ****************************************************************************** |
||
7 | * @attention |
||
8 | * |
||
9 | * <h2><center>© Copyright (c) 2016 STMicroelectronics. |
||
10 | * All rights reserved.</center></h2> |
||
11 | * |
||
12 | * This software component is licensed by ST under BSD 3-Clause license, |
||
13 | * the "License"; You may not use this file except in compliance with the |
||
14 | * License. You may obtain a copy of the License at: |
||
15 | * opensource.org/licenses/BSD-3-Clause |
||
16 | * |
||
17 | ****************************************************************************** |
||
18 | */ |
||
19 | |||
20 | /* Define to prevent recursive inclusion -------------------------------------*/ |
||
21 | #ifndef __STM32F1xx_HAL_CAN_EX_LEGACY_H |
||
22 | #define __STM32F1xx_HAL_CAN_EX_LEGACY_H |
||
23 | |||
24 | #ifdef __cplusplus |
||
25 | extern "C" { |
||
26 | #endif |
||
27 | |||
28 | #if defined(STM32F103x6) || defined(STM32F103xB) || defined(STM32F103xE) || \ |
||
29 | defined(STM32F103xG) || defined(STM32F105xC) || defined(STM32F107xC) |
||
30 | |||
31 | /* Includes ------------------------------------------------------------------*/ |
||
32 | #include "stm32f1xx_hal_def.h" |
||
33 | |||
34 | /** @addtogroup STM32F1xx_HAL_Driver |
||
35 | * @{ |
||
36 | */ |
||
37 | |||
38 | /** @defgroup CANEx CANEx |
||
39 | * @{ |
||
40 | */ |
||
41 | |||
42 | /* Exported types ------------------------------------------------------------*/ |
||
43 | |||
44 | /** |
||
45 | * @brief CAN filter configuration structure definition |
||
46 | */ |
||
47 | /* CAN filter banks differences over STM32F1 devices: */ |
||
48 | /* - STM32F1 Connectivity line: 28 filter banks shared between CAN1 and CAN2 */ |
||
49 | /* - Other STM32F10x devices: 14 filter banks */ |
||
50 | |||
51 | typedef struct |
||
52 | { |
||
53 | uint32_t FilterIdHigh; /*!< Specifies the filter identification number (MSBs for a 32-bit |
||
54 | configuration, first one for a 16-bit configuration). |
||
55 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
||
56 | |||
57 | uint32_t FilterIdLow; /*!< Specifies the filter identification number (LSBs for a 32-bit |
||
58 | configuration, second one for a 16-bit configuration). |
||
59 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
||
60 | |||
61 | uint32_t FilterMaskIdHigh; /*!< Specifies the filter mask number or identification number, |
||
62 | according to the mode (MSBs for a 32-bit configuration, |
||
63 | first one for a 16-bit configuration). |
||
64 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
||
65 | |||
66 | uint32_t FilterMaskIdLow; /*!< Specifies the filter mask number or identification number, |
||
67 | according to the mode (LSBs for a 32-bit configuration, |
||
68 | second one for a 16-bit configuration). |
||
69 | This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */ |
||
70 | |||
71 | uint32_t FilterFIFOAssignment; /*!< Specifies the FIFO (0 or 1) which will be assigned to the filter. |
||
72 | This parameter can be a value of @ref CAN_filter_FIFO */ |
||
73 | #if defined(STM32F105xC) || defined(STM32F107xC) |
||
74 | uint32_t FilterNumber; /*!< Specifies the filter which will be initialized. |
||
75 | This parameter must be a number between Min_Data = 0 and Max_Data = 27. */ |
||
76 | #else |
||
77 | uint32_t FilterNumber; /*!< Specifies the filter which will be initialized. |
||
78 | This parameter must be a number between Min_Data = 0 and Max_Data = 13. */ |
||
79 | #endif /* STM32F105xC || STM32F107xC */ |
||
80 | uint32_t FilterMode; /*!< Specifies the filter mode to be initialized. |
||
81 | This parameter can be a value of @ref CAN_filter_mode */ |
||
82 | |||
83 | uint32_t FilterScale; /*!< Specifies the filter scale. |
||
84 | This parameter can be a value of @ref CAN_filter_scale */ |
||
85 | |||
86 | uint32_t FilterActivation; /*!< Enable or disable the filter. |
||
87 | This parameter can be set to ENABLE or DISABLE. */ |
||
88 | |||
89 | uint32_t BankNumber; /*!< Select the start slave bank filter |
||
90 | This parameter must be a number between Min_Data = 0 and Max_Data = 28. */ |
||
91 | |||
92 | }CAN_FilterConfTypeDef; |
||
93 | |||
94 | /* Exported constants --------------------------------------------------------*/ |
||
95 | /* Exported macro ------------------------------------------------------------*/ |
||
96 | /* Private macro -------------------------------------------------------------*/ |
||
97 | |||
98 | /** @defgroup CANEx_Private_Macros CAN Extended Private Macros |
||
99 | * @{ |
||
100 | */ |
||
101 | #if defined(STM32F105xC) || defined(STM32F107xC) |
||
102 | #define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 27U) |
||
103 | #else |
||
104 | #define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 13U) |
||
105 | #endif /* STM32F105xC || STM32F107xC */ |
||
106 | |||
107 | /** |
||
108 | * @} |
||
109 | */ |
||
110 | |||
111 | |||
112 | /** |
||
113 | * @} |
||
114 | */ |
||
115 | |||
116 | /** |
||
117 | * @} |
||
118 | */ |
||
119 | |||
120 | #endif /* STM32F103x6) || STM32F103xB || STM32F103xE || STM32F103xG) || STM32F105xC || STM32F107xC */ |
||
121 | |||
122 | #ifdef __cplusplus |
||
123 | } |
||
124 | #endif |
||
125 | |||
126 | #endif /* __STM32F1xx_HAL_CAN_EX_LEGACY_H */ |
||
127 | |||
128 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |