]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley/stm32f10x.h
commit 9f316c246baafa15c542a5aea81a94f26e3d6507
[freertos] / FreeRTOS / Demo / CORTEX_STM32F107_GCC_Rowley / stm32f10x.h
1 /**\r
2   ******************************************************************************\r
3   * @file stm32f10x.h\r
4   * @brief CMSIS Cortex-M3 Device Peripheral Access Layer Header File.\r
5   *        This file contains all the peripheral register's definitions, bits\r
6   *        definitions and memory mapping for STM32F10x High Density, Medium\r
7   *        Density and Low Density devices.\r
8   * @author STMicroelectronics - MCD Application Team\r
9   * @version V3.0.0\r
10   * @date 04/06/2009\r
11   ******************************************************************************\r
12   *\r
13   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS\r
14   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE\r
15   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY\r
16   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING\r
17   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE\r
18   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.\r
19   *\r
20   * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>\r
21   ******************************************************************************\r
22   */\r
23 \r
24 /** @addtogroup CMSIS\r
25   * @{\r
26   */\r
27 \r
28 /** @addtogroup stm32f10x\r
29   * @{\r
30   */\r
31 \r
32 #ifndef __STM32F10x_H\r
33 #define __STM32F10x_H\r
34 \r
35 /** @addtogroup Library_configuration_section\r
36   * @{\r
37   */\r
38 \r
39 /* Uncomment the line below according to the target STM32 device used in your\r
40    application\r
41   */\r
42 \r
43 #if !defined (STM32F10X_LD) && !defined (STM32F10X_MD) && !defined (STM32F10X_HD)\r
44   /* #define STM32F10X_LD */   /*!< STM32 Low density devices */\r
45   /* #define STM32F10X_MD */   /*!< STM32 Medium density devices */\r
46   #define STM32F10X_HD   /*!< STM32 High density devices */\r
47 #endif\r
48 /*  Tip: To avoid modifying this file each time you need to switch between these\r
49         devices, you can define the device in your toolchain compiler preprocessor.\r
50 \r
51  - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers\r
52    where the Flash memory density ranges between 16 and 32 Kbytes.\r
53  - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx microcontrollers\r
54    where the Flash memory density ranges between 64 and 128 Kbytes.\r
55  - High-density devices are STM32F101xx and STM32F103xx microcontrollers where\r
56    the Flash memory density ranges between 256 and 512 Kbytes.\r
57   */\r
58 \r
59 #if !defined  USE_STDPERIPH_DRIVER\r
60 /**\r
61  * @brief Comment the line below if you will not use the peripherals drivers.\r
62    In this case, these drivers will not be included and the application code will\r
63    be based on direct access to peripherals registers\r
64    */\r
65   /*#define USE_STDPERIPH_DRIVER*/\r
66 #endif\r
67 \r
68 /**\r
69  * @brief In the following line adjust the value of External High Speed oscillator (HSE)\r
70    used in your application\r
71    */\r
72 #define HSE_Value    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz*/\r
73 /**\r
74  * @brief In the following line adjust the External High Speed oscillator (HSE) Startup\r
75    Timeout value\r
76    */\r
77 #define HSEStartUp_TimeOut   ((uint16_t)0x0500) /*!< Time out for HSE start up */\r
78 \r
79 #define HSI_Value    ((uint32_t)8000000) /*!< Value of the Internal oscillator in Hz*/\r
80 \r
81 \r
82 /*!< [31:16] STM32F10x Standard Peripheral Library main version */\r
83 #define __STM32F10X_STDPERIPH_VERSION_MAIN   (0x03)\r
84 /*!< [15:8]  STM32F10x Standard Peripheral Library sub1 version */\r
85 #define __STM32F10X_STDPERIPH_VERSION_SUB1   (0x00)\r
86 /*!< [7:0]  STM32F10x Standard Peripheral Library sub2 version */\r
87 #define __STM32F10X_STDPERIPH_VERSION_SUB2   (0x00)\r
88 /*!< STM32F10x Standard Peripheral Library version number */\r
89 #define __STM32F10X_STDPERIPH_VERSION       ((__STM32F10X_STDPERIPH_VERSION_MAIN << 16)\\r
90                                              | (__STM32F10X_STDPERIPH_VERSION_SUB1 << 8)\\r
91                                              | __STM32F10X_STDPERIPH_VERSION_SUB2)\r
92 \r
93 /**\r
94   * @}\r
95   */\r
96 \r
97 /** @addtogroup Configuration_section_for_CMSIS\r
98   * @{\r
99   */\r
100 \r
101 /**\r
102  * @brief Configuration of the Cortex-M3 Processor and Core Peripherals\r
103  */\r
104 #define __MPU_PRESENT             0 /*!< STM32 does not provide a MPU present or not  */\r
105 #define __NVIC_PRIO_BITS          4 /*!< STM32 uses 4 Bits for the Priority Levels    */\r
106 #define __Vendor_SysTickConfig    0 /*!< Set to 1 if different SysTick Config is used */\r
107 \r
108 /*!< Interrupt Number Definition */\r
109 typedef enum IRQn\r
110 {\r
111 /******  Cortex-M3 Processor Exceptions Numbers ***************************************************/\r
112   NonMaskableInt_IRQn         = -14,    /*!< 2 Non Maskable Interrupt                             */\r
113   MemoryManagement_IRQn       = -12,    /*!< 4 Cortex-M3 Memory Management Interrupt              */\r
114   BusFault_IRQn               = -11,    /*!< 5 Cortex-M3 Bus Fault Interrupt                      */\r
115   UsageFault_IRQn             = -10,    /*!< 6 Cortex-M3 Usage Fault Interrupt                    */\r
116   SVCall_IRQn                 = -5,     /*!< 11 Cortex-M3 SV Call Interrupt                       */\r
117   DebugMonitor_IRQn           = -4,     /*!< 12 Cortex-M3 Debug Monitor Interrupt                 */\r
118   PendSV_IRQn                 = -2,     /*!< 14 Cortex-M3 Pend SV Interrupt                       */\r
119   SysTick_IRQn                = -1,     /*!< 15 Cortex-M3 System Tick Interrupt                   */\r
120 \r
121 /******  STM32 specific Interrupt Numbers *********************************************************/\r
122   WWDG_IRQn                   = 0,      /*!< Window WatchDog Interrupt                            */\r
123   PVD_IRQn                    = 1,      /*!< PVD through EXTI Line detection Interrupt            */\r
124   TAMPER_IRQn                 = 2,      /*!< Tamper Interrupt                                     */\r
125   RTC_IRQn                    = 3,      /*!< RTC global Interrupt                                 */\r
126   FLASH_IRQn                  = 4,      /*!< FLASH global Interrupt                               */\r
127   RCC_IRQn                    = 5,      /*!< RCC global Interrupt                                 */\r
128   EXTI0_IRQn                  = 6,      /*!< EXTI Line0 Interrupt                                 */\r
129   EXTI1_IRQn                  = 7,      /*!< EXTI Line1 Interrupt                                 */\r
130   EXTI2_IRQn                  = 8,      /*!< EXTI Line2 Interrupt                                 */\r
131   EXTI3_IRQn                  = 9,      /*!< EXTI Line3 Interrupt                                 */\r
132   EXTI4_IRQn                  = 10,     /*!< EXTI Line4 Interrupt                                 */\r
133   DMA1_Channel1_IRQn          = 11,     /*!< DMA1 Channel 1 global Interrupt                      */\r
134   DMA1_Channel2_IRQn          = 12,     /*!< DMA1 Channel 2 global Interrupt                      */\r
135   DMA1_Channel3_IRQn          = 13,     /*!< DMA1 Channel 3 global Interrupt                      */\r
136   DMA1_Channel4_IRQn          = 14,     /*!< DMA1 Channel 4 global Interrupt                      */\r
137   DMA1_Channel5_IRQn          = 15,     /*!< DMA1 Channel 5 global Interrupt                      */\r
138   DMA1_Channel6_IRQn          = 16,     /*!< DMA1 Channel 6 global Interrupt                      */\r
139   DMA1_Channel7_IRQn          = 17,     /*!< DMA1 Channel 7 global Interrupt                      */\r
140   ADC1_2_IRQn                 = 18,     /*!< ADC1 et ADC2 global Interrupt                        */\r
141   USB_HP_CAN1_TX_IRQn         = 19,     /*!< USB High Priority or CAN1 TX Interrupts              */\r
142   USB_LP_CAN1_RX0_IRQn        = 20,     /*!< USB Low Priority or CAN1 RX0 Interrupts              */\r
143   CAN1_RX1_IRQn               = 21,     /*!< CAN1 RX1 Interrupt                                   */\r
144   CAN1_SCE_IRQn               = 22,     /*!< CAN1 SCE Interrupt                                   */\r
145   EXTI9_5_IRQn                = 23,     /*!< External Line[9:5] Interrupts                        */\r
146   TIM1_BRK_IRQn               = 24,     /*!< TIM1 Break Interrupt                                 */\r
147   TIM1_UP_IRQn                = 25,     /*!< TIM1 Update Interrupt                                */\r
148   TIM1_TRG_COM_IRQn           = 26,     /*!< TIM1 Trigger and Commutation Interrupt               */\r
149   TIM1_CC_IRQn                = 27,     /*!< TIM1 Capture Compare Interrupt                       */\r
150   TIM2_IRQn                   = 28,     /*!< TIM2 global Interrupt                                */\r
151   TIM3_IRQn                   = 29,     /*!< TIM3 global Interrupt                                */\r
152 #ifndef STM32F10X_LD\r
153   TIM4_IRQn                   = 30,     /*!< TIM4 global Interrupt                                */\r
154 #endif\r
155   I2C1_EV_IRQn                = 31,     /*!< I2C1 Event Interrupt                                 */\r
156   I2C1_ER_IRQn                = 32,     /*!< I2C1 Error Interrupt                                 */\r
157 #ifndef STM32F10X_LD\r
158   I2C2_EV_IRQn                = 33,     /*!< I2C2 Event Interrupt                                 */\r
159   I2C2_ER_IRQn                = 34,     /*!< I2C2 Error Interrupt                                 */\r
160 #endif\r
161   SPI1_IRQn                   = 35,     /*!< SPI1 global Interrupt                                */\r
162   SPI2_IRQn                   = 36,     /*!< SPI2 global Interrupt                                */\r
163   USART1_IRQn                 = 37,     /*!< USART1 global Interrupt                              */\r
164   USART2_IRQn                 = 38,     /*!< USART2 global Interrupt                              */\r
165 #ifndef STM32F10X_LD\r
166   USART3_IRQn                 = 39,     /*!< USART3 global Interrupt                              */\r
167 #endif\r
168   EXTI15_10_IRQn              = 40,     /*!< External Line[15:10] Interrupts                      */\r
169   RTCAlarm_IRQn               = 41,     /*!< RTC Alarm through EXTI Line Interrupt                */\r
170   USBWakeUp_IRQn              = 42,     /*!< USB WakeUp from suspend through EXTI Line Interrupt  */\r
171 #ifdef STM32F10X_HD\r
172   TIM8_BRK_IRQn               = 43,     /*!< TIM8 Break Interrupt                                 */\r
173   TIM8_UP_IRQn                = 44,     /*!< TIM8 Update Interrupt                                */\r
174   TIM8_TRG_COM_IRQn           = 45,     /*!< TIM8 Trigger and Commutation Interrupt               */\r
175   TIM8_CC_IRQn                = 46,     /*!< TIM8 Capture Compare Interrupt                       */\r
176   ADC3_IRQn                   = 47,     /*!< ADC3 global Interrupt                                */\r
177   FSMC_IRQn                   = 48,     /*!< FSMC global Interrupt                                */\r
178   SDIO_IRQn                   = 49,     /*!< SDIO global Interrupt                                */\r
179   TIM5_IRQn                   = 50,     /*!< TIM5 global Interrupt                                */\r
180   SPI3_IRQn                   = 51,     /*!< SPI3 global Interrupt                                */\r
181   UART4_IRQn                  = 52,     /*!< UART4 global Interrupt                               */\r
182   UART5_IRQn                  = 53,     /*!< UART5 global Interrupt                               */\r
183   TIM6_IRQn                   = 54,     /*!< TIM6 global Interrupt                                */\r
184   TIM7_IRQn                   = 55,     /*!< TIM7 global Interrupt                                */\r
185   DMA2_Channel1_IRQn          = 56,     /*!< DMA2 Channel 1 global Interrupt                      */\r
186   DMA2_Channel2_IRQn          = 57,     /*!< DMA2 Channel 2 global Interrupt                      */\r
187   DMA2_Channel3_IRQn          = 58,     /*!< DMA2 Channel 3 global Interrupt                      */\r
188   DMA2_Channel4_5_IRQn        = 59      /*!< DMA2 Channel 4 and Channel 5 global Interrupt        */\r
189 #endif\r
190 } IRQn_Type;\r
191 \r
192 /**\r
193   * @}\r
194   */\r
195 \r
196 #include "core_cm3.h"\r
197 #include "system_stm32f10x.h"\r
198 //#include <stdint.h>\r
199 \r
200 /** @addtogroup Exported_types\r
201   * @{\r
202   */\r
203 \r
204 /*!< STM32F10x Standard Peripheral Library old types (maintained for legacy prupose) */\r
205 typedef int32_t  s32;\r
206 typedef int16_t s16;\r
207 typedef int8_t  s8;\r
208 \r
209 typedef const int32_t sc32;  /*!< Read Only */\r
210 typedef const int16_t sc16;  /*!< Read Only */\r
211 typedef const int8_t sc8;   /*!< Read Only */\r
212 \r
213 typedef __IO int32_t  vs32;\r
214 typedef __IO int16_t  vs16;\r
215 typedef __IO int8_t   vs8;\r
216 \r
217 typedef __I int32_t vsc32;  /*!< Read Only */\r
218 typedef __I int16_t vsc16;  /*!< Read Only */\r
219 typedef __I int8_t vsc8;   /*!< Read Only */\r
220 \r
221 typedef uint32_t  u32;\r
222 typedef uint16_t u16;\r
223 typedef uint8_t  u8;\r
224 \r
225 typedef const uint32_t uc32;  /*!< Read Only */\r
226 typedef const uint16_t uc16;  /*!< Read Only */\r
227 typedef const uint8_t uc8;   /*!< Read Only */\r
228 \r
229 typedef __IO uint32_t  vu32;\r
230 typedef __IO uint16_t vu16;\r
231 typedef __IO uint8_t  vu8;\r
232 \r
233 typedef __I uint32_t vuc32;  /*!< Read Only */\r
234 typedef __I uint16_t vuc16;  /*!< Read Only */\r
235 typedef __I uint8_t vuc8;   /*!< Read Only */\r
236 \r
237 typedef enum {FALSE = 0, TRUE = !FALSE} bool;\r
238 \r
239 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;\r
240 \r
241 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;\r
242 #define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))\r
243 \r
244 typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;\r
245 \r
246 /**\r
247   * @}\r
248   */\r
249 \r
250 /** @addtogroup Peripheral_registers_structures\r
251   * @{\r
252   */\r
253 \r
254 /**\r
255   * @brief Analog to Digital Converter\r
256   */\r
257 \r
258 typedef struct\r
259 {\r
260   __IO uint32_t SR;\r
261   __IO uint32_t CR1;\r
262   __IO uint32_t CR2;\r
263   __IO uint32_t SMPR1;\r
264   __IO uint32_t SMPR2;\r
265   __IO uint32_t JOFR1;\r
266   __IO uint32_t JOFR2;\r
267   __IO uint32_t JOFR3;\r
268   __IO uint32_t JOFR4;\r
269   __IO uint32_t HTR;\r
270   __IO uint32_t LTR;\r
271   __IO uint32_t SQR1;\r
272   __IO uint32_t SQR2;\r
273   __IO uint32_t SQR3;\r
274   __IO uint32_t JSQR;\r
275   __IO uint32_t JDR1;\r
276   __IO uint32_t JDR2;\r
277   __IO uint32_t JDR3;\r
278   __IO uint32_t JDR4;\r
279   __IO uint32_t DR;\r
280 } ADC_TypeDef;\r
281 \r
282 /**\r
283   * @brief Backup Registers\r
284   */\r
285 \r
286 typedef struct\r
287 {\r
288   uint32_t  RESERVED0;\r
289   __IO uint16_t DR1;\r
290   uint16_t  RESERVED1;\r
291   __IO uint16_t DR2;\r
292   uint16_t  RESERVED2;\r
293   __IO uint16_t DR3;\r
294   uint16_t  RESERVED3;\r
295   __IO uint16_t DR4;\r
296   uint16_t  RESERVED4;\r
297   __IO uint16_t DR5;\r
298   uint16_t  RESERVED5;\r
299   __IO uint16_t DR6;\r
300   uint16_t  RESERVED6;\r
301   __IO uint16_t DR7;\r
302   uint16_t  RESERVED7;\r
303   __IO uint16_t DR8;\r
304   uint16_t  RESERVED8;\r
305   __IO uint16_t DR9;\r
306   uint16_t  RESERVED9;\r
307   __IO uint16_t DR10;\r
308   uint16_t  RESERVED10;\r
309   __IO uint16_t RTCCR;\r
310   uint16_t  RESERVED11;\r
311   __IO uint16_t CR;\r
312   uint16_t  RESERVED12;\r
313   __IO uint16_t CSR;\r
314   uint16_t  RESERVED13[5];\r
315   __IO uint16_t DR11;\r
316   uint16_t  RESERVED14;\r
317   __IO uint16_t DR12;\r
318   uint16_t  RESERVED15;\r
319   __IO uint16_t DR13;\r
320   uint16_t  RESERVED16;\r
321   __IO uint16_t DR14;\r
322   uint16_t  RESERVED17;\r
323   __IO uint16_t DR15;\r
324   uint16_t  RESERVED18;\r
325   __IO uint16_t DR16;\r
326   uint16_t  RESERVED19;\r
327   __IO uint16_t DR17;\r
328   uint16_t  RESERVED20;\r
329   __IO uint16_t DR18;\r
330   uint16_t  RESERVED21;\r
331   __IO uint16_t DR19;\r
332   uint16_t  RESERVED22;\r
333   __IO uint16_t DR20;\r
334   uint16_t  RESERVED23;\r
335   __IO uint16_t DR21;\r
336   uint16_t  RESERVED24;\r
337   __IO uint16_t DR22;\r
338   uint16_t  RESERVED25;\r
339   __IO uint16_t DR23;\r
340   uint16_t  RESERVED26;\r
341   __IO uint16_t DR24;\r
342   uint16_t  RESERVED27;\r
343   __IO uint16_t DR25;\r
344   uint16_t  RESERVED28;\r
345   __IO uint16_t DR26;\r
346   uint16_t  RESERVED29;\r
347   __IO uint16_t DR27;\r
348   uint16_t  RESERVED30;\r
349   __IO uint16_t DR28;\r
350   uint16_t  RESERVED31;\r
351   __IO uint16_t DR29;\r
352   uint16_t  RESERVED32;\r
353   __IO uint16_t DR30;\r
354   uint16_t  RESERVED33;\r
355   __IO uint16_t DR31;\r
356   uint16_t  RESERVED34;\r
357   __IO uint16_t DR32;\r
358   uint16_t  RESERVED35;\r
359   __IO uint16_t DR33;\r
360   uint16_t  RESERVED36;\r
361   __IO uint16_t DR34;\r
362   uint16_t  RESERVED37;\r
363   __IO uint16_t DR35;\r
364   uint16_t  RESERVED38;\r
365   __IO uint16_t DR36;\r
366   uint16_t  RESERVED39;\r
367   __IO uint16_t DR37;\r
368   uint16_t  RESERVED40;\r
369   __IO uint16_t DR38;\r
370   uint16_t  RESERVED41;\r
371   __IO uint16_t DR39;\r
372   uint16_t  RESERVED42;\r
373   __IO uint16_t DR40;\r
374   uint16_t  RESERVED43;\r
375   __IO uint16_t DR41;\r
376   uint16_t  RESERVED44;\r
377   __IO uint16_t DR42;\r
378   uint16_t  RESERVED45;\r
379 } BKP_TypeDef;\r
380 \r
381 /**\r
382   * @brief Controller Area Network TxMailBox\r
383   */\r
384 \r
385 typedef struct\r
386 {\r
387   __IO uint32_t TIR;\r
388   __IO uint32_t TDTR;\r
389   __IO uint32_t TDLR;\r
390   __IO uint32_t TDHR;\r
391 } CAN_TxMailBox_TypeDef;\r
392 \r
393 /**\r
394   * @brief Controller Area Network FIFOMailBox\r
395   */\r
396 \r
397 typedef struct\r
398 {\r
399   __IO uint32_t RIR;\r
400   __IO uint32_t RDTR;\r
401   __IO uint32_t RDLR;\r
402   __IO uint32_t RDHR;\r
403 } CAN_FIFOMailBox_TypeDef;\r
404 \r
405 /**\r
406   * @brief Controller Area Network FilterRegister\r
407   */\r
408 \r
409 typedef struct\r
410 {\r
411   __IO uint32_t FR1;\r
412   __IO uint32_t FR2;\r
413 } CAN_FilterRegister_TypeDef;\r
414 \r
415 /**\r
416   * @brief Controller Area Network\r
417   */\r
418 \r
419 typedef struct\r
420 {\r
421   __IO uint32_t MCR;\r
422   __IO uint32_t MSR;\r
423   __IO uint32_t TSR;\r
424   __IO uint32_t RF0R;\r
425   __IO uint32_t RF1R;\r
426   __IO uint32_t IER;\r
427   __IO uint32_t ESR;\r
428   __IO uint32_t BTR;\r
429   uint32_t  RESERVED0[88];\r
430   CAN_TxMailBox_TypeDef sTxMailBox[3];\r
431   CAN_FIFOMailBox_TypeDef sFIFOMailBox[2];\r
432   uint32_t  RESERVED1[12];\r
433   __IO uint32_t FMR;\r
434   __IO uint32_t FM1R;\r
435   uint32_t  RESERVED2;\r
436   __IO uint32_t FS1R;\r
437   uint32_t  RESERVED3;\r
438   __IO uint32_t FFA1R;\r
439   uint32_t  RESERVED4;\r
440   __IO uint32_t FA1R;\r
441   uint32_t  RESERVED5[8];\r
442   CAN_FilterRegister_TypeDef sFilterRegister[14];\r
443 } CAN_TypeDef;\r
444 \r
445 /**\r
446   * @brief CRC calculation unit\r
447   */\r
448 \r
449 typedef struct\r
450 {\r
451   __IO uint32_t DR;\r
452   __IO uint8_t  IDR;\r
453   uint8_t   RESERVED0;\r
454   uint16_t  RESERVED1;\r
455   __IO uint32_t CR;\r
456 } CRC_TypeDef;\r
457 \r
458 /**\r
459   * @brief Digital to Analog Converter\r
460   */\r
461 \r
462 typedef struct\r
463 {\r
464   __IO uint32_t CR;\r
465   __IO uint32_t SWTRIGR;\r
466   __IO uint32_t DHR12R1;\r
467   __IO uint32_t DHR12L1;\r
468   __IO uint32_t DHR8R1;\r
469   __IO uint32_t DHR12R2;\r
470   __IO uint32_t DHR12L2;\r
471   __IO uint32_t DHR8R2;\r
472   __IO uint32_t DHR12RD;\r
473   __IO uint32_t DHR12LD;\r
474   __IO uint32_t DHR8RD;\r
475   __IO uint32_t DOR1;\r
476   __IO uint32_t DOR2;\r
477 } DAC_TypeDef;\r
478 \r
479 /**\r
480   * @brief Debug MCU\r
481   */\r
482 \r
483 typedef struct\r
484 {\r
485   __IO uint32_t IDCODE;\r
486   __IO uint32_t CR;\r
487 }DBGMCU_TypeDef;\r
488 \r
489 /**\r
490   * @brief DMA Controller\r
491   */\r
492 \r
493 typedef struct\r
494 {\r
495   __IO uint32_t CCR;\r
496   __IO uint32_t CNDTR;\r
497   __IO uint32_t CPAR;\r
498   __IO uint32_t CMAR;\r
499 } DMA_Channel_TypeDef;\r
500 \r
501 typedef struct\r
502 {\r
503   __IO uint32_t ISR;\r
504   __IO uint32_t IFCR;\r
505 } DMA_TypeDef;\r
506 \r
507 /**\r
508   * @brief External Interrupt/Event Controller\r
509   */\r
510 \r
511 typedef struct\r
512 {\r
513   __IO uint32_t IMR;\r
514   __IO uint32_t EMR;\r
515   __IO uint32_t RTSR;\r
516   __IO uint32_t FTSR;\r
517   __IO uint32_t SWIER;\r
518   __IO uint32_t PR;\r
519 } EXTI_TypeDef;\r
520 \r
521 /**\r
522   * @brief FLASH Registers\r
523   */\r
524 \r
525 typedef struct\r
526 {\r
527   __IO uint32_t ACR;\r
528   __IO uint32_t KEYR;\r
529   __IO uint32_t OPTKEYR;\r
530   __IO uint32_t SR;\r
531   __IO uint32_t CR;\r
532   __IO uint32_t AR;\r
533   __IO uint32_t RESERVED;\r
534   __IO uint32_t OBR;\r
535   __IO uint32_t WRPR;\r
536 } FLASH_TypeDef;\r
537 \r
538 /**\r
539   * @brief Option Bytes Registers\r
540   */\r
541 \r
542 typedef struct\r
543 {\r
544   __IO uint16_t RDP;\r
545   __IO uint16_t USER;\r
546   __IO uint16_t Data0;\r
547   __IO uint16_t Data1;\r
548   __IO uint16_t WRP0;\r
549   __IO uint16_t WRP1;\r
550   __IO uint16_t WRP2;\r
551   __IO uint16_t WRP3;\r
552 } OB_TypeDef;\r
553 \r
554 /**\r
555   * @brief Flexible Static Memory Controller\r
556   */\r
557 \r
558 typedef struct\r
559 {\r
560   __IO uint32_t BTCR[8];\r
561 } FSMC_Bank1_TypeDef;\r
562 \r
563 /**\r
564   * @brief Flexible Static Memory Controller Bank1E\r
565   */\r
566 \r
567 typedef struct\r
568 {\r
569   __IO uint32_t BWTR[7];\r
570 } FSMC_Bank1E_TypeDef;\r
571 \r
572 /**\r
573   * @brief Flexible Static Memory Controller Bank2\r
574   */\r
575 \r
576 typedef struct\r
577 {\r
578   __IO uint32_t PCR2;\r
579   __IO uint32_t SR2;\r
580   __IO uint32_t PMEM2;\r
581   __IO uint32_t PATT2;\r
582   uint32_t  RESERVED0;\r
583   __IO uint32_t ECCR2;\r
584 } FSMC_Bank2_TypeDef;\r
585 \r
586 /**\r
587   * @brief Flexible Static Memory Controller Bank3\r
588   */\r
589 \r
590 typedef struct\r
591 {\r
592   __IO uint32_t PCR3;\r
593   __IO uint32_t SR3;\r
594   __IO uint32_t PMEM3;\r
595   __IO uint32_t PATT3;\r
596   uint32_t  RESERVED0;\r
597   __IO uint32_t ECCR3;\r
598 } FSMC_Bank3_TypeDef;\r
599 \r
600 /**\r
601   * @brief Flexible Static Memory Controller Bank4\r
602   */\r
603 \r
604 typedef struct\r
605 {\r
606   __IO uint32_t PCR4;\r
607   __IO uint32_t SR4;\r
608   __IO uint32_t PMEM4;\r
609   __IO uint32_t PATT4;\r
610   __IO uint32_t PIO4;\r
611 } FSMC_Bank4_TypeDef;\r
612 \r
613 /**\r
614   * @brief General Purpose IO\r
615   */\r
616 \r
617 typedef struct\r
618 {\r
619   __IO uint32_t CRL;\r
620   __IO uint32_t CRH;\r
621   __IO uint32_t IDR;\r
622   __IO uint32_t ODR;\r
623   __IO uint32_t BSRR;\r
624   __IO uint32_t BRR;\r
625   __IO uint32_t LCKR;\r
626 } GPIO_TypeDef;\r
627 \r
628 /**\r
629   * @brief Alternate Function IO\r
630   */\r
631 \r
632 typedef struct\r
633 {\r
634   __IO uint32_t EVCR;\r
635   __IO uint32_t MAPR;\r
636   __IO uint32_t EXTICR[4];\r
637 } AFIO_TypeDef;\r
638 /**\r
639   * @brief Inter-integrated Circuit Interface\r
640   */\r
641 \r
642 typedef struct\r
643 {\r
644   __IO uint16_t CR1;\r
645   uint16_t  RESERVED0;\r
646   __IO uint16_t CR2;\r
647   uint16_t  RESERVED1;\r
648   __IO uint16_t OAR1;\r
649   uint16_t  RESERVED2;\r
650   __IO uint16_t OAR2;\r
651   uint16_t  RESERVED3;\r
652   __IO uint16_t DR;\r
653   uint16_t  RESERVED4;\r
654   __IO uint16_t SR1;\r
655   uint16_t  RESERVED5;\r
656   __IO uint16_t SR2;\r
657   uint16_t  RESERVED6;\r
658   __IO uint16_t CCR;\r
659   uint16_t  RESERVED7;\r
660   __IO uint16_t TRISE;\r
661   uint16_t  RESERVED8;\r
662 } I2C_TypeDef;\r
663 \r
664 /**\r
665   * @brief Independent WATCHDOG\r
666   */\r
667 \r
668 typedef struct\r
669 {\r
670   __IO uint32_t KR;\r
671   __IO uint32_t PR;\r
672   __IO uint32_t RLR;\r
673   __IO uint32_t SR;\r
674 } IWDG_TypeDef;\r
675 \r
676 /**\r
677   * @brief Power Control\r
678   */\r
679 \r
680 typedef struct\r
681 {\r
682   __IO uint32_t CR;\r
683   __IO uint32_t CSR;\r
684 } PWR_TypeDef;\r
685 \r
686 /**\r
687   * @brief Reset and Clock Control\r
688   */\r
689 \r
690 typedef struct\r
691 {\r
692   __IO uint32_t CR;\r
693   __IO uint32_t CFGR;\r
694   __IO uint32_t CIR;\r
695   __IO uint32_t APB2RSTR;\r
696   __IO uint32_t APB1RSTR;\r
697   __IO uint32_t AHBENR;\r
698   __IO uint32_t APB2ENR;\r
699   __IO uint32_t APB1ENR;\r
700   __IO uint32_t BDCR;\r
701   __IO uint32_t CSR;\r
702 } RCC_TypeDef;\r
703 \r
704 /**\r
705   * @brief Real-Time Clock\r
706   */\r
707 \r
708 typedef struct\r
709 {\r
710   __IO uint16_t CRH;\r
711   uint16_t  RESERVED0;\r
712   __IO uint16_t CRL;\r
713   uint16_t  RESERVED1;\r
714   __IO uint16_t PRLH;\r
715   uint16_t  RESERVED2;\r
716   __IO uint16_t PRLL;\r
717   uint16_t  RESERVED3;\r
718   __IO uint16_t DIVH;\r
719   uint16_t  RESERVED4;\r
720   __IO uint16_t DIVL;\r
721   uint16_t  RESERVED5;\r
722   __IO uint16_t CNTH;\r
723   uint16_t  RESERVED6;\r
724   __IO uint16_t CNTL;\r
725   uint16_t  RESERVED7;\r
726   __IO uint16_t ALRH;\r
727   uint16_t  RESERVED8;\r
728   __IO uint16_t ALRL;\r
729   uint16_t  RESERVED9;\r
730 } RTC_TypeDef;\r
731 \r
732 /**\r
733   * @brief SD host Interface\r
734   */\r
735 \r
736 typedef struct\r
737 {\r
738   __IO uint32_t POWER;\r
739   __IO uint32_t CLKCR;\r
740   __IO uint32_t ARG;\r
741   __IO uint32_t CMD;\r
742   __I uint32_t RESPCMD;\r
743   __I uint32_t RESP1;\r
744   __I uint32_t RESP2;\r
745   __I uint32_t RESP3;\r
746   __I uint32_t RESP4;\r
747   __IO uint32_t DTIMER;\r
748   __IO uint32_t DLEN;\r
749   __IO uint32_t DCTRL;\r
750   __I uint32_t DCOUNT;\r
751   __I uint32_t STA;\r
752   __IO uint32_t ICR;\r
753   __IO uint32_t MASK;\r
754   uint32_t  RESERVED0[2];\r
755   __I uint32_t FIFOCNT;\r
756   uint32_t  RESERVED1[13];\r
757   __IO uint32_t FIFO;\r
758 } SDIO_TypeDef;\r
759 \r
760 /**\r
761   * @brief Serial Peripheral Interface\r
762   */\r
763 \r
764 typedef struct\r
765 {\r
766   __IO uint16_t CR1;\r
767   uint16_t  RESERVED0;\r
768   __IO uint16_t CR2;\r
769   uint16_t  RESERVED1;\r
770   __IO uint16_t SR;\r
771   uint16_t  RESERVED2;\r
772   __IO uint16_t DR;\r
773   uint16_t  RESERVED3;\r
774   __IO uint16_t CRCPR;\r
775   uint16_t  RESERVED4;\r
776   __IO uint16_t RXCRCR;\r
777   uint16_t  RESERVED5;\r
778   __IO uint16_t TXCRCR;\r
779   uint16_t  RESERVED6;\r
780   __IO uint16_t I2SCFGR;\r
781   uint16_t  RESERVED7;\r
782   __IO uint16_t I2SPR;\r
783   uint16_t  RESERVED8;\r
784 } SPI_TypeDef;\r
785 \r
786 /**\r
787   * @brief TIM\r
788   */\r
789 \r
790 typedef struct\r
791 {\r
792   __IO uint16_t CR1;\r
793   uint16_t  RESERVED0;\r
794   __IO uint16_t CR2;\r
795   uint16_t  RESERVED1;\r
796   __IO uint16_t SMCR;\r
797   uint16_t  RESERVED2;\r
798   __IO uint16_t DIER;\r
799   uint16_t  RESERVED3;\r
800   __IO uint16_t SR;\r
801   uint16_t  RESERVED4;\r
802   __IO uint16_t EGR;\r
803   uint16_t  RESERVED5;\r
804   __IO uint16_t CCMR1;\r
805   uint16_t  RESERVED6;\r
806   __IO uint16_t CCMR2;\r
807   uint16_t  RESERVED7;\r
808   __IO uint16_t CCER;\r
809   uint16_t  RESERVED8;\r
810   __IO uint16_t CNT;\r
811   uint16_t  RESERVED9;\r
812   __IO uint16_t PSC;\r
813   uint16_t  RESERVED10;\r
814   __IO uint16_t ARR;\r
815   uint16_t  RESERVED11;\r
816   __IO uint16_t RCR;\r
817   uint16_t  RESERVED12;\r
818   __IO uint16_t CCR1;\r
819   uint16_t  RESERVED13;\r
820   __IO uint16_t CCR2;\r
821   uint16_t  RESERVED14;\r
822   __IO uint16_t CCR3;\r
823   uint16_t  RESERVED15;\r
824   __IO uint16_t CCR4;\r
825   uint16_t  RESERVED16;\r
826   __IO uint16_t BDTR;\r
827   uint16_t  RESERVED17;\r
828   __IO uint16_t DCR;\r
829   uint16_t  RESERVED18;\r
830   __IO uint16_t DMAR;\r
831   uint16_t  RESERVED19;\r
832 } TIM_TypeDef;\r
833 \r
834 /**\r
835   * @brief Universal Synchronous Asynchronous Receiver Transmitter\r
836   */\r
837 \r
838 typedef struct\r
839 {\r
840   __IO uint16_t SR;\r
841   uint16_t  RESERVED0;\r
842   __IO uint16_t DR;\r
843   uint16_t  RESERVED1;\r
844   __IO uint16_t BRR;\r
845   uint16_t  RESERVED2;\r
846   __IO uint16_t CR1;\r
847   uint16_t  RESERVED3;\r
848   __IO uint16_t CR2;\r
849   uint16_t  RESERVED4;\r
850   __IO uint16_t CR3;\r
851   uint16_t  RESERVED5;\r
852   __IO uint16_t GTPR;\r
853   uint16_t  RESERVED6;\r
854 } USART_TypeDef;\r
855 \r
856 /**\r
857   * @brief Window WATCHDOG\r
858   */\r
859 \r
860 typedef struct\r
861 {\r
862   __IO uint32_t CR;\r
863   __IO uint32_t CFR;\r
864   __IO uint32_t SR;\r
865 } WWDG_TypeDef;\r
866 \r
867 /**\r
868   * @}\r
869   */\r
870 \r
871 /** @addtogroup Peripheral_memory_map\r
872   * @{\r
873   */\r
874 \r
875 #define PERIPH_BB_BASE        ((uint32_t)0x42000000) /*!< Peripheral base address in the alias region */\r
876 #define SRAM_BB_BASE          ((uint32_t)0x22000000) /*!< SRAM base address in the alias region */\r
877 \r
878 #define SRAM_BASE             ((uint32_t)0x20000000) /*!< Peripheral base address in the bit-band region */\r
879 #define PERIPH_BASE           ((uint32_t)0x40000000) /*!< SRAM base address in the bit-band region */\r
880 \r
881 #define FSMC_R_BASE           ((uint32_t)0xA0000000) /*!< FSMC registers base address */\r
882 \r
883 /*!< Peripheral memory map */\r
884 #define APB1PERIPH_BASE       PERIPH_BASE\r
885 #define APB2PERIPH_BASE       (PERIPH_BASE + 0x10000)\r
886 #define AHBPERIPH_BASE        (PERIPH_BASE + 0x20000)\r
887 \r
888 #define TIM2_BASE             (APB1PERIPH_BASE + 0x0000)\r
889 #define TIM3_BASE             (APB1PERIPH_BASE + 0x0400)\r
890 #define TIM4_BASE             (APB1PERIPH_BASE + 0x0800)\r
891 #define TIM5_BASE             (APB1PERIPH_BASE + 0x0C00)\r
892 #define TIM6_BASE             (APB1PERIPH_BASE + 0x1000)\r
893 #define TIM7_BASE             (APB1PERIPH_BASE + 0x1400)\r
894 #define RTC_BASE              (APB1PERIPH_BASE + 0x2800)\r
895 #define WWDG_BASE             (APB1PERIPH_BASE + 0x2C00)\r
896 #define IWDG_BASE             (APB1PERIPH_BASE + 0x3000)\r
897 #define SPI2_BASE             (APB1PERIPH_BASE + 0x3800)\r
898 #define SPI3_BASE             (APB1PERIPH_BASE + 0x3C00)\r
899 #define USART2_BASE           (APB1PERIPH_BASE + 0x4400)\r
900 #define USART3_BASE           (APB1PERIPH_BASE + 0x4800)\r
901 #define UART4_BASE            (APB1PERIPH_BASE + 0x4C00)\r
902 #define UART5_BASE            (APB1PERIPH_BASE + 0x5000)\r
903 #define I2C1_BASE             (APB1PERIPH_BASE + 0x5400)\r
904 #define I2C2_BASE             (APB1PERIPH_BASE + 0x5800)\r
905 #define CAN1_BASE             (APB1PERIPH_BASE + 0x6400)\r
906 #define BKP_BASE              (APB1PERIPH_BASE + 0x6C00)\r
907 #define PWR_BASE              (APB1PERIPH_BASE + 0x7000)\r
908 #define DAC_BASE              (APB1PERIPH_BASE + 0x7400)\r
909 \r
910 #define AFIO_BASE             (APB2PERIPH_BASE + 0x0000)\r
911 #define EXTI_BASE             (APB2PERIPH_BASE + 0x0400)\r
912 #define GPIOA_BASE            (APB2PERIPH_BASE + 0x0800)\r
913 #define GPIOB_BASE            (APB2PERIPH_BASE + 0x0C00)\r
914 #define GPIOC_BASE            (APB2PERIPH_BASE + 0x1000)\r
915 #define GPIOD_BASE            (APB2PERIPH_BASE + 0x1400)\r
916 #define GPIOE_BASE            (APB2PERIPH_BASE + 0x1800)\r
917 #define GPIOF_BASE            (APB2PERIPH_BASE + 0x1C00)\r
918 #define GPIOG_BASE            (APB2PERIPH_BASE + 0x2000)\r
919 #define ADC1_BASE             (APB2PERIPH_BASE + 0x2400)\r
920 #define ADC2_BASE             (APB2PERIPH_BASE + 0x2800)\r
921 #define TIM1_BASE             (APB2PERIPH_BASE + 0x2C00)\r
922 #define SPI1_BASE             (APB2PERIPH_BASE + 0x3000)\r
923 #define TIM8_BASE             (APB2PERIPH_BASE + 0x3400)\r
924 #define USART1_BASE           (APB2PERIPH_BASE + 0x3800)\r
925 #define ADC3_BASE             (APB2PERIPH_BASE + 0x3C00)\r
926 \r
927 #define SDIO_BASE             (PERIPH_BASE + 0x18000)\r
928 \r
929 #define DMA1_BASE             (AHBPERIPH_BASE + 0x0000)\r
930 #define DMA1_Channel1_BASE    (AHBPERIPH_BASE + 0x0008)\r
931 #define DMA1_Channel2_BASE    (AHBPERIPH_BASE + 0x001C)\r
932 #define DMA1_Channel3_BASE    (AHBPERIPH_BASE + 0x0030)\r
933 #define DMA1_Channel4_BASE    (AHBPERIPH_BASE + 0x0044)\r
934 #define DMA1_Channel5_BASE    (AHBPERIPH_BASE + 0x0058)\r
935 #define DMA1_Channel6_BASE    (AHBPERIPH_BASE + 0x006C)\r
936 #define DMA1_Channel7_BASE    (AHBPERIPH_BASE + 0x0080)\r
937 #define DMA2_BASE             (AHBPERIPH_BASE + 0x0400)\r
938 #define DMA2_Channel1_BASE    (AHBPERIPH_BASE + 0x0408)\r
939 #define DMA2_Channel2_BASE    (AHBPERIPH_BASE + 0x041C)\r
940 #define DMA2_Channel3_BASE    (AHBPERIPH_BASE + 0x0430)\r
941 #define DMA2_Channel4_BASE    (AHBPERIPH_BASE + 0x0444)\r
942 #define DMA2_Channel5_BASE    (AHBPERIPH_BASE + 0x0458)\r
943 #define RCC_BASE              (AHBPERIPH_BASE + 0x1000)\r
944 #define CRC_BASE              (AHBPERIPH_BASE + 0x3000)\r
945 \r
946 #define FLASH_R_BASE          (AHBPERIPH_BASE + 0x2000) /*!< Flash registers base address */\r
947 #define OB_BASE               ((uint32_t)0x1FFFF800)    /*!< Flash Option Bytes base address */\r
948 \r
949 #define FSMC_Bank1_R_BASE     (FSMC_R_BASE + 0x0000) /*!< FSMC Bank1 registers base address */\r
950 #define FSMC_Bank1E_R_BASE    (FSMC_R_BASE + 0x0104) /*!< FSMC Bank1E registers base address */\r
951 #define FSMC_Bank2_R_BASE     (FSMC_R_BASE + 0x0060) /*!< FSMC Bank2 registers base address */\r
952 #define FSMC_Bank3_R_BASE     (FSMC_R_BASE + 0x0080) /*!< FSMC Bank3 registers base address */\r
953 #define FSMC_Bank4_R_BASE     (FSMC_R_BASE + 0x00A0) /*!< FSMC Bank4 registers base address */\r
954 \r
955 #define DBGMCU_BASE          ((uint32_t)0xE0042000) /*!< Debug MCU registers base address */\r
956 \r
957 /**\r
958   * @}\r
959   */\r
960 \r
961 /** @addtogroup Peripheral_declaration\r
962   * @{\r
963   */\r
964 \r
965 #define TIM2                ((TIM_TypeDef *) TIM2_BASE)\r
966 #define TIM3                ((TIM_TypeDef *) TIM3_BASE)\r
967 #define TIM4                ((TIM_TypeDef *) TIM4_BASE)\r
968 #define TIM5                ((TIM_TypeDef *) TIM5_BASE)\r
969 #define TIM6                ((TIM_TypeDef *) TIM6_BASE)\r
970 #define TIM7                ((TIM_TypeDef *) TIM7_BASE)\r
971 #define RTC                 ((RTC_TypeDef *) RTC_BASE)\r
972 #define WWDG                ((WWDG_TypeDef *) WWDG_BASE)\r
973 #define IWDG                ((IWDG_TypeDef *) IWDG_BASE)\r
974 #define SPI2                ((SPI_TypeDef *) SPI2_BASE)\r
975 #define SPI3                ((SPI_TypeDef *) SPI3_BASE)\r
976 #define USART2              ((USART_TypeDef *) USART2_BASE)\r
977 #define USART3              ((USART_TypeDef *) USART3_BASE)\r
978 #define UART4               ((USART_TypeDef *) UART4_BASE)\r
979 #define UART5               ((USART_TypeDef *) UART5_BASE)\r
980 #define I2C1                ((I2C_TypeDef *) I2C1_BASE)\r
981 #define I2C2                ((I2C_TypeDef *) I2C2_BASE)\r
982 #define CAN1                ((CAN_TypeDef *) CAN1_BASE)\r
983 #define BKP                 ((BKP_TypeDef *) BKP_BASE)\r
984 #define PWR                 ((PWR_TypeDef *) PWR_BASE)\r
985 #define DAC                 ((DAC_TypeDef *) DAC_BASE)\r
986 #define AFIO                ((AFIO_TypeDef *) AFIO_BASE)\r
987 #define EXTI                ((EXTI_TypeDef *) EXTI_BASE)\r
988 #define GPIOA               ((GPIO_TypeDef *) GPIOA_BASE)\r
989 #define GPIOB               ((GPIO_TypeDef *) GPIOB_BASE)\r
990 #define GPIOC               ((GPIO_TypeDef *) GPIOC_BASE)\r
991 #define GPIOD               ((GPIO_TypeDef *) GPIOD_BASE)\r
992 #define GPIOE               ((GPIO_TypeDef *) GPIOE_BASE)\r
993 #define GPIOF               ((GPIO_TypeDef *) GPIOF_BASE)\r
994 #define GPIOG               ((GPIO_TypeDef *) GPIOG_BASE)\r
995 #define ADC1                ((ADC_TypeDef *) ADC1_BASE)\r
996 #define ADC2                ((ADC_TypeDef *) ADC2_BASE)\r
997 #define TIM1                ((TIM_TypeDef *) TIM1_BASE)\r
998 #define SPI1                ((SPI_TypeDef *) SPI1_BASE)\r
999 #define TIM8                ((TIM_TypeDef *) TIM8_BASE)\r
1000 #define USART1              ((USART_TypeDef *) USART1_BASE)\r
1001 #define ADC3                ((ADC_TypeDef *) ADC3_BASE)\r
1002 #define SDIO                ((SDIO_TypeDef *) SDIO_BASE)\r
1003 #define DMA1                ((DMA_TypeDef *) DMA1_BASE)\r
1004 #define DMA2                ((DMA_TypeDef *) DMA2_BASE)\r
1005 #define DMA1_Channel1       ((DMA_Channel_TypeDef *) DMA1_Channel1_BASE)\r
1006 #define DMA1_Channel2       ((DMA_Channel_TypeDef *) DMA1_Channel2_BASE)\r
1007 #define DMA1_Channel3       ((DMA_Channel_TypeDef *) DMA1_Channel3_BASE)\r
1008 #define DMA1_Channel4       ((DMA_Channel_TypeDef *) DMA1_Channel4_BASE)\r
1009 #define DMA1_Channel5       ((DMA_Channel_TypeDef *) DMA1_Channel5_BASE)\r
1010 #define DMA1_Channel6       ((DMA_Channel_TypeDef *) DMA1_Channel6_BASE)\r
1011 #define DMA1_Channel7       ((DMA_Channel_TypeDef *) DMA1_Channel7_BASE)\r
1012 #define DMA2_Channel1       ((DMA_Channel_TypeDef *) DMA2_Channel1_BASE)\r
1013 #define DMA2_Channel2       ((DMA_Channel_TypeDef *) DMA2_Channel2_BASE)\r
1014 #define DMA2_Channel3       ((DMA_Channel_TypeDef *) DMA2_Channel3_BASE)\r
1015 #define DMA2_Channel4       ((DMA_Channel_TypeDef *) DMA2_Channel4_BASE)\r
1016 #define DMA2_Channel5       ((DMA_Channel_TypeDef *) DMA2_Channel5_BASE)\r
1017 #define RCC                 ((RCC_TypeDef *) RCC_BASE)\r
1018 #define CRC                 ((CRC_TypeDef *) CRC_BASE)\r
1019 #define FLASH               ((FLASH_TypeDef *) FLASH_R_BASE)\r
1020 #define OB                  ((OB_TypeDef *) OB_BASE)\r
1021 #define FSMC_Bank1          ((FSMC_Bank1_TypeDef *) FSMC_Bank1_R_BASE)\r
1022 #define FSMC_Bank1E         ((FSMC_Bank1E_TypeDef *) FSMC_Bank1E_R_BASE)\r
1023 #define FSMC_Bank2          ((FSMC_Bank2_TypeDef *) FSMC_Bank2_R_BASE)\r
1024 #define FSMC_Bank3          ((FSMC_Bank3_TypeDef *) FSMC_Bank3_R_BASE)\r
1025 #define FSMC_Bank4          ((FSMC_Bank4_TypeDef *) FSMC_Bank4_R_BASE)\r
1026 #define DBGMCU              ((DBGMCU_TypeDef *) DBGMCU_BASE)\r
1027 \r
1028 /**\r
1029   * @}\r
1030   */\r
1031 \r
1032 /** @addtogroup Exported_constants\r
1033   * @{\r
1034   */\r
1035 \r
1036   /** @addtogroup Peripheral_Registers_Bits_Definition\r
1037   * @{\r
1038   */\r
1039 \r
1040 /******************************************************************************/\r
1041 /*                         Peripheral Registers_Bits_Definition               */\r
1042 /******************************************************************************/\r
1043 \r
1044 /******************************************************************************/\r
1045 /*                                                                            */\r
1046 /*                          CRC calculation unit                              */\r
1047 /*                                                                            */\r
1048 /******************************************************************************/\r
1049 \r
1050 /*******************  Bit definition for CRC_DR register  *********************/\r
1051 #define  CRC_DR_DR                           ((uint32_t)0xFFFFFFFF) /*!< Data register bits */\r
1052 \r
1053 \r
1054 /*******************  Bit definition for CRC_IDR register  ********************/\r
1055 #define  CRC_IDR_IDR                         ((uint8_t)0xFF)        /*!< General-purpose 8-bit data register bits */\r
1056 \r
1057 \r
1058 /********************  Bit definition for CRC_CR register  ********************/\r
1059 #define  CRC_CR_RESET                        ((uint8_t)0x01)        /*!< RESET bit */\r
1060 \r
1061 /******************************************************************************/\r
1062 /*                                                                            */\r
1063 /*                             Power Control                                  */\r
1064 /*                                                                            */\r
1065 /******************************************************************************/\r
1066 \r
1067 /********************  Bit definition for PWR_CR register  ********************/\r
1068 #define  PWR_CR_LPDS                         ((uint16_t)0x0001)     /*!< Low-Power Deepsleep */\r
1069 #define  PWR_CR_PDDS                         ((uint16_t)0x0002)     /*!< Power Down Deepsleep */\r
1070 #define  PWR_CR_CWUF                         ((uint16_t)0x0004)     /*!< Clear Wakeup Flag */\r
1071 #define  PWR_CR_CSBF                         ((uint16_t)0x0008)     /*!< Clear Standby Flag */\r
1072 #define  PWR_CR_PVDE                         ((uint16_t)0x0010)     /*!< Power Voltage Detector Enable */\r
1073 \r
1074 #define  PWR_CR_PLS                          ((uint16_t)0x00E0)     /*!< PLS[2:0] bits (PVD Level Selection) */\r
1075 #define  PWR_CR_PLS_0                        ((uint16_t)0x0020)     /*!< Bit 0 */\r
1076 #define  PWR_CR_PLS_1                        ((uint16_t)0x0040)     /*!< Bit 1 */\r
1077 #define  PWR_CR_PLS_2                        ((uint16_t)0x0080)     /*!< Bit 2 */\r
1078 \r
1079 /*!< PVD level configuration */\r
1080 #define  PWR_CR_PLS_2V2                      ((uint16_t)0x0000)     /*!< PVD level 2.2V */\r
1081 #define  PWR_CR_PLS_2V3                      ((uint16_t)0x0020)     /*!< PVD level 2.3V */\r
1082 #define  PWR_CR_PLS_2V4                      ((uint16_t)0x0040)     /*!< PVD level 2.4V */\r
1083 #define  PWR_CR_PLS_2V5                      ((uint16_t)0x0060)     /*!< PVD level 2.5V */\r
1084 #define  PWR_CR_PLS_2V6                      ((uint16_t)0x0080)     /*!< PVD level 2.6V */\r
1085 #define  PWR_CR_PLS_2V7                      ((uint16_t)0x00A0)     /*!< PVD level 2.7V */\r
1086 #define  PWR_CR_PLS_2V8                      ((uint16_t)0x00C0)     /*!< PVD level 2.8V */\r
1087 #define  PWR_CR_PLS_2V9                      ((uint16_t)0x00E0)     /*!< PVD level 2.9V */\r
1088 \r
1089 #define  PWR_CR_DBP                          ((uint16_t)0x0100)     /*!< Disable Backup Domain write protection */\r
1090 \r
1091 \r
1092 /*******************  Bit definition for PWR_CSR register  ********************/\r
1093 #define  PWR_CSR_WUF                         ((uint16_t)0x0001)     /*!< Wakeup Flag */\r
1094 #define  PWR_CSR_SBF                         ((uint16_t)0x0002)     /*!< Standby Flag */\r
1095 #define  PWR_CSR_PVDO                        ((uint16_t)0x0004)     /*!< PVD Output */\r
1096 #define  PWR_CSR_EWUP                        ((uint16_t)0x0100)     /*!< Enable WKUP pin */\r
1097 \r
1098 /******************************************************************************/\r
1099 /*                                                                            */\r
1100 /*                            Backup registers                                */\r
1101 /*                                                                            */\r
1102 /******************************************************************************/\r
1103 \r
1104 /*******************  Bit definition for BKP_DR1 register  ********************/\r
1105 #define  BKP_DR1_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1106 \r
1107 /*******************  Bit definition for BKP_DR2 register  ********************/\r
1108 #define  BKP_DR2_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1109 \r
1110 /*******************  Bit definition for BKP_DR3 register  ********************/\r
1111 #define  BKP_DR3_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1112 \r
1113 /*******************  Bit definition for BKP_DR4 register  ********************/\r
1114 #define  BKP_DR4_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1115 \r
1116 /*******************  Bit definition for BKP_DR5 register  ********************/\r
1117 #define  BKP_DR5_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1118 \r
1119 /*******************  Bit definition for BKP_DR6 register  ********************/\r
1120 #define  BKP_DR6_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1121 \r
1122 /*******************  Bit definition for BKP_DR7 register  ********************/\r
1123 #define  BKP_DR7_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1124 \r
1125 /*******************  Bit definition for BKP_DR8 register  ********************/\r
1126 #define  BKP_DR8_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1127 \r
1128 /*******************  Bit definition for BKP_DR9 register  ********************/\r
1129 #define  BKP_DR9_D                           ((uint16_t)0xFFFF)     /*!< Backup data */\r
1130 \r
1131 /*******************  Bit definition for BKP_DR10 register  *******************/\r
1132 #define  BKP_DR10_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1133 \r
1134 /*******************  Bit definition for BKP_DR11 register  *******************/\r
1135 #define  BKP_DR11_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1136 \r
1137 /*******************  Bit definition for BKP_DR12 register  *******************/\r
1138 #define  BKP_DR12_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1139 \r
1140 /*******************  Bit definition for BKP_DR13 register  *******************/\r
1141 #define  BKP_DR13_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1142 \r
1143 /*******************  Bit definition for BKP_DR14 register  *******************/\r
1144 #define  BKP_DR14_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1145 \r
1146 /*******************  Bit definition for BKP_DR15 register  *******************/\r
1147 #define  BKP_DR15_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1148 \r
1149 /*******************  Bit definition for BKP_DR16 register  *******************/\r
1150 #define  BKP_DR16_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1151 \r
1152 /*******************  Bit definition for BKP_DR17 register  *******************/\r
1153 #define  BKP_DR17_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1154 \r
1155 /******************  Bit definition for BKP_DR18 register  ********************/\r
1156 #define  BKP_DR18_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1157 \r
1158 /*******************  Bit definition for BKP_DR19 register  *******************/\r
1159 #define  BKP_DR19_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1160 \r
1161 /*******************  Bit definition for BKP_DR20 register  *******************/\r
1162 #define  BKP_DR20_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1163 \r
1164 /*******************  Bit definition for BKP_DR21 register  *******************/\r
1165 #define  BKP_DR21_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1166 \r
1167 /*******************  Bit definition for BKP_DR22 register  *******************/\r
1168 #define  BKP_DR22_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1169 \r
1170 /*******************  Bit definition for BKP_DR23 register  *******************/\r
1171 #define  BKP_DR23_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1172 \r
1173 /*******************  Bit definition for BKP_DR24 register  *******************/\r
1174 #define  BKP_DR24_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1175 \r
1176 /*******************  Bit definition for BKP_DR25 register  *******************/\r
1177 #define  BKP_DR25_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1178 \r
1179 /*******************  Bit definition for BKP_DR26 register  *******************/\r
1180 #define  BKP_DR26_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1181 \r
1182 /*******************  Bit definition for BKP_DR27 register  *******************/\r
1183 #define  BKP_DR27_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1184 \r
1185 /*******************  Bit definition for BKP_DR28 register  *******************/\r
1186 #define  BKP_DR28_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1187 \r
1188 /*******************  Bit definition for BKP_DR29 register  *******************/\r
1189 #define  BKP_DR29_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1190 \r
1191 /*******************  Bit definition for BKP_DR30 register  *******************/\r
1192 #define  BKP_DR30_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1193 \r
1194 /*******************  Bit definition for BKP_DR31 register  *******************/\r
1195 #define  BKP_DR31_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1196 \r
1197 /*******************  Bit definition for BKP_DR32 register  *******************/\r
1198 #define  BKP_DR32_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1199 \r
1200 /*******************  Bit definition for BKP_DR33 register  *******************/\r
1201 #define  BKP_DR33_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1202 \r
1203 /*******************  Bit definition for BKP_DR34 register  *******************/\r
1204 #define  BKP_DR34_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1205 \r
1206 /*******************  Bit definition for BKP_DR35 register  *******************/\r
1207 #define  BKP_DR35_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1208 \r
1209 /*******************  Bit definition for BKP_DR36 register  *******************/\r
1210 #define  BKP_DR36_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1211 \r
1212 /*******************  Bit definition for BKP_DR37 register  *******************/\r
1213 #define  BKP_DR37_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1214 \r
1215 /*******************  Bit definition for BKP_DR38 register  *******************/\r
1216 #define  BKP_DR38_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1217 \r
1218 /*******************  Bit definition for BKP_DR39 register  *******************/\r
1219 #define  BKP_DR39_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1220 \r
1221 /*******************  Bit definition for BKP_DR40 register  *******************/\r
1222 #define  BKP_DR40_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1223 \r
1224 /*******************  Bit definition for BKP_DR41 register  *******************/\r
1225 #define  BKP_DR41_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1226 \r
1227 /*******************  Bit definition for BKP_DR42 register  *******************/\r
1228 #define  BKP_DR42_D                          ((uint16_t)0xFFFF)     /*!< Backup data */\r
1229 \r
1230 /******************  Bit definition for BKP_RTCCR register  *******************/\r
1231 #define  BKP_RTCCR_CAL                       ((uint16_t)0x007F)     /*!< Calibration value */\r
1232 #define  BKP_RTCCR_CCO                       ((uint16_t)0x0080)     /*!< Calibration Clock Output */\r
1233 #define  BKP_RTCCR_ASOE                      ((uint16_t)0x0100)     /*!< Alarm or Second Output Enable */\r
1234 #define  BKP_RTCCR_ASOS                      ((uint16_t)0x0200)     /*!< Alarm or Second Output Selection */\r
1235 \r
1236 /********************  Bit definition for BKP_CR register  ********************/\r
1237 #define  BKP_CR_TPE                          ((uint8_t)0x01)        /*!< TAMPER pin enable */\r
1238 #define  BKP_CR_TPAL                         ((uint8_t)0x02)        /*!< TAMPER pin active level */\r
1239 \r
1240 /*******************  Bit definition for BKP_CSR register  ********************/\r
1241 #define  BKP_CSR_CTE                         ((uint16_t)0x0001)     /*!< Clear Tamper event */\r
1242 #define  BKP_CSR_CTI                         ((uint16_t)0x0002)     /*!< Clear Tamper Interrupt */\r
1243 #define  BKP_CSR_TPIE                        ((uint16_t)0x0004)     /*!< TAMPER Pin interrupt enable */\r
1244 #define  BKP_CSR_TEF                         ((uint16_t)0x0100)     /*!< Tamper Event Flag */\r
1245 #define  BKP_CSR_TIF                         ((uint16_t)0x0200)     /*!< Tamper Interrupt Flag */\r
1246 \r
1247 /******************************************************************************/\r
1248 /*                                                                            */\r
1249 /*                         Reset and Clock Control                            */\r
1250 /*                                                                            */\r
1251 /******************************************************************************/\r
1252 \r
1253 /********************  Bit definition for RCC_CR register  ********************/\r
1254 #define  RCC_CR_HSION                        ((uint32_t)0x00000001)        /*!< Internal High Speed clock enable */\r
1255 #define  RCC_CR_HSIRDY                       ((uint32_t)0x00000002)        /*!< Internal High Speed clock ready flag */\r
1256 #define  RCC_CR_HSITRIM                      ((uint32_t)0x000000F8)        /*!< Internal High Speed clock trimming */\r
1257 #define  RCC_CR_HSICAL                       ((uint32_t)0x0000FF00)        /*!< Internal High Speed clock Calibration */\r
1258 #define  RCC_CR_HSEON                        ((uint32_t)0x00010000)        /*!< External High Speed clock enable */\r
1259 #define  RCC_CR_HSERDY                       ((uint32_t)0x00020000)        /*!< External High Speed clock ready flag */\r
1260 #define  RCC_CR_HSEBYP                       ((uint32_t)0x00040000)        /*!< External High Speed clock Bypass */\r
1261 #define  RCC_CR_CSSON                        ((uint32_t)0x00080000)        /*!< Clock Security System enable */\r
1262 #define  RCC_CR_PLLON                        ((uint32_t)0x01000000)        /*!< PLL enable */\r
1263 #define  RCC_CR_PLLRDY                       ((uint32_t)0x02000000)        /*!< PLL clock ready flag */\r
1264 \r
1265 /*******************  Bit definition for RCC_CFGR register  *******************/\r
1266 #define  RCC_CFGR_SW                         ((uint32_t)0x00000003)        /*!< SW[1:0] bits (System clock Switch) */\r
1267 #define  RCC_CFGR_SW_0                       ((uint32_t)0x00000001)        /*!< Bit 0 */\r
1268 #define  RCC_CFGR_SW_1                       ((uint32_t)0x00000002)        /*!< Bit 1 */\r
1269 \r
1270 /*!< SW configuration */\r
1271 #define  RCC_CFGR_SW_HSI                     ((uint32_t)0x00000000)        /*!< HSI selected as system clock */\r
1272 #define  RCC_CFGR_SW_HSE                     ((uint32_t)0x00000001)        /*!< HSE selected as system clock */\r
1273 #define  RCC_CFGR_SW_PLL                     ((uint32_t)0x00000002)        /*!< PLL selected as system clock */\r
1274 \r
1275 #define  RCC_CFGR_SWS                        ((uint32_t)0x0000000C)        /*!< SWS[1:0] bits (System Clock Switch Status) */\r
1276 #define  RCC_CFGR_SWS_0                      ((uint32_t)0x00000004)        /*!< Bit 0 */\r
1277 #define  RCC_CFGR_SWS_1                      ((uint32_t)0x00000008)        /*!< Bit 1 */\r
1278 \r
1279 /*!< SWS configuration */\r
1280 #define  RCC_CFGR_SWS_HSI                    ((uint32_t)0x00000000)        /*!< HSI oscillator used as system clock */\r
1281 #define  RCC_CFGR_SWS_HSE                    ((uint32_t)0x00000004)        /*!< HSE oscillator used as system clock */\r
1282 #define  RCC_CFGR_SWS_PLL                    ((uint32_t)0x00000008)        /*!< PLL used as system clock */\r
1283 \r
1284 #define  RCC_CFGR_HPRE                       ((uint32_t)0x000000F0)        /*!< HPRE[3:0] bits (AHB prescaler) */\r
1285 #define  RCC_CFGR_HPRE_0                     ((uint32_t)0x00000010)        /*!< Bit 0 */\r
1286 #define  RCC_CFGR_HPRE_1                     ((uint32_t)0x00000020)        /*!< Bit 1 */\r
1287 #define  RCC_CFGR_HPRE_2                     ((uint32_t)0x00000040)        /*!< Bit 2 */\r
1288 #define  RCC_CFGR_HPRE_3                     ((uint32_t)0x00000080)        /*!< Bit 3 */\r
1289 \r
1290 /*!< HPRE configuration */\r
1291 #define  RCC_CFGR_HPRE_DIV1                  ((uint32_t)0x00000000)        /*!< SYSCLK not divided */\r
1292 #define  RCC_CFGR_HPRE_DIV2                  ((uint32_t)0x00000080)        /*!< SYSCLK divided by 2 */\r
1293 #define  RCC_CFGR_HPRE_DIV4                  ((uint32_t)0x00000090)        /*!< SYSCLK divided by 4 */\r
1294 #define  RCC_CFGR_HPRE_DIV8                  ((uint32_t)0x000000A0)        /*!< SYSCLK divided by 8 */\r
1295 #define  RCC_CFGR_HPRE_DIV16                 ((uint32_t)0x000000B0)        /*!< SYSCLK divided by 16 */\r
1296 #define  RCC_CFGR_HPRE_DIV64                 ((uint32_t)0x000000C0)        /*!< SYSCLK divided by 64 */\r
1297 #define  RCC_CFGR_HPRE_DIV128                ((uint32_t)0x000000D0)        /*!< SYSCLK divided by 128 */\r
1298 #define  RCC_CFGR_HPRE_DIV256                ((uint32_t)0x000000E0)        /*!< SYSCLK divided by 256 */\r
1299 #define  RCC_CFGR_HPRE_DIV512                ((uint32_t)0x000000F0)        /*!< SYSCLK divided by 512 */\r
1300 \r
1301 #define  RCC_CFGR_PPRE1                      ((uint32_t)0x00000700)        /*!< PRE1[2:0] bits (APB1 prescaler) */\r
1302 #define  RCC_CFGR_PPRE1_0                    ((uint32_t)0x00000100)        /*!< Bit 0 */\r
1303 #define  RCC_CFGR_PPRE1_1                    ((uint32_t)0x00000200)        /*!< Bit 1 */\r
1304 #define  RCC_CFGR_PPRE1_2                    ((uint32_t)0x00000400)        /*!< Bit 2 */\r
1305 \r
1306 /*!< PPRE1 configuration */\r
1307 #define  RCC_CFGR_PPRE1_DIV1                 ((uint32_t)0x00000000)        /*!< HCLK not divided */\r
1308 #define  RCC_CFGR_PPRE1_DIV2                 ((uint32_t)0x00000400)        /*!< HCLK divided by 2 */\r
1309 #define  RCC_CFGR_PPRE1_DIV4                 ((uint32_t)0x00000500)        /*!< HCLK divided by 4 */\r
1310 #define  RCC_CFGR_PPRE1_DIV8                 ((uint32_t)0x00000600)        /*!< HCLK divided by 8 */\r
1311 #define  RCC_CFGR_PPRE1_DIV16                ((uint32_t)0x00000700)        /*!< HCLK divided by 16 */\r
1312 \r
1313 #define  RCC_CFGR_PPRE2                      ((uint32_t)0x00003800)        /*!< PRE2[2:0] bits (APB2 prescaler) */\r
1314 #define  RCC_CFGR_PPRE2_0                    ((uint32_t)0x00000800)        /*!< Bit 0 */\r
1315 #define  RCC_CFGR_PPRE2_1                    ((uint32_t)0x00001000)        /*!< Bit 1 */\r
1316 #define  RCC_CFGR_PPRE2_2                    ((uint32_t)0x00002000)        /*!< Bit 2 */\r
1317 \r
1318 /*!< PPRE2 configuration */\r
1319 #define  RCC_CFGR_PPRE2_DIV1                 ((uint32_t)0x00000000)        /*!< HCLK not divided */\r
1320 #define  RCC_CFGR_PPRE2_DIV2                 ((uint32_t)0x00002000)        /*!< HCLK divided by 2 */\r
1321 #define  RCC_CFGR_PPRE2_DIV4                 ((uint32_t)0x00002800)        /*!< HCLK divided by 4 */\r
1322 #define  RCC_CFGR_PPRE2_DIV8                 ((uint32_t)0x00003000)        /*!< HCLK divided by 8 */\r
1323 #define  RCC_CFGR_PPRE2_DIV16                ((uint32_t)0x00003800)        /*!< HCLK divided by 16 */\r
1324 \r
1325 #define  RCC_CFGR_ADCPRE                     ((uint32_t)0x0000C000)        /*!< ADCPRE[1:0] bits (ADC prescaler) */\r
1326 #define  RCC_CFGR_ADCPRE_0                   ((uint32_t)0x00004000)        /*!< Bit 0 */\r
1327 #define  RCC_CFGR_ADCPRE_1                   ((uint32_t)0x00008000)        /*!< Bit 1 */\r
1328 \r
1329 /*!< ADCPPRE configuration */\r
1330 #define  RCC_CFGR_ADCPRE_DIV2                ((uint32_t)0x00000000)        /*!< PCLK2 divided by 2 */\r
1331 #define  RCC_CFGR_ADCPRE_DIV4                ((uint32_t)0x00004000)        /*!< PCLK2 divided by 4 */\r
1332 #define  RCC_CFGR_ADCPRE_DIV6                ((uint32_t)0x00008000)        /*!< PCLK2 divided by 6 */\r
1333 #define  RCC_CFGR_ADCPRE_DIV8                ((uint32_t)0x0000C000)        /*!< PCLK2 divided by 8 */\r
1334 \r
1335 #define  RCC_CFGR_PLLSRC                     ((uint32_t)0x00010000)        /*!< PLL entry clock source */\r
1336 #define  RCC_CFGR_PLLXTPRE                   ((uint32_t)0x00020000)        /*!< HSE divider for PLL entry */\r
1337 \r
1338 #define  RCC_CFGR_PLLMULL                    ((uint32_t)0x003C0000)        /*!< PLLMUL[3:0] bits (PLL multiplication factor) */\r
1339 #define  RCC_CFGR_PLLMULL_0                  ((uint32_t)0x00040000)        /*!< Bit 0 */\r
1340 #define  RCC_CFGR_PLLMULL_1                  ((uint32_t)0x00080000)        /*!< Bit 1 */\r
1341 #define  RCC_CFGR_PLLMULL_2                  ((uint32_t)0x00100000)        /*!< Bit 2 */\r
1342 #define  RCC_CFGR_PLLMULL_3                  ((uint32_t)0x00200000)        /*!< Bit 3 */\r
1343 \r
1344 /*!< PLLMUL configuration */\r
1345 #define  RCC_CFGR_PLLMULL2                   ((uint32_t)0x00000000)        /*!< PLL input clock*2 */\r
1346 #define  RCC_CFGR_PLLMULL3                   ((uint32_t)0x00040000)        /*!< PLL input clock*3 */\r
1347 #define  RCC_CFGR_PLLMULL4                   ((uint32_t)0x00080000)        /*!< PLL input clock*4 */\r
1348 #define  RCC_CFGR_PLLMULL5                   ((uint32_t)0x000C0000)        /*!< PLL input clock*5 */\r
1349 #define  RCC_CFGR_PLLMULL6                   ((uint32_t)0x00100000)        /*!< PLL input clock*6 */\r
1350 #define  RCC_CFGR_PLLMULL7                   ((uint32_t)0x00140000)        /*!< PLL input clock*7 */\r
1351 #define  RCC_CFGR_PLLMULL8                   ((uint32_t)0x00180000)        /*!< PLL input clock*8 */\r
1352 #define  RCC_CFGR_PLLMULL9                   ((uint32_t)0x001C0000)        /*!< PLL input clock*9 */\r
1353 #define  RCC_CFGR_PLLMULL10                  ((uint32_t)0x00200000)        /*!< PLL input clock10 */\r
1354 #define  RCC_CFGR_PLLMULL11                  ((uint32_t)0x00240000)        /*!< PLL input clock*11 */\r
1355 #define  RCC_CFGR_PLLMULL12                  ((uint32_t)0x00280000)        /*!< PLL input clock*12 */\r
1356 #define  RCC_CFGR_PLLMULL13                  ((uint32_t)0x002C0000)        /*!< PLL input clock*13 */\r
1357 #define  RCC_CFGR_PLLMULL14                  ((uint32_t)0x00300000)        /*!< PLL input clock*14 */\r
1358 #define  RCC_CFGR_PLLMULL15                  ((uint32_t)0x00340000)        /*!< PLL input clock*15 */\r
1359 #define  RCC_CFGR_PLLMULL16                  ((uint32_t)0x00380000)        /*!< PLL input clock*16 */\r
1360 \r
1361 #define  RCC_CFGR_USBPRE                     ((uint32_t)0x00400000)        /*!< USB prescaler */\r
1362 \r
1363 #define  RCC_CFGR_MCO                        ((uint32_t)0x07000000)        /*!< MCO[2:0] bits (Microcontroller Clock Output) */\r
1364 #define  RCC_CFGR_MCO_0                      ((uint32_t)0x01000000)        /*!< Bit 0 */\r
1365 #define  RCC_CFGR_MCO_1                      ((uint32_t)0x02000000)        /*!< Bit 1 */\r
1366 #define  RCC_CFGR_MCO_2                      ((uint32_t)0x04000000)        /*!< Bit 2 */\r
1367 \r
1368 /*!< MCO configuration */\r
1369 #define  RCC_CFGR_MCO_NOCLOCK                ((uint32_t)0x00000000)        /*!< No clock */\r
1370 #define  RCC_CFGR_MCO_SYSCLK                 ((uint32_t)0x04000000)        /*!< System clock selected */\r
1371 #define  RCC_CFGR_MCO_HSI                    ((uint32_t)0x05000000)        /*!< Internal 8 MHz RC oscillator clock selected */\r
1372 #define  RCC_CFGR_MCO_HSE                    ((uint32_t)0x06000000)        /*!< External 1-25 MHz oscillator clock selected */\r
1373 #define  RCC_CFGR_MCO_PLL                    ((uint32_t)0x07000000)        /*!< PLL clock divided by 2 selected*/\r
1374 \r
1375 /*!<******************  Bit definition for RCC_CIR register  ********************/\r
1376 #define  RCC_CIR_LSIRDYF                     ((uint32_t)0x00000001)        /*!< LSI Ready Interrupt flag */\r
1377 #define  RCC_CIR_LSERDYF                     ((uint32_t)0x00000002)        /*!< LSE Ready Interrupt flag */\r
1378 #define  RCC_CIR_HSIRDYF                     ((uint32_t)0x00000004)        /*!< HSI Ready Interrupt flag */\r
1379 #define  RCC_CIR_HSERDYF                     ((uint32_t)0x00000008)        /*!< HSE Ready Interrupt flag */\r
1380 #define  RCC_CIR_PLLRDYF                     ((uint32_t)0x00000010)        /*!< PLL Ready Interrupt flag */\r
1381 #define  RCC_CIR_CSSF                        ((uint32_t)0x00000080)        /*!< Clock Security System Interrupt flag */\r
1382 #define  RCC_CIR_LSIRDYIE                    ((uint32_t)0x00000100)        /*!< LSI Ready Interrupt Enable */\r
1383 #define  RCC_CIR_LSERDYIE                    ((uint32_t)0x00000200)        /*!< LSE Ready Interrupt Enable */\r
1384 #define  RCC_CIR_HSIRDYIE                    ((uint32_t)0x00000400)        /*!< HSI Ready Interrupt Enable */\r
1385 #define  RCC_CIR_HSERDYIE                    ((uint32_t)0x00000800)        /*!< HSE Ready Interrupt Enable */\r
1386 #define  RCC_CIR_PLLRDYIE                    ((uint32_t)0x00001000)        /*!< PLL Ready Interrupt Enable */\r
1387 #define  RCC_CIR_LSIRDYC                     ((uint32_t)0x00010000)        /*!< LSI Ready Interrupt Clear */\r
1388 #define  RCC_CIR_LSERDYC                     ((uint32_t)0x00020000)        /*!< LSE Ready Interrupt Clear */\r
1389 #define  RCC_CIR_HSIRDYC                     ((uint32_t)0x00040000)        /*!< HSI Ready Interrupt Clear */\r
1390 #define  RCC_CIR_HSERDYC                     ((uint32_t)0x00080000)        /*!< HSE Ready Interrupt Clear */\r
1391 #define  RCC_CIR_PLLRDYC                     ((uint32_t)0x00100000)        /*!< PLL Ready Interrupt Clear */\r
1392 #define  RCC_CIR_CSSC                        ((uint32_t)0x00800000)        /*!< Clock Security System Interrupt Clear */\r
1393 \r
1394 /*****************  Bit definition for RCC_APB2RSTR register  *****************/\r
1395 #define  RCC_APB2RSTR_AFIORST                ((uint16_t)0x0001)            /*!< Alternate Function I/O reset */\r
1396 #define  RCC_APB2RSTR_IOPARST                ((uint16_t)0x0004)            /*!< I/O port A reset */\r
1397 #define  RCC_APB2RSTR_IOPBRST                ((uint16_t)0x0008)            /*!< IO port B reset */\r
1398 #define  RCC_APB2RSTR_IOPCRST                ((uint16_t)0x0010)            /*!< IO port C reset */\r
1399 #define  RCC_APB2RSTR_IOPDRST                ((uint16_t)0x0020)            /*!< IO port D reset */\r
1400 #define  RCC_APB2RSTR_IOPERST                ((uint16_t)0x0040)            /*!< IO port E reset */\r
1401 #define  RCC_APB2RSTR_IOPFRST                ((uint16_t)0x0080)            /*!< IO port F reset */\r
1402 #define  RCC_APB2RSTR_IOPGRST                ((uint16_t)0x0100)            /*!< IO port G reset */\r
1403 #define  RCC_APB2RSTR_ADC1RST                ((uint16_t)0x0200)            /*!< ADC 1 interface reset */\r
1404 #define  RCC_APB2RSTR_ADC2RST                ((uint16_t)0x0400)            /*!< ADC 2 interface reset */\r
1405 #define  RCC_APB2RSTR_TIM1RST                ((uint16_t)0x0800)            /*!< TIM1 Timer reset */\r
1406 #define  RCC_APB2RSTR_SPI1RST                ((uint16_t)0x1000)            /*!< SPI 1 reset */\r
1407 #define  RCC_APB2RSTR_TIM8RST                ((uint16_t)0x2000)            /*!< TIM8 Timer reset */\r
1408 #define  RCC_APB2RSTR_USART1RST              ((uint16_t)0x4000)            /*!< USART1 reset */\r
1409 #define  RCC_APB2RSTR_ADC3RST                ((uint16_t)0x8000)            /*!< ADC3 interface reset */\r
1410 \r
1411 /*****************  Bit definition for RCC_APB1RSTR register  *****************/\r
1412 #define  RCC_APB1RSTR_TIM2RST                ((uint32_t)0x00000001)        /*!< Timer 2 reset */\r
1413 #define  RCC_APB1RSTR_TIM3RST                ((uint32_t)0x00000002)        /*!< Timer 3 reset */\r
1414 #define  RCC_APB1RSTR_TIM4RST                ((uint32_t)0x00000004)        /*!< Timer 4 reset */\r
1415 #define  RCC_APB1RSTR_TIM5RST                ((uint32_t)0x00000008)        /*!< Timer 5 reset */\r
1416 #define  RCC_APB1RSTR_TIM6RST                ((uint32_t)0x00000010)        /*!< Timer 6 reset */\r
1417 #define  RCC_APB1RSTR_TIM7RST                ((uint32_t)0x00000020)        /*!< Timer 7 reset */\r
1418 #define  RCC_APB1RSTR_WWDGRST                ((uint32_t)0x00000800)        /*!< Window Watchdog reset */\r
1419 #define  RCC_APB1RSTR_SPI2RST                ((uint32_t)0x00004000)        /*!< SPI 2 reset */\r
1420 #define  RCC_APB1RSTR_SPI3RST                ((uint32_t)0x00008000)        /*!< SPI 3 reset */\r
1421 #define  RCC_APB1RSTR_USART2RST              ((uint32_t)0x00020000)        /*!< USART 2 reset */\r
1422 #define  RCC_APB1RSTR_USART3RST              ((uint32_t)0x00040000)        /*!< RUSART 3 reset */\r
1423 #define  RCC_APB1RSTR_UART4RST               ((uint32_t)0x00080000)        /*!< USART 4 reset */\r
1424 #define  RCC_APB1RSTR_UART5RST               ((uint32_t)0x00100000)        /*!< USART 5 reset */\r
1425 #define  RCC_APB1RSTR_I2C1RST                ((uint32_t)0x00200000)        /*!< I2C 1 reset */\r
1426 #define  RCC_APB1RSTR_I2C2RST                ((uint32_t)0x00400000)        /*!< I2C 2 reset */\r
1427 #define  RCC_APB1RSTR_USBRST                 ((uint32_t)0x00800000)        /*!< USB reset */\r
1428 #define  RCC_APB1RSTR_CANRST                 ((uint32_t)0x02000000)        /*!< CAN reset */\r
1429 #define  RCC_APB1RSTR_BKPRST                 ((uint32_t)0x08000000)        /*!< Backup interface reset */\r
1430 #define  RCC_APB1RSTR_PWRRST                 ((uint32_t)0x10000000)        /*!< Power interface reset */\r
1431 #define  RCC_APB1RSTR_DACRST                 ((uint32_t)0x20000000)        /*!< DAC interface reset */\r
1432 \r
1433 /******************  Bit definition for RCC_AHBENR register  ******************/\r
1434 #define  RCC_AHBENR_DMA1EN                   ((uint16_t)0x0001)            /*!< DMA1 clock enable */\r
1435 #define  RCC_AHBENR_DMA2EN                   ((uint16_t)0x0002)            /*!< DMA2 clock enable */\r
1436 #define  RCC_AHBENR_SRAMEN                   ((uint16_t)0x0004)            /*!< SRAM interface clock enable */\r
1437 #define  RCC_AHBENR_FLITFEN                  ((uint16_t)0x0010)            /*!< FLITF clock enable */\r
1438 #define  RCC_AHBENR_CRCEN                    ((uint16_t)0x0040)            /*!< CRC clock enable */\r
1439 #define  RCC_AHBENR_FSMCEN                   ((uint16_t)0x0100)            /*!< FSMC clock enable */\r
1440 #define  RCC_AHBENR_SDIOEN                   ((uint16_t)0x0400)            /*!< SDIO clock enable */\r
1441 \r
1442 /******************  Bit definition for RCC_APB2ENR register  *****************/\r
1443 #define  RCC_APB2ENR_AFIOEN                  ((uint16_t)0x0001)            /*!< Alternate Function I/O clock enable */\r
1444 #define  RCC_APB2ENR_IOPAEN                  ((uint16_t)0x0004)            /*!< I/O port A clock enable */\r
1445 #define  RCC_APB2ENR_IOPBEN                  ((uint16_t)0x0008)            /*!< I/O port B clock enable */\r
1446 #define  RCC_APB2ENR_IOPCEN                  ((uint16_t)0x0010)            /*!< I/O port C clock enable */\r
1447 #define  RCC_APB2ENR_IOPDEN                  ((uint16_t)0x0020)            /*!< I/O port D clock enable */\r
1448 #define  RCC_APB2ENR_IOPEEN                  ((uint16_t)0x0040)            /*!< I/O port E clock enable */\r
1449 #define  RCC_APB2ENR_IOPFEN                  ((uint16_t)0x0080)            /*!< I/O port F clock enable */\r
1450 #define  RCC_APB2ENR_IOPGEN                  ((uint16_t)0x0100)            /*!< I/O port G clock enable */\r
1451 #define  RCC_APB2ENR_ADC1EN                  ((uint16_t)0x0200)            /*!< ADC 1 interface clock enable */\r
1452 #define  RCC_APB2ENR_ADC2EN                  ((uint16_t)0x0400)            /*!< ADC 2 interface clock enable */\r
1453 #define  RCC_APB2ENR_TIM1EN                  ((uint16_t)0x0800)            /*!< TIM1 Timer clock enable */\r
1454 #define  RCC_APB2ENR_SPI1EN                  ((uint16_t)0x1000)            /*!< SPI 1 clock enable */\r
1455 #define  RCC_APB2ENR_TIM8EN                  ((uint16_t)0x2000)            /*!< TIM8 Timer clock enable */\r
1456 #define  RCC_APB2ENR_USART1EN                ((uint16_t)0x4000)            /*!< USART1 clock enable */\r
1457 #define  RCC_APB2ENR_ADC3EN                  ((uint16_t)0x8000)            /*!< DMA1 clock enable */\r
1458 \r
1459 /*****************  Bit definition for RCC_APB1ENR register  ******************/\r
1460 #define  RCC_APB1ENR_TIM2EN                  ((uint32_t)0x00000001)        /*!< Timer 2 clock enabled*/\r
1461 #define  RCC_APB1ENR_TIM3EN                  ((uint32_t)0x00000002)        /*!< Timer 3 clock enable */\r
1462 #define  RCC_APB1ENR_TIM4EN                  ((uint32_t)0x00000004)        /*!< Timer 4 clock enable */\r
1463 #define  RCC_APB1ENR_TIM5EN                  ((uint32_t)0x00000008)        /*!< Timer 5 clock enable */\r
1464 #define  RCC_APB1ENR_TIM6EN                  ((uint32_t)0x00000010)        /*!< Timer 6 clock enable */\r
1465 #define  RCC_APB1ENR_TIM7EN                  ((uint32_t)0x00000020)        /*!< Timer 7 clock enable */\r
1466 #define  RCC_APB1ENR_WWDGEN                  ((uint32_t)0x00000800)        /*!< Window Watchdog clock enable */\r
1467 #define  RCC_APB1ENR_SPI2EN                  ((uint32_t)0x00004000)        /*!< SPI 2 clock enable */\r
1468 #define  RCC_APB1ENR_SPI3EN                  ((uint32_t)0x00008000)        /*!< SPI 3 clock enable */\r
1469 #define  RCC_APB1ENR_USART2EN                ((uint32_t)0x00020000)        /*!< USART 2 clock enable */\r
1470 #define  RCC_APB1ENR_USART3EN                ((uint32_t)0x00040000)        /*!< USART 3 clock enable */\r
1471 #define  RCC_APB1ENR_UART4EN                 ((uint32_t)0x00080000)        /*!< USART 4 clock enable */\r
1472 #define  RCC_APB1ENR_UART5EN                 ((uint32_t)0x00100000)        /*!< USART 5 clock enable */\r
1473 #define  RCC_APB1ENR_I2C1EN                  ((uint32_t)0x00200000)        /*!< I2C 1 clock enable */\r
1474 #define  RCC_APB1ENR_I2C2EN                  ((uint32_t)0x00400000)        /*!< I2C 2 clock enable */\r
1475 #define  RCC_APB1ENR_USBEN                   ((uint32_t)0x00800000)        /*!< USB clock enable */\r
1476 #define  RCC_APB1ENR_CANEN                   ((uint32_t)0x02000000)        /*!< CAN clock enable */\r
1477 #define  RCC_APB1ENR_BKPEN                   ((uint32_t)0x08000000)        /*!< Backup interface clock enable */\r
1478 #define  RCC_APB1ENR_PWREN                   ((uint32_t)0x10000000)        /*!< Power interface clock enable */\r
1479 #define  RCC_APB1ENR_DACEN                   ((uint32_t)0x20000000)        /*!< DAC interface clock enable */\r
1480 \r
1481 /*******************  Bit definition for RCC_BDCR register  *******************/\r
1482 #define  RCC_BDCR_LSEON                      ((uint32_t)0x00000001)        /*!< External Low Speed oscillator enable */\r
1483 #define  RCC_BDCR_LSERDY                     ((uint32_t)0x00000002)        /*!< External Low Speed oscillator Ready */\r
1484 #define  RCC_BDCR_LSEBYP                     ((uint32_t)0x00000004)        /*!< External Low Speed oscillator Bypass */\r
1485 \r
1486 #define  RCC_BDCR_RTCSEL                     ((uint32_t)0x00000300)        /*!< RTCSEL[1:0] bits (RTC clock source selection) */\r
1487 #define  RCC_BDCR_RTCSEL_0                   ((uint32_t)0x00000100)        /*!< Bit 0 */\r
1488 #define  RCC_BDCR_RTCSEL_1                   ((uint32_t)0x00000200)        /*!< Bit 1 */\r
1489 \r
1490 /*!< RTC congiguration */\r
1491 #define  RCC_BDCR_RTCSEL_NOCLOCK             ((uint32_t)0x00000000)        /*!< No clock */\r
1492 #define  RCC_BDCR_RTCSEL_LSE                 ((uint32_t)0x00000100)        /*!< LSE oscillator clock used as RTC clock */\r
1493 #define  RCC_BDCR_RTCSEL_LSI                 ((uint32_t)0x00000200)        /*!< LSI oscillator clock used as RTC clock */\r
1494 #define  RCC_BDCR_RTCSEL_HSE                 ((uint32_t)0x00000300)        /*!< HSE oscillator clock divided by 128 used as RTC clock */\r
1495 \r
1496 #define  RCC_BDCR_RTCEN                      ((uint32_t)0x00008000)        /*!< RTC clock enable */\r
1497 #define  RCC_BDCR_BDRST                      ((uint32_t)0x00010000)        /*!< Backup domain software reset  */\r
1498 \r
1499 /*******************  Bit definition for RCC_CSR register  ********************/\r
1500 #define  RCC_CSR_LSION                       ((uint32_t)0x00000001)        /*!< Internal Low Speed oscillator enable */\r
1501 #define  RCC_CSR_LSIRDY                      ((uint32_t)0x00000002)        /*!< Internal Low Speed oscillator Ready */\r
1502 #define  RCC_CSR_RMVF                        ((uint32_t)0x01000000)        /*!< Remove reset flag */\r
1503 #define  RCC_CSR_PINRSTF                     ((uint32_t)0x04000000)        /*!< PIN reset flag */\r
1504 #define  RCC_CSR_PORRSTF                     ((uint32_t)0x08000000)        /*!< POR/PDR reset flag */\r
1505 #define  RCC_CSR_SFTRSTF                     ((uint32_t)0x10000000)        /*!< Software Reset flag */\r
1506 #define  RCC_CSR_IWDGRSTF                    ((uint32_t)0x20000000)        /*!< Independent Watchdog reset flag */\r
1507 #define  RCC_CSR_WWDGRSTF                    ((uint32_t)0x40000000)        /*!< Window watchdog reset flag */\r
1508 #define  RCC_CSR_LPWRRSTF                    ((uint32_t)0x80000000)        /*!< Low-Power reset flag */\r
1509 \r
1510 /******************************************************************************/\r
1511 /*                                                                            */\r
1512 /*                General Purpose and Alternate Function IO                   */\r
1513 /*                                                                            */\r
1514 /******************************************************************************/\r
1515 \r
1516 /*******************  Bit definition for GPIO_CRL register  *******************/\r
1517 #define  GPIO_CRL_MODE                       ((uint32_t)0x33333333)        /*!< Port x mode bits */\r
1518 \r
1519 #define  GPIO_CRL_MODE0                      ((uint32_t)0x00000003)        /*!< MODE0[1:0] bits (Port x mode bits, pin 0) */\r
1520 #define  GPIO_CRL_MODE0_0                    ((uint32_t)0x00000001)        /*!< Bit 0 */\r
1521 #define  GPIO_CRL_MODE0_1                    ((uint32_t)0x00000002)        /*!< Bit 1 */\r
1522 \r
1523 #define  GPIO_CRL_MODE1                      ((uint32_t)0x00000030)        /*!< MODE1[1:0] bits (Port x mode bits, pin 1) */\r
1524 #define  GPIO_CRL_MODE1_0                    ((uint32_t)0x00000010)        /*!< Bit 0 */\r
1525 #define  GPIO_CRL_MODE1_1                    ((uint32_t)0x00000020)        /*!< Bit 1 */\r
1526 \r
1527 #define  GPIO_CRL_MODE2                      ((uint32_t)0x00000300)        /*!< MODE2[1:0] bits (Port x mode bits, pin 2) */\r
1528 #define  GPIO_CRL_MODE2_0                    ((uint32_t)0x00000100)        /*!< Bit 0 */\r
1529 #define  GPIO_CRL_MODE2_1                    ((uint32_t)0x00000200)        /*!< Bit 1 */\r
1530 \r
1531 #define  GPIO_CRL_MODE3                      ((uint32_t)0x00003000)        /*!< MODE3[1:0] bits (Port x mode bits, pin 3) */\r
1532 #define  GPIO_CRL_MODE3_0                    ((uint32_t)0x00001000)        /*!< Bit 0 */\r
1533 #define  GPIO_CRL_MODE3_1                    ((uint32_t)0x00002000)        /*!< Bit 1 */\r
1534 \r
1535 #define  GPIO_CRL_MODE4                      ((uint32_t)0x00030000)        /*!< MODE4[1:0] bits (Port x mode bits, pin 4) */\r
1536 #define  GPIO_CRL_MODE4_0                    ((uint32_t)0x00010000)        /*!< Bit 0 */\r
1537 #define  GPIO_CRL_MODE4_1                    ((uint32_t)0x00020000)        /*!< Bit 1 */\r
1538 \r
1539 #define  GPIO_CRL_MODE5                      ((uint32_t)0x00300000)        /*!< MODE5[1:0] bits (Port x mode bits, pin 5) */\r
1540 #define  GPIO_CRL_MODE5_0                    ((uint32_t)0x00100000)        /*!< Bit 0 */\r
1541 #define  GPIO_CRL_MODE5_1                    ((uint32_t)0x00200000)        /*!< Bit 1 */\r
1542 \r
1543 #define  GPIO_CRL_MODE6                      ((uint32_t)0x03000000)        /*!< MODE6[1:0] bits (Port x mode bits, pin 6) */\r
1544 #define  GPIO_CRL_MODE6_0                    ((uint32_t)0x01000000)        /*!< Bit 0 */\r
1545 #define  GPIO_CRL_MODE6_1                    ((uint32_t)0x02000000)        /*!< Bit 1 */\r
1546 \r
1547 #define  GPIO_CRL_MODE7                      ((uint32_t)0x30000000)        /*!< MODE7[1:0] bits (Port x mode bits, pin 7) */\r
1548 #define  GPIO_CRL_MODE7_0                    ((uint32_t)0x10000000)        /*!< Bit 0 */\r
1549 #define  GPIO_CRL_MODE7_1                    ((uint32_t)0x20000000)        /*!< Bit 1 */\r
1550 \r
1551 #define  GPIO_CRL_CNF                        ((uint32_t)0xCCCCCCCC)        /*!< Port x configuration bits */\r
1552 \r
1553 #define  GPIO_CRL_CNF0                       ((uint32_t)0x0000000C)        /*!< CNF0[1:0] bits (Port x configuration bits, pin 0) */\r
1554 #define  GPIO_CRL_CNF0_0                     ((uint32_t)0x00000004)        /*!< Bit 0 */\r
1555 #define  GPIO_CRL_CNF0_1                     ((uint32_t)0x00000008)        /*!< Bit 1 */\r
1556 \r
1557 #define  GPIO_CRL_CNF1                       ((uint32_t)0x000000C0)        /*!< CNF1[1:0] bits (Port x configuration bits, pin 1) */\r
1558 #define  GPIO_CRL_CNF1_0                     ((uint32_t)0x00000040)        /*!< Bit 0 */\r
1559 #define  GPIO_CRL_CNF1_1                     ((uint32_t)0x00000080)        /*!< Bit 1 */\r
1560 \r
1561 #define  GPIO_CRL_CNF2                       ((uint32_t)0x00000C00)        /*!< CNF2[1:0] bits (Port x configuration bits, pin 2) */\r
1562 #define  GPIO_CRL_CNF2_0                     ((uint32_t)0x00000400)        /*!< Bit 0 */\r
1563 #define  GPIO_CRL_CNF2_1                     ((uint32_t)0x00000800)        /*!< Bit 1 */\r
1564 \r
1565 #define  GPIO_CRL_CNF3                       ((uint32_t)0x0000C000)        /*!< CNF3[1:0] bits (Port x configuration bits, pin 3) */\r
1566 #define  GPIO_CRL_CNF3_0                     ((uint32_t)0x00004000)        /*!< Bit 0 */\r
1567 #define  GPIO_CRL_CNF3_1                     ((uint32_t)0x00008000)        /*!< Bit 1 */\r
1568 \r
1569 #define  GPIO_CRL_CNF4                       ((uint32_t)0x000C0000)        /*!< CNF4[1:0] bits (Port x configuration bits, pin 4) */\r
1570 #define  GPIO_CRL_CNF4_0                     ((uint32_t)0x00040000)        /*!< Bit 0 */\r
1571 #define  GPIO_CRL_CNF4_1                     ((uint32_t)0x00080000)        /*!< Bit 1 */\r
1572 \r
1573 #define  GPIO_CRL_CNF5                       ((uint32_t)0x00C00000)        /*!< CNF5[1:0] bits (Port x configuration bits, pin 5) */\r
1574 #define  GPIO_CRL_CNF5_0                     ((uint32_t)0x00400000)        /*!< Bit 0 */\r
1575 #define  GPIO_CRL_CNF5_1                     ((uint32_t)0x00800000)        /*!< Bit 1 */\r
1576 \r
1577 #define  GPIO_CRL_CNF6                       ((uint32_t)0x0C000000)        /*!< CNF6[1:0] bits (Port x configuration bits, pin 6) */\r
1578 #define  GPIO_CRL_CNF6_0                     ((uint32_t)0x04000000)        /*!< Bit 0 */\r
1579 #define  GPIO_CRL_CNF6_1                     ((uint32_t)0x08000000)        /*!< Bit 1 */\r
1580 \r
1581 #define  GPIO_CRL_CNF7                       ((uint32_t)0xC0000000)        /*!< CNF7[1:0] bits (Port x configuration bits, pin 7) */\r
1582 #define  GPIO_CRL_CNF7_0                     ((uint32_t)0x40000000)        /*!< Bit 0 */\r
1583 #define  GPIO_CRL_CNF7_1                     ((uint32_t)0x80000000)        /*!< Bit 1 */\r
1584 \r
1585 /*******************  Bit definition for GPIO_CRH register  *******************/\r
1586 #define  GPIO_CRH_MODE                       ((uint32_t)0x33333333)        /*!< Port x mode bits */\r
1587 \r
1588 #define  GPIO_CRH_MODE8                      ((uint32_t)0x00000003)        /*!< MODE8[1:0] bits (Port x mode bits, pin 8) */\r
1589 #define  GPIO_CRH_MODE8_0                    ((uint32_t)0x00000001)        /*!< Bit 0 */\r
1590 #define  GPIO_CRH_MODE8_1                    ((uint32_t)0x00000002)        /*!< Bit 1 */\r
1591 \r
1592 #define  GPIO_CRH_MODE9                      ((uint32_t)0x00000030)        /*!< MODE9[1:0] bits (Port x mode bits, pin 9) */\r
1593 #define  GPIO_CRH_MODE9_0                    ((uint32_t)0x00000010)        /*!< Bit 0 */\r
1594 #define  GPIO_CRH_MODE9_1                    ((uint32_t)0x00000020)        /*!< Bit 1 */\r
1595 \r
1596 #define  GPIO_CRH_MODE10                     ((uint32_t)0x00000300)        /*!< MODE10[1:0] bits (Port x mode bits, pin 10) */\r
1597 #define  GPIO_CRH_MODE10_0                   ((uint32_t)0x00000100)        /*!< Bit 0 */\r
1598 #define  GPIO_CRH_MODE10_1                   ((uint32_t)0x00000200)        /*!< Bit 1 */\r
1599 \r
1600 #define  GPIO_CRH_MODE11                     ((uint32_t)0x00003000)        /*!< MODE11[1:0] bits (Port x mode bits, pin 11) */\r
1601 #define  GPIO_CRH_MODE11_0                   ((uint32_t)0x00001000)        /*!< Bit 0 */\r
1602 #define  GPIO_CRH_MODE11_1                   ((uint32_t)0x00002000)        /*!< Bit 1 */\r
1603 \r
1604 #define  GPIO_CRH_MODE12                     ((uint32_t)0x00030000)        /*!< MODE12[1:0] bits (Port x mode bits, pin 12) */\r
1605 #define  GPIO_CRH_MODE12_0                   ((uint32_t)0x00010000)        /*!< Bit 0 */\r
1606 #define  GPIO_CRH_MODE12_1                   ((uint32_t)0x00020000)        /*!< Bit 1 */\r
1607 \r
1608 #define  GPIO_CRH_MODE13                     ((uint32_t)0x00300000)        /*!< MODE13[1:0] bits (Port x mode bits, pin 13) */\r
1609 #define  GPIO_CRH_MODE13_0                   ((uint32_t)0x00100000)        /*!< Bit 0 */\r
1610 #define  GPIO_CRH_MODE13_1                   ((uint32_t)0x00200000)        /*!< Bit 1 */\r
1611 \r
1612 #define  GPIO_CRH_MODE14                     ((uint32_t)0x03000000)        /*!< MODE14[1:0] bits (Port x mode bits, pin 14) */\r
1613 #define  GPIO_CRH_MODE14_0                   ((uint32_t)0x01000000)        /*!< Bit 0 */\r
1614 #define  GPIO_CRH_MODE14_1                   ((uint32_t)0x02000000)        /*!< Bit 1 */\r
1615 \r
1616 #define  GPIO_CRH_MODE15                     ((uint32_t)0x30000000)        /*!< MODE15[1:0] bits (Port x mode bits, pin 15) */\r
1617 #define  GPIO_CRH_MODE15_0                   ((uint32_t)0x10000000)        /*!< Bit 0 */\r
1618 #define  GPIO_CRH_MODE15_1                   ((uint32_t)0x20000000)        /*!< Bit 1 */\r
1619 \r
1620 #define  GPIO_CRH_CNF                        ((uint32_t)0xCCCCCCCC)        /*!< Port x configuration bits */\r
1621 \r
1622 #define  GPIO_CRH_CNF8                       ((uint32_t)0x0000000C)        /*!< CNF8[1:0] bits (Port x configuration bits, pin 8) */\r
1623 #define  GPIO_CRH_CNF8_0                     ((uint32_t)0x00000004)        /*!< Bit 0 */\r
1624 #define  GPIO_CRH_CNF8_1                     ((uint32_t)0x00000008)        /*!< Bit 1 */\r
1625 \r
1626 #define  GPIO_CRH_CNF9                       ((uint32_t)0x000000C0)        /*!< CNF9[1:0] bits (Port x configuration bits, pin 9) */\r
1627 #define  GPIO_CRH_CNF9_0                     ((uint32_t)0x00000040)        /*!< Bit 0 */\r
1628 #define  GPIO_CRH_CNF9_1                     ((uint32_t)0x00000080)        /*!< Bit 1 */\r
1629 \r
1630 #define  GPIO_CRH_CNF10                      ((uint32_t)0x00000C00)        /*!< CNF10[1:0] bits (Port x configuration bits, pin 10) */\r
1631 #define  GPIO_CRH_CNF10_0                    ((uint32_t)0x00000400)        /*!< Bit 0 */\r
1632 #define  GPIO_CRH_CNF10_1                    ((uint32_t)0x00000800)        /*!< Bit 1 */\r
1633 \r
1634 #define  GPIO_CRH_CNF11                      ((uint32_t)0x0000C000)        /*!< CNF11[1:0] bits (Port x configuration bits, pin 11) */\r
1635 #define  GPIO_CRH_CNF11_0                    ((uint32_t)0x00004000)        /*!< Bit 0 */\r
1636 #define  GPIO_CRH_CNF11_1                    ((uint32_t)0x00008000)        /*!< Bit 1 */\r
1637 \r
1638 #define  GPIO_CRH_CNF12                      ((uint32_t)0x000C0000)        /*!< CNF12[1:0] bits (Port x configuration bits, pin 12) */\r
1639 #define  GPIO_CRH_CNF12_0                    ((uint32_t)0x00040000)        /*!< Bit 0 */\r
1640 #define  GPIO_CRH_CNF12_1                    ((uint32_t)0x00080000)        /*!< Bit 1 */\r
1641 \r
1642 #define  GPIO_CRH_CNF13                      ((uint32_t)0x00C00000)        /*!< CNF13[1:0] bits (Port x configuration bits, pin 13) */\r
1643 #define  GPIO_CRH_CNF13_0                    ((uint32_t)0x00400000)        /*!< Bit 0 */\r
1644 #define  GPIO_CRH_CNF13_1                    ((uint32_t)0x00800000)        /*!< Bit 1 */\r
1645 \r
1646 #define  GPIO_CRH_CNF14                      ((uint32_t)0x0C000000)        /*!< CNF14[1:0] bits (Port x configuration bits, pin 14) */\r
1647 #define  GPIO_CRH_CNF14_0                    ((uint32_t)0x04000000)        /*!< Bit 0 */\r
1648 #define  GPIO_CRH_CNF14_1                    ((uint32_t)0x08000000)        /*!< Bit 1 */\r
1649 \r
1650 #define  GPIO_CRH_CNF15                      ((uint32_t)0xC0000000)        /*!< CNF15[1:0] bits (Port x configuration bits, pin 15) */\r
1651 #define  GPIO_CRH_CNF15_0                    ((uint32_t)0x40000000)        /*!< Bit 0 */\r
1652 #define  GPIO_CRH_CNF15_1                    ((uint32_t)0x80000000)        /*!< Bit 1 */\r
1653 \r
1654 /*!<******************  Bit definition for GPIO_IDR register  *******************/\r
1655 #define GPIO_IDR_IDR0                        ((uint16_t)0x0001)            /*!< Port input data, bit 0 */\r
1656 #define GPIO_IDR_IDR1                        ((uint16_t)0x0002)            /*!< Port input data, bit 1 */\r
1657 #define GPIO_IDR_IDR2                        ((uint16_t)0x0004)            /*!< Port input data, bit 2 */\r
1658 #define GPIO_IDR_IDR3                        ((uint16_t)0x0008)            /*!< Port input data, bit 3 */\r
1659 #define GPIO_IDR_IDR4                        ((uint16_t)0x0010)            /*!< Port input data, bit 4 */\r
1660 #define GPIO_IDR_IDR5                        ((uint16_t)0x0020)            /*!< Port input data, bit 5 */\r
1661 #define GPIO_IDR_IDR6                        ((uint16_t)0x0040)            /*!< Port input data, bit 6 */\r
1662 #define GPIO_IDR_IDR7                        ((uint16_t)0x0080)            /*!< Port input data, bit 7 */\r
1663 #define GPIO_IDR_IDR8                        ((uint16_t)0x0100)            /*!< Port input data, bit 8 */\r
1664 #define GPIO_IDR_IDR9                        ((uint16_t)0x0200)            /*!< Port input data, bit 9 */\r
1665 #define GPIO_IDR_IDR10                       ((uint16_t)0x0400)            /*!< Port input data, bit 10 */\r
1666 #define GPIO_IDR_IDR11                       ((uint16_t)0x0800)            /*!< Port input data, bit 11 */\r
1667 #define GPIO_IDR_IDR12                       ((uint16_t)0x1000)            /*!< Port input data, bit 12 */\r
1668 #define GPIO_IDR_IDR13                       ((uint16_t)0x2000)            /*!< Port input data, bit 13 */\r
1669 #define GPIO_IDR_IDR14                       ((uint16_t)0x4000)            /*!< Port input data, bit 14 */\r
1670 #define GPIO_IDR_IDR15                       ((uint16_t)0x8000)            /*!< Port input data, bit 15 */\r
1671 \r
1672 /*******************  Bit definition for GPIO_ODR register  *******************/\r
1673 #define GPIO_ODR_ODR0                        ((uint16_t)0x0001)            /*!< Port output data, bit 0 */\r
1674 #define GPIO_ODR_ODR1                        ((uint16_t)0x0002)            /*!< Port output data, bit 1 */\r
1675 #define GPIO_ODR_ODR2                        ((uint16_t)0x0004)            /*!< Port output data, bit 2 */\r
1676 #define GPIO_ODR_ODR3                        ((uint16_t)0x0008)            /*!< Port output data, bit 3 */\r
1677 #define GPIO_ODR_ODR4                        ((uint16_t)0x0010)            /*!< Port output data, bit 4 */\r
1678 #define GPIO_ODR_ODR5                        ((uint16_t)0x0020)            /*!< Port output data, bit 5 */\r
1679 #define GPIO_ODR_ODR6                        ((uint16_t)0x0040)            /*!< Port output data, bit 6 */\r
1680 #define GPIO_ODR_ODR7                        ((uint16_t)0x0080)            /*!< Port output data, bit 7 */\r
1681 #define GPIO_ODR_ODR8                        ((uint16_t)0x0100)            /*!< Port output data, bit 8 */\r
1682 #define GPIO_ODR_ODR9                        ((uint16_t)0x0200)            /*!< Port output data, bit 9 */\r
1683 #define GPIO_ODR_ODR10                       ((uint16_t)0x0400)            /*!< Port output data, bit 10 */\r
1684 #define GPIO_ODR_ODR11                       ((uint16_t)0x0800)            /*!< Port output data, bit 11 */\r
1685 #define GPIO_ODR_ODR12                       ((uint16_t)0x1000)            /*!< Port output data, bit 12 */\r
1686 #define GPIO_ODR_ODR13                       ((uint16_t)0x2000)            /*!< Port output data, bit 13 */\r
1687 #define GPIO_ODR_ODR14                       ((uint16_t)0x4000)            /*!< Port output data, bit 14 */\r
1688 #define GPIO_ODR_ODR15                       ((uint16_t)0x8000)            /*!< Port output data, bit 15 */\r
1689 \r
1690 /******************  Bit definition for GPIO_BSRR register  *******************/\r
1691 #define GPIO_BSRR_BS0                        ((uint32_t)0x00000001)        /*!< Port x Set bit 0 */\r
1692 #define GPIO_BSRR_BS1                        ((uint32_t)0x00000002)        /*!< Port x Set bit 1 */\r
1693 #define GPIO_BSRR_BS2                        ((uint32_t)0x00000004)        /*!< Port x Set bit 2 */\r
1694 #define GPIO_BSRR_BS3                        ((uint32_t)0x00000008)        /*!< Port x Set bit 3 */\r
1695 #define GPIO_BSRR_BS4                        ((uint32_t)0x00000010)        /*!< Port x Set bit 4 */\r
1696 #define GPIO_BSRR_BS5                        ((uint32_t)0x00000020)        /*!< Port x Set bit 5 */\r
1697 #define GPIO_BSRR_BS6                        ((uint32_t)0x00000040)        /*!< Port x Set bit 6 */\r
1698 #define GPIO_BSRR_BS7                        ((uint32_t)0x00000080)        /*!< Port x Set bit 7 */\r
1699 #define GPIO_BSRR_BS8                        ((uint32_t)0x00000100)        /*!< Port x Set bit 8 */\r
1700 #define GPIO_BSRR_BS9                        ((uint32_t)0x00000200)        /*!< Port x Set bit 9 */\r
1701 #define GPIO_BSRR_BS10                       ((uint32_t)0x00000400)        /*!< Port x Set bit 10 */\r
1702 #define GPIO_BSRR_BS11                       ((uint32_t)0x00000800)        /*!< Port x Set bit 11 */\r
1703 #define GPIO_BSRR_BS12                       ((uint32_t)0x00001000)        /*!< Port x Set bit 12 */\r
1704 #define GPIO_BSRR_BS13                       ((uint32_t)0x00002000)        /*!< Port x Set bit 13 */\r
1705 #define GPIO_BSRR_BS14                       ((uint32_t)0x00004000)        /*!< Port x Set bit 14 */\r
1706 #define GPIO_BSRR_BS15                       ((uint32_t)0x00008000)        /*!< Port x Set bit 15 */\r
1707 \r
1708 #define GPIO_BSRR_BR0                        ((uint32_t)0x00010000)        /*!< Port x Reset bit 0 */\r
1709 #define GPIO_BSRR_BR1                        ((uint32_t)0x00020000)        /*!< Port x Reset bit 1 */\r
1710 #define GPIO_BSRR_BR2                        ((uint32_t)0x00040000)        /*!< Port x Reset bit 2 */\r
1711 #define GPIO_BSRR_BR3                        ((uint32_t)0x00080000)        /*!< Port x Reset bit 3 */\r
1712 #define GPIO_BSRR_BR4                        ((uint32_t)0x00100000)        /*!< Port x Reset bit 4 */\r
1713 #define GPIO_BSRR_BR5                        ((uint32_t)0x00200000)        /*!< Port x Reset bit 5 */\r
1714 #define GPIO_BSRR_BR6                        ((uint32_t)0x00400000)        /*!< Port x Reset bit 6 */\r
1715 #define GPIO_BSRR_BR7                        ((uint32_t)0x00800000)        /*!< Port x Reset bit 7 */\r
1716 #define GPIO_BSRR_BR8                        ((uint32_t)0x01000000)        /*!< Port x Reset bit 8 */\r
1717 #define GPIO_BSRR_BR9                        ((uint32_t)0x02000000)        /*!< Port x Reset bit 9 */\r
1718 #define GPIO_BSRR_BR10                       ((uint32_t)0x04000000)        /*!< Port x Reset bit 10 */\r
1719 #define GPIO_BSRR_BR11                       ((uint32_t)0x08000000)        /*!< Port x Reset bit 11 */\r
1720 #define GPIO_BSRR_BR12                       ((uint32_t)0x10000000)        /*!< Port x Reset bit 12 */\r
1721 #define GPIO_BSRR_BR13                       ((uint32_t)0x20000000)        /*!< Port x Reset bit 13 */\r
1722 #define GPIO_BSRR_BR14                       ((uint32_t)0x40000000)        /*!< Port x Reset bit 14 */\r
1723 #define GPIO_BSRR_BR15                       ((uint32_t)0x80000000)        /*!< Port x Reset bit 15 */\r
1724 \r
1725 /*******************  Bit definition for GPIO_BRR register  *******************/\r
1726 #define GPIO_BRR_BR0                         ((uint16_t)0x0001)            /*!< Port x Reset bit 0 */\r
1727 #define GPIO_BRR_BR1                         ((uint16_t)0x0002)            /*!< Port x Reset bit 1 */\r
1728 #define GPIO_BRR_BR2                         ((uint16_t)0x0004)            /*!< Port x Reset bit 2 */\r
1729 #define GPIO_BRR_BR3                         ((uint16_t)0x0008)            /*!< Port x Reset bit 3 */\r
1730 #define GPIO_BRR_BR4                         ((uint16_t)0x0010)            /*!< Port x Reset bit 4 */\r
1731 #define GPIO_BRR_BR5                         ((uint16_t)0x0020)            /*!< Port x Reset bit 5 */\r
1732 #define GPIO_BRR_BR6                         ((uint16_t)0x0040)            /*!< Port x Reset bit 6 */\r
1733 #define GPIO_BRR_BR7                         ((uint16_t)0x0080)            /*!< Port x Reset bit 7 */\r
1734 #define GPIO_BRR_BR8                         ((uint16_t)0x0100)            /*!< Port x Reset bit 8 */\r
1735 #define GPIO_BRR_BR9                         ((uint16_t)0x0200)            /*!< Port x Reset bit 9 */\r
1736 #define GPIO_BRR_BR10                        ((uint16_t)0x0400)            /*!< Port x Reset bit 10 */\r
1737 #define GPIO_BRR_BR11                        ((uint16_t)0x0800)            /*!< Port x Reset bit 11 */\r
1738 #define GPIO_BRR_BR12                        ((uint16_t)0x1000)            /*!< Port x Reset bit 12 */\r
1739 #define GPIO_BRR_BR13                        ((uint16_t)0x2000)            /*!< Port x Reset bit 13 */\r
1740 #define GPIO_BRR_BR14                        ((uint16_t)0x4000)            /*!< Port x Reset bit 14 */\r
1741 #define GPIO_BRR_BR15                        ((uint16_t)0x8000)            /*!< Port x Reset bit 15 */\r
1742 \r
1743 /******************  Bit definition for GPIO_LCKR register  *******************/\r
1744 #define GPIO_LCKR_LCK0                       ((uint32_t)0x00000001)        /*!< Port x Lock bit 0 */\r
1745 #define GPIO_LCKR_LCK1                       ((uint32_t)0x00000002)        /*!< Port x Lock bit 1 */\r
1746 #define GPIO_LCKR_LCK2                       ((uint32_t)0x00000004)        /*!< Port x Lock bit 2 */\r
1747 #define GPIO_LCKR_LCK3                       ((uint32_t)0x00000008)        /*!< Port x Lock bit 3 */\r
1748 #define GPIO_LCKR_LCK4                       ((uint32_t)0x00000010)        /*!< Port x Lock bit 4 */\r
1749 #define GPIO_LCKR_LCK5                       ((uint32_t)0x00000020)        /*!< Port x Lock bit 5 */\r
1750 #define GPIO_LCKR_LCK6                       ((uint32_t)0x00000040)        /*!< Port x Lock bit 6 */\r
1751 #define GPIO_LCKR_LCK7                       ((uint32_t)0x00000080)        /*!< Port x Lock bit 7 */\r
1752 #define GPIO_LCKR_LCK8                       ((uint32_t)0x00000100)        /*!< Port x Lock bit 8 */\r
1753 #define GPIO_LCKR_LCK9                       ((uint32_t)0x00000200)        /*!< Port x Lock bit 9 */\r
1754 #define GPIO_LCKR_LCK10                      ((uint32_t)0x00000400)        /*!< Port x Lock bit 10 */\r
1755 #define GPIO_LCKR_LCK11                      ((uint32_t)0x00000800)        /*!< Port x Lock bit 11 */\r
1756 #define GPIO_LCKR_LCK12                      ((uint32_t)0x00001000)        /*!< Port x Lock bit 12 */\r
1757 #define GPIO_LCKR_LCK13                      ((uint32_t)0x00002000)        /*!< Port x Lock bit 13 */\r
1758 #define GPIO_LCKR_LCK14                      ((uint32_t)0x00004000)        /*!< Port x Lock bit 14 */\r
1759 #define GPIO_LCKR_LCK15                      ((uint32_t)0x00008000)        /*!< Port x Lock bit 15 */\r
1760 #define GPIO_LCKR_LCKK                       ((uint32_t)0x00010000)        /*!< Lock key */\r
1761 \r
1762 /*----------------------------------------------------------------------------*/\r
1763 \r
1764 /******************  Bit definition for AFIO_EVCR register  *******************/\r
1765 #define AFIO_EVCR_PIN                        ((uint8_t)0x0F)               /*!< PIN[3:0] bits (Pin selection) */\r
1766 #define AFIO_EVCR_PIN_0                      ((uint8_t)0x01)               /*!< Bit 0 */\r
1767 #define AFIO_EVCR_PIN_1                      ((uint8_t)0x02)               /*!< Bit 1 */\r
1768 #define AFIO_EVCR_PIN_2                      ((uint8_t)0x04)               /*!< Bit 2 */\r
1769 #define AFIO_EVCR_PIN_3                      ((uint8_t)0x08)               /*!< Bit 3 */\r
1770 \r
1771 /*!< PIN configuration */\r
1772 #define AFIO_EVCR_PIN_PX0                    ((uint8_t)0x00)               /*!< Pin 0 selected */\r
1773 #define AFIO_EVCR_PIN_PX1                    ((uint8_t)0x01)               /*!< Pin 1 selected */\r
1774 #define AFIO_EVCR_PIN_PX2                    ((uint8_t)0x02)               /*!< Pin 2 selected */\r
1775 #define AFIO_EVCR_PIN_PX3                    ((uint8_t)0x03)               /*!< Pin 3 selected */\r
1776 #define AFIO_EVCR_PIN_PX4                    ((uint8_t)0x04)               /*!< Pin 4 selected */\r
1777 #define AFIO_EVCR_PIN_PX5                    ((uint8_t)0x05)               /*!< Pin 5 selected */\r
1778 #define AFIO_EVCR_PIN_PX6                    ((uint8_t)0x06)               /*!< Pin 6 selected */\r
1779 #define AFIO_EVCR_PIN_PX7                    ((uint8_t)0x07)               /*!< Pin 7 selected */\r
1780 #define AFIO_EVCR_PIN_PX8                    ((uint8_t)0x08)               /*!< Pin 8 selected */\r
1781 #define AFIO_EVCR_PIN_PX9                    ((uint8_t)0x09)               /*!< Pin 9 selected */\r
1782 #define AFIO_EVCR_PIN_PX10                   ((uint8_t)0x0A)               /*!< Pin 10 selected */\r
1783 #define AFIO_EVCR_PIN_PX11                   ((uint8_t)0x0B)               /*!< Pin 11 selected */\r
1784 #define AFIO_EVCR_PIN_PX12                   ((uint8_t)0x0C)               /*!< Pin 12 selected */\r
1785 #define AFIO_EVCR_PIN_PX13                   ((uint8_t)0x0D)               /*!< Pin 13 selected */\r
1786 #define AFIO_EVCR_PIN_PX14                   ((uint8_t)0x0E)               /*!< Pin 14 selected */\r
1787 #define AFIO_EVCR_PIN_PX15                   ((uint8_t)0x0F)               /*!< Pin 15 selected */\r
1788 \r
1789 #define AFIO_EVCR_PORT                       ((uint8_t)0x70)               /*!< PORT[2:0] bits (Port selection) */\r
1790 #define AFIO_EVCR_PORT_0                     ((uint8_t)0x10)               /*!< Bit 0 */\r
1791 #define AFIO_EVCR_PORT_1                     ((uint8_t)0x20)               /*!< Bit 1 */\r
1792 #define AFIO_EVCR_PORT_2                     ((uint8_t)0x40)               /*!< Bit 2 */\r
1793 \r
1794 /*!< PORT configuration */\r
1795 #define AFIO_EVCR_PORT_PA                    ((uint8_t)0x00)               /*!< Port A selected */\r
1796 #define AFIO_EVCR_PORT_PB                    ((uint8_t)0x10)               /*!< Port B selected */\r
1797 #define AFIO_EVCR_PORT_PC                    ((uint8_t)0x20)               /*!< Port C selected */\r
1798 #define AFIO_EVCR_PORT_PD                    ((uint8_t)0x30)               /*!< Port D selected */\r
1799 #define AFIO_EVCR_PORT_PE                    ((uint8_t)0x40)               /*!< Port E selected */\r
1800 \r
1801 #define AFIO_EVCR_EVOE                       ((uint8_t)0x80)               /*!< Event Output Enable */\r
1802 \r
1803 /******************  Bit definition for AFIO_MAPR register  *******************/\r
1804 #define AFIO_MAPR_SPI1 _REMAP                ((uint32_t)0x00000001)        /*!< SPI1 remapping */\r
1805 #define AFIO_MAPR_I2C1_REMAP                 ((uint32_t)0x00000002)        /*!< I2C1 remapping */\r
1806 #define AFIO_MAPR_USART1_REMAP               ((uint32_t)0x00000004)        /*!< USART1 remapping */\r
1807 #define AFIO_MAPR_USART2_REMAP               ((uint32_t)0x00000008)        /*!< USART2 remapping */\r
1808 \r
1809 #define AFIO_MAPR_USART3_REMAP               ((uint32_t)0x00000030)        /*!< USART3_REMAP[1:0] bits (USART3 remapping) */\r
1810 #define AFIO_MAPR_USART3_REMAP_0             ((uint32_t)0x00000010)        /*!< Bit 0 */\r
1811 #define AFIO_MAPR_USART3_REMAP_1             ((uint32_t)0x00000020)        /*!< Bit 1 */\r
1812 \r
1813 /* USART3_REMAP configuration */\r
1814 #define AFIO_MAPR_USART3_REMAP_NOREMAP       ((uint32_t)0x00000000)        /*!< No remap (TX/PB10, RX/PB11, CK/PB12, CTS/PB13, RTS/PB14) */\r
1815 #define AFIO_MAPR_USART3_REMAP_PARTIALREMAP  ((uint32_t)0x00000010)        /*!< Partial remap (TX/PC10, RX/PC11, CK/PC12, CTS/PB13, RTS/PB14) */\r
1816 #define AFIO_MAPR_USART3_REMAP_FULLREMAP     ((uint32_t)0x00000030)        /*!< Full remap (TX/PD8, RX/PD9, CK/PD10, CTS/PD11, RTS/PD12) */\r
1817 \r
1818 #define AFIO_MAPR_TIM1_REMAP                 ((uint32_t)0x000000C0)        /*!< TIM1_REMAP[1:0] bits (TIM1 remapping) */\r
1819 #define AFIO_MAPR_TIM1_REMAP_0               ((uint32_t)0x00000040)        /*!< Bit 0 */\r
1820 #define AFIO_MAPR_TIM1_REMAP_1               ((uint32_t)0x00000080)        /*!< Bit 1 */\r
1821 \r
1822 /*!< TIM1_REMAP configuration */\r
1823 #define AFIO_MAPR_TIM1_REMAP_NOREMAP         ((uint32_t)0x00000000)        /*!< No remap (ETR/PA12, CH1/PA8, CH2/PA9, CH3/PA10, CH4/PA11, BKIN/PB12, CH1N/PB13, CH2N/PB14, CH3N/PB15) */\r
1824 #define AFIO_MAPR_TIM1_REMAP_PARTIALREMAP    ((uint32_t)0x00000040)        /*!< Partial remap (ETR/PA12, CH1/PA8, CH2/PA9, CH3/PA10, CH4/PA11, BKIN/PA6, CH1N/PA7, CH2N/PB0, CH3N/PB1) */\r
1825 #define AFIO_MAPR_TIM1_REMAP_FULLREMAP       ((uint32_t)0x000000C0)        /*!< Full remap (ETR/PE7, CH1/PE9, CH2/PE11, CH3/PE13, CH4/PE14, BKIN/PE15, CH1N/PE8, CH2N/PE10, CH3N/PE12) */\r
1826 \r
1827 #define AFIO_MAPR_TIM2_REMAP                 ((uint32_t)0x00000300)        /*!< TIM2_REMAP[1:0] bits (TIM2 remapping) */\r
1828 #define AFIO_MAPR_TIM2_REMAP_0               ((uint32_t)0x00000100)        /*!< Bit 0 */\r
1829 #define AFIO_MAPR_TIM2_REMAP_1               ((uint32_t)0x00000200)        /*!< Bit 1 */\r
1830 \r
1831 /*!< TIM2_REMAP configuration */\r
1832 #define AFIO_MAPR_TIM2_REMAP_NOREMAP         ((uint32_t)0x00000000)        /*!< No remap (CH1/ETR/PA0, CH2/PA1, CH3/PA2, CH4/PA3) */\r
1833 #define AFIO_MAPR_TIM2_REMAP_PARTIALREMAP1   ((uint32_t)0x00000100)        /*!< Partial remap (CH1/ETR/PA15, CH2/PB3, CH3/PA2, CH4/PA3) */\r
1834 #define AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2   ((uint32_t)0x00000200)        /*!< Partial remap (CH1/ETR/PA0, CH2/PA1, CH3/PB10, CH4/PB11) */\r
1835 #define AFIO_MAPR_TIM2_REMAP_FULLREMAP       ((uint32_t)0x00000300)        /*!< Full remap (CH1/ETR/PA15, CH2/PB3, CH3/PB10, CH4/PB11) */\r
1836 \r
1837 #define AFIO_MAPR_TIM3_REMAP                 ((uint32_t)0x00000C00)        /*!< TIM3_REMAP[1:0] bits (TIM3 remapping) */\r
1838 #define AFIO_MAPR_TIM3_REMAP_0               ((uint32_t)0x00000400)        /*!< Bit 0 */\r
1839 #define AFIO_MAPR_TIM3_REMAP_1               ((uint32_t)0x00000800)        /*!< Bit 1 */\r
1840 \r
1841 /*!< TIM3_REMAP configuration */\r
1842 #define AFIO_MAPR_TIM3_REMAP_NOREMAP         ((uint32_t)0x00000000)        /*!< No remap (CH1/PA6, CH2/PA7, CH3/PB0, CH4/PB1) */\r
1843 #define AFIO_MAPR_TIM3_REMAP_PARTIALREMAP    ((uint32_t)0x00000800)        /*!< Partial remap (CH1/PB4, CH2/PB5, CH3/PB0, CH4/PB1) */\r
1844 #define AFIO_MAPR_TIM3_REMAP_FULLREMAP       ((uint32_t)0x00000C00)        /*!< Full remap (CH1/PC6, CH2/PC7, CH3/PC8, CH4/PC9) */\r
1845 \r
1846 #define AFIO_MAPR_TIM4_REMAP                 ((uint32_t)0x00001000)        /*!< Port D0/Port D1 mapping on OSC_IN/OSC_OUT */\r
1847 \r
1848 #define AFIO_MAPR_CAN_REMAP                  ((uint32_t)0x00006000)        /*!< CAN_REMAP[1:0] bits (CAN Alternate function remapping) */\r
1849 #define AFIO_MAPR_CAN_REMAP_0                ((uint32_t)0x00002000)        /*!< Bit 0 */\r
1850 #define AFIO_MAPR_CAN_REMAP_1                ((uint32_t)0x00004000)        /*!< Bit 1 */\r
1851 \r
1852 /*!< CAN_REMAP configuration */\r
1853 #define AFIO_MAPR_CAN_REMAP_REMAP1           ((uint32_t)0x00000000)        /*!< CANRX mapped to PA11, CANTX mapped to PA12 */\r
1854 #define AFIO_MAPR_CAN_REMAP_REMAP2           ((uint32_t)0x00004000)        /*!< CANRX mapped to PB8, CANTX mapped to PB9 */\r
1855 #define AFIO_MAPR_CAN_REMAP_REMAP3           ((uint32_t)0x00006000)        /*!< CANRX mapped to PD0, CANTX mapped to PD1 */\r
1856 \r
1857 #define AFIO_MAPR_PD01_REMAP                 ((uint32_t)0x00008000)        /*!< Port D0/Port D1 mapping on OSC_IN/OSC_OUT */\r
1858 #define AFIO_MAPR_TIM5CH4_IREMAP             ((uint32_t)0x00010000)        /*!< TIM5 Channel4 Internal Remap */\r
1859 #define AFIO_MAPR_ADC1_ETRGINJ_REMAP         ((uint32_t)0x00020000)        /*!< ADC 1 External Trigger Injected Conversion remapping */\r
1860 #define AFIO_MAPR_ADC1_ETRGREG_REMAP         ((uint32_t)0x00040000)        /*!< ADC 1 External Trigger Regular Conversion remapping */\r
1861 #define AFIO_MAPR_ADC2_ETRGINJ_REMAP         ((uint32_t)0x00080000)        /*!< ADC 2 External Trigger Injected Conversion remapping */\r
1862 #define AFIO_MAPR_ADC2_ETRGREG_REMAP         ((uint32_t)0x00100000)        /*!< ADC 2 External Trigger Regular Conversion remapping */\r
1863 \r
1864 #define AFIO_MAPR_SWJ_CFG                    ((uint32_t)0x07000000)        /*!< SWJ_CFG[2:0] bits (Serial Wire JTAG configuration) */\r
1865 #define AFIO_MAPR_SWJ_CFG_0                  ((uint32_t)0x01000000)        /*!< Bit 0 */\r
1866 #define AFIO_MAPR_SWJ_CFG_1                  ((uint32_t)0x02000000)        /*!< Bit 1 */\r
1867 #define AFIO_MAPR_SWJ_CFG_2                  ((uint32_t)0x04000000)        /*!< Bit 2 */\r
1868 \r
1869 /*!< SWJ_CFG configuration */\r
1870 #define AFIO_MAPR_SWJ_CFG_RESET              ((uint32_t)0x00000000)        /*!< Full SWJ (JTAG-DP + SW-DP) : Reset State */\r
1871 #define AFIO_MAPR_SWJ_CFG_NOJNTRST           ((uint32_t)0x01000000)        /*!< Full SWJ (JTAG-DP + SW-DP) but without JNTRST */\r
1872 #define AFIO_MAPR_SWJ_CFG_JTAGDISABLE        ((uint32_t)0x02000000)        /*!< JTAG-DP Disabled and SW-DP Enabled */\r
1873 #define AFIO_MAPR_SWJ_CFG_DISABLE            ((uint32_t)0x04000000)        /*!< JTAG-DP Disabled and SW-DP Disabled */\r
1874 \r
1875 /*****************  Bit definition for AFIO_EXTICR1 register  *****************/\r
1876 #define AFIO_EXTICR1_EXTI0                   ((uint16_t)0x000F)            /*!< EXTI 0 configuration */\r
1877 #define AFIO_EXTICR1_EXTI1                   ((uint16_t)0x00F0)            /*!< EXTI 1 configuration */\r
1878 #define AFIO_EXTICR1_EXTI2                   ((uint16_t)0x0F00)            /*!< EXTI 2 configuration */\r
1879 #define AFIO_EXTICR1_EXTI3                   ((uint16_t)0xF000)            /*!< EXTI 3 configuration */\r
1880 \r
1881 /*!< EXTI0 configuration */\r
1882 #define AFIO_EXTICR1_EXTI0_PA                ((uint16_t)0x0000)            /*!< PA[0] pin */\r
1883 #define AFIO_EXTICR1_EXTI0_PB                ((uint16_t)0x0001)            /*!< PB[0] pin */\r
1884 #define AFIO_EXTICR1_EXTI0_PC                ((uint16_t)0x0002)            /*!< PC[0] pin */\r
1885 #define AFIO_EXTICR1_EXTI0_PD                ((uint16_t)0x0003)            /*!< PD[0] pin */\r
1886 #define AFIO_EXTICR1_EXTI0_PE                ((uint16_t)0x0004)            /*!< PE[0] pin */\r
1887 #define AFIO_EXTICR1_EXTI0_PF                ((uint16_t)0x0005)            /*!< PF[0] pin */\r
1888 #define AFIO_EXTICR1_EXTI0_PG                ((uint16_t)0x0006)            /*!< PG[0] pin */\r
1889 \r
1890 /*!< EXTI1 configuration */\r
1891 #define AFIO_EXTICR1_EXTI1_PA                ((uint16_t)0x0000)            /*!< PA[1] pin */\r
1892 #define AFIO_EXTICR1_EXTI1_PB                ((uint16_t)0x0010)            /*!< PB[1] pin */\r
1893 #define AFIO_EXTICR1_EXTI1_PC                ((uint16_t)0x0020)            /*!< PC[1] pin */\r
1894 #define AFIO_EXTICR1_EXTI1_PD                ((uint16_t)0x0030)            /*!< PD[1] pin */\r
1895 #define AFIO_EXTICR1_EXTI1_PE                ((uint16_t)0x0040)            /*!< PE[1] pin */\r
1896 #define AFIO_EXTICR1_EXTI1_PF                ((uint16_t)0x0050)            /*!< PF[1] pin */\r
1897 #define AFIO_EXTICR1_EXTI1_PG                ((uint16_t)0x0060)            /*!< PG[1] pin */\r
1898 \r
1899 /*!< EXTI2 configuration */\r
1900 #define AFIO_EXTICR1_EXTI2_PA                ((uint16_t)0x0000)            /*!< PA[2] pin */\r
1901 #define AFIO_EXTICR1_EXTI2_PB                ((uint16_t)0x0100)            /*!< PB[2] pin */\r
1902 #define AFIO_EXTICR1_EXTI2_PC                ((uint16_t)0x0200)            /*!< PC[2] pin */\r
1903 #define AFIO_EXTICR1_EXTI2_PD                ((uint16_t)0x0300)            /*!< PD[2] pin */\r
1904 #define AFIO_EXTICR1_EXTI2_PE                ((uint16_t)0x0400)            /*!< PE[2] pin */\r
1905 #define AFIO_EXTICR1_EXTI2_PF                ((uint16_t)0x0500)            /*!< PF[2] pin */\r
1906 #define AFIO_EXTICR1_EXTI2_PG                ((uint16_t)0x0600)            /*!< PG[2] pin */\r
1907 \r
1908 /*!< EXTI3 configuration */\r
1909 #define AFIO_EXTICR1_EXTI3_PA                ((uint16_t)0x0000)            /*!< PA[3] pin */\r
1910 #define AFIO_EXTICR1_EXTI3_PB                ((uint16_t)0x1000)            /*!< PB[3] pin */\r
1911 #define AFIO_EXTICR1_EXTI3_PC                ((uint16_t)0x2000)            /*!< PC[3] pin */\r
1912 #define AFIO_EXTICR1_EXTI3_PD                ((uint16_t)0x3000)            /*!< PD[3] pin */\r
1913 #define AFIO_EXTICR1_EXTI3_PE                ((uint16_t)0x4000)            /*!< PE[3] pin */\r
1914 #define AFIO_EXTICR1_EXTI3_PF                ((uint16_t)0x5000)            /*!< PF[3] pin */\r
1915 #define AFIO_EXTICR1_EXTI3_PG                ((uint16_t)0x6000)            /*!< PG[3] pin */\r
1916 \r
1917 /*****************  Bit definition for AFIO_EXTICR2 register  *****************/\r
1918 #define AFIO_EXTICR2_EXTI4                   ((uint16_t)0x000F)            /*!< EXTI 4 configuration */\r
1919 #define AFIO_EXTICR2_EXTI5                   ((uint16_t)0x00F0)            /*!< EXTI 5 configuration */\r
1920 #define AFIO_EXTICR2_EXTI6                   ((uint16_t)0x0F00)            /*!< EXTI 6 configuration */\r
1921 #define AFIO_EXTICR2_EXTI7                   ((uint16_t)0xF000)            /*!< EXTI 7 configuration */\r
1922 \r
1923 /*!< EXTI4 configuration */\r
1924 #define AFIO_EXTICR2_EXTI4_PA                ((uint16_t)0x0000)            /*!< PA[4] pin */\r
1925 #define AFIO_EXTICR2_EXTI4_PB                ((uint16_t)0x0001)            /*!< PB[4] pin */\r
1926 #define AFIO_EXTICR2_EXTI4_PC                ((uint16_t)0x0002)            /*!< PC[4] pin */\r
1927 #define AFIO_EXTICR2_EXTI4_PD                ((uint16_t)0x0003)            /*!< PD[4] pin */\r
1928 #define AFIO_EXTICR2_EXTI4_PE                ((uint16_t)0x0004)            /*!< PE[4] pin */\r
1929 #define AFIO_EXTICR2_EXTI4_PF                ((uint16_t)0x0005)            /*!< PF[4] pin */\r
1930 #define AFIO_EXTICR2_EXTI4_PG                ((uint16_t)0x0006)            /*!< PG[4] pin */\r
1931 \r
1932 /* EXTI5 configuration */\r
1933 #define AFIO_EXTICR2_EXTI5_PA                ((uint16_t)0x0000)            /*!< PA[5] pin */\r
1934 #define AFIO_EXTICR2_EXTI5_PB                ((uint16_t)0x0010)            /*!< PB[5] pin */\r
1935 #define AFIO_EXTICR2_EXTI5_PC                ((uint16_t)0x0020)            /*!< PC[5] pin */\r
1936 #define AFIO_EXTICR2_EXTI5_PD                ((uint16_t)0x0030)            /*!< PD[5] pin */\r
1937 #define AFIO_EXTICR2_EXTI5_PE                ((uint16_t)0x0040)            /*!< PE[5] pin */\r
1938 #define AFIO_EXTICR2_EXTI5_PF                ((uint16_t)0x0050)            /*!< PF[5] pin */\r
1939 #define AFIO_EXTICR2_EXTI5_PG                ((uint16_t)0x0060)            /*!< PG[5] pin */\r
1940 \r
1941 /*!< EXTI6 configuration */\r
1942 #define AFIO_EXTICR2_EXTI6_PA                ((uint16_t)0x0000)            /*!< PA[6] pin */\r
1943 #define AFIO_EXTICR2_EXTI6_PB                ((uint16_t)0x0100)            /*!< PB[6] pin */\r
1944 #define AFIO_EXTICR2_EXTI6_PC                ((uint16_t)0x0200)            /*!< PC[6] pin */\r
1945 #define AFIO_EXTICR2_EXTI6_PD                ((uint16_t)0x0300)            /*!< PD[6] pin */\r
1946 #define AFIO_EXTICR2_EXTI6_PE                ((uint16_t)0x0400)            /*!< PE[6] pin */\r
1947 #define AFIO_EXTICR2_EXTI6_PF                ((uint16_t)0x0500)            /*!< PF[6] pin */\r
1948 #define AFIO_EXTICR2_EXTI6_PG                ((uint16_t)0x0600)            /*!< PG[6] pin */\r
1949 \r
1950 /*!< EXTI7 configuration */\r
1951 #define AFIO_EXTICR2_EXTI7_PA                ((uint16_t)0x0000)            /*!< PA[7] pin */\r
1952 #define AFIO_EXTICR2_EXTI7_PB                ((uint16_t)0x1000)            /*!< PB[7] pin */\r
1953 #define AFIO_EXTICR2_EXTI7_PC                ((uint16_t)0x2000)            /*!< PC[7] pin */\r
1954 #define AFIO_EXTICR2_EXTI7_PD                ((uint16_t)0x3000)            /*!< PD[7] pin */\r
1955 #define AFIO_EXTICR2_EXTI7_PE                ((uint16_t)0x4000)            /*!< PE[7] pin */\r
1956 #define AFIO_EXTICR2_EXTI7_PF                ((uint16_t)0x5000)            /*!< PF[7] pin */\r
1957 #define AFIO_EXTICR2_EXTI7_PG                ((uint16_t)0x6000)            /*!< PG[7] pin */\r
1958 \r
1959 /*****************  Bit definition for AFIO_EXTICR3 register  *****************/\r
1960 #define AFIO_EXTICR3_EXTI8                   ((uint16_t)0x000F)            /*!< EXTI 8 configuration */\r
1961 #define AFIO_EXTICR3_EXTI9                   ((uint16_t)0x00F0)            /*!< EXTI 9 configuration */\r
1962 #define AFIO_EXTICR3_EXTI10                  ((uint16_t)0x0F00)            /*!< EXTI 10 configuration */\r
1963 #define AFIO_EXTICR3_EXTI11                  ((uint16_t)0xF000)            /*!< EXTI 11 configuration */\r
1964 \r
1965 /*!< EXTI8 configuration */\r
1966 #define AFIO_EXTICR3_EXTI8_PA                ((uint16_t)0x0000)            /*!< PA[8] pin */\r
1967 #define AFIO_EXTICR3_EXTI8_PB                ((uint16_t)0x0001)            /*!< PB[8] pin */\r
1968 #define AFIO_EXTICR3_EXTI8_PC                ((uint16_t)0x0002)            /*!< PC[8] pin */\r
1969 #define AFIO_EXTICR3_EXTI8_PD                ((uint16_t)0x0003)            /*!< PD[8] pin */\r
1970 #define AFIO_EXTICR3_EXTI8_PE                ((uint16_t)0x0004)            /*!< PE[8] pin */\r
1971 #define AFIO_EXTICR3_EXTI8_PF                ((uint16_t)0x0005)            /*!< PF[8] pin */\r
1972 #define AFIO_EXTICR3_EXTI8_PG                ((uint16_t)0x0006)            /*!< PG[8] pin */\r
1973 \r
1974 /*!< EXTI9 configuration */\r
1975 #define AFIO_EXTICR3_EXTI9_PA                ((uint16_t)0x0000)            /*!< PA[9] pin */\r
1976 #define AFIO_EXTICR3_EXTI9_PB                ((uint16_t)0x0010)            /*!< PB[9] pin */\r
1977 #define AFIO_EXTICR3_EXTI9_PC                ((uint16_t)0x0020)            /*!< PC[9] pin */\r
1978 #define AFIO_EXTICR3_EXTI9_PD                ((uint16_t)0x0030)            /*!< PD[9] pin */\r
1979 #define AFIO_EXTICR3_EXTI9_PE                ((uint16_t)0x0040)            /*!< PE[9] pin */\r
1980 #define AFIO_EXTICR3_EXTI9_PF                ((uint16_t)0x0050)            /*!< PF[9] pin */\r
1981 #define AFIO_EXTICR3_EXTI9_PG                ((uint16_t)0x0060)            /*!< PG[9] pin */\r
1982 \r
1983 /*!< EXTI10 configuration */\r
1984 #define AFIO_EXTICR3_EXTI10_PA               ((uint16_t)0x0000)            /*!< PA[10] pin */\r
1985 #define AFIO_EXTICR3_EXTI10_PB               ((uint16_t)0x0100)            /*!< PB[10] pin */\r
1986 #define AFIO_EXTICR3_EXTI10_PC               ((uint16_t)0x0200)            /*!< PC[10] pin */\r
1987 #define AFIO_EXTICR3_EXTI10_PD               ((uint16_t)0x0300)            /*!< PD[10] pin */\r
1988 #define AFIO_EXTICR3_EXTI10_PE               ((uint16_t)0x0400)            /*!< PE[10] pin */\r
1989 #define AFIO_EXTICR3_EXTI10_PF               ((uint16_t)0x0500)            /*!< PF[10] pin */\r
1990 #define AFIO_EXTICR3_EXTI10_PG               ((uint16_t)0x0600)            /*!< PG[10] pin */\r
1991 \r
1992 /*!< EXTI11 configuration */\r
1993 #define AFIO_EXTICR3_EXTI11_PA               ((uint16_t)0x0000)            /*!< PA[11] pin */\r
1994 #define AFIO_EXTICR3_EXTI11_PB               ((uint16_t)0x1000)            /*!< PB[11] pin */\r
1995 #define AFIO_EXTICR3_EXTI11_PC               ((uint16_t)0x2000)            /*!< PC[11] pin */\r
1996 #define AFIO_EXTICR3_EXTI11_PD               ((uint16_t)0x3000)            /*!< PD[11] pin */\r
1997 #define AFIO_EXTICR3_EXTI11_PE               ((uint16_t)0x4000)            /*!< PE[11] pin */\r
1998 #define AFIO_EXTICR3_EXTI11_PF               ((uint16_t)0x5000)            /*!< PF[11] pin */\r
1999 #define AFIO_EXTICR3_EXTI11_PG               ((uint16_t)0x6000)            /*!< PG[11] pin */\r
2000 \r
2001 /*****************  Bit definition for AFIO_EXTICR4 register  *****************/\r
2002 #define AFIO_EXTICR4_EXTI12                  ((uint16_t)0x000F)            /*!< EXTI 12 configuration */\r
2003 #define AFIO_EXTICR4_EXTI13                  ((uint16_t)0x00F0)            /*!< EXTI 13 configuration */\r
2004 #define AFIO_EXTICR4_EXTI14                  ((uint16_t)0x0F00)            /*!< EXTI 14 configuration */\r
2005 #define AFIO_EXTICR4_EXTI15                  ((uint16_t)0xF000)            /*!< EXTI 15 configuration */\r
2006 \r
2007 /* EXTI12 configuration */\r
2008 #define AFIO_EXTICR4_EXTI12_PA               ((uint16_t)0x0000)            /*!< PA[12] pin */\r
2009 #define AFIO_EXTICR4_EXTI12_PB               ((uint16_t)0x0001)            /*!< PB[12] pin */\r
2010 #define AFIO_EXTICR4_EXTI12_PC               ((uint16_t)0x0002)            /*!< PC[12] pin */\r
2011 #define AFIO_EXTICR4_EXTI12_PD               ((uint16_t)0x0003)            /*!< PD[12] pin */\r
2012 #define AFIO_EXTICR4_EXTI12_PE               ((uint16_t)0x0004)            /*!< PE[12] pin */\r
2013 #define AFIO_EXTICR4_EXTI12_PF               ((uint16_t)0x0005)            /*!< PF[12] pin */\r
2014 #define AFIO_EXTICR4_EXTI12_PG               ((uint16_t)0x0006)            /*!< PG[12] pin */\r
2015 \r
2016 /* EXTI13 configuration */\r
2017 #define AFIO_EXTICR4_EXTI13_PA               ((uint16_t)0x0000)            /*!< PA[13] pin */\r
2018 #define AFIO_EXTICR4_EXTI13_PB               ((uint16_t)0x0010)            /*!< PB[13] pin */\r
2019 #define AFIO_EXTICR4_EXTI13_PC               ((uint16_t)0x0020)            /*!< PC[13] pin */\r
2020 #define AFIO_EXTICR4_EXTI13_PD               ((uint16_t)0x0030)            /*!< PD[13] pin */\r
2021 #define AFIO_EXTICR4_EXTI13_PE               ((uint16_t)0x0040)            /*!< PE[13] pin */\r
2022 #define AFIO_EXTICR4_EXTI13_PF               ((uint16_t)0x0050)            /*!< PF[13] pin */\r
2023 #define AFIO_EXTICR4_EXTI13_PG               ((uint16_t)0x0060)            /*!< PG[13] pin */\r
2024 \r
2025 /*!< EXTI14 configuration */\r
2026 #define AFIO_EXTICR4_EXTI14_PA               ((uint16_t)0x0000)            /*!< PA[14] pin */\r
2027 #define AFIO_EXTICR4_EXTI14_PB               ((uint16_t)0x0100)            /*!< PB[14] pin */\r
2028 #define AFIO_EXTICR4_EXTI14_PC               ((uint16_t)0x0200)            /*!< PC[14] pin */\r
2029 #define AFIO_EXTICR4_EXTI14_PD               ((uint16_t)0x0300)            /*!< PD[14] pin */\r
2030 #define AFIO_EXTICR4_EXTI14_PE               ((uint16_t)0x0400)            /*!< PE[14] pin */\r
2031 #define AFIO_EXTICR4_EXTI14_PF               ((uint16_t)0x0500)            /*!< PF[14] pin */\r
2032 #define AFIO_EXTICR4_EXTI14_PG               ((uint16_t)0x0600)            /*!< PG[14] pin */\r
2033 \r
2034 /*!< EXTI15 configuration */\r
2035 #define AFIO_EXTICR4_EXTI15_PA               ((uint16_t)0x0000)            /*!< PA[15] pin */\r
2036 #define AFIO_EXTICR4_EXTI15_PB               ((uint16_t)0x1000)            /*!< PB[15] pin */\r
2037 #define AFIO_EXTICR4_EXTI15_PC               ((uint16_t)0x2000)            /*!< PC[15] pin */\r
2038 #define AFIO_EXTICR4_EXTI15_PD               ((uint16_t)0x3000)            /*!< PD[15] pin */\r
2039 #define AFIO_EXTICR4_EXTI15_PE               ((uint16_t)0x4000)            /*!< PE[15] pin */\r
2040 #define AFIO_EXTICR4_EXTI15_PF               ((uint16_t)0x5000)            /*!< PF[15] pin */\r
2041 #define AFIO_EXTICR4_EXTI15_PG               ((uint16_t)0x6000)            /*!< PG[15] pin */\r
2042 \r
2043 /******************************************************************************/\r
2044 /*                                                                            */\r
2045 /*                               SystemTick                                   */\r
2046 /*                                                                            */\r
2047 /******************************************************************************/\r
2048 \r
2049 /*****************  Bit definition for SysTick_CTRL register  *****************/\r
2050 #define  SysTick_CTRL_ENABLE                 ((uint32_t)0x00000001)        /*!< Counter enable */\r
2051 #define  SysTick_CTRL_TICKINT                ((uint32_t)0x00000002)        /*!< Counting down to 0 pends the SysTick handler */\r
2052 #define  SysTick_CTRL_CLKSOURCE              ((uint32_t)0x00000004)        /*!< Clock source */\r
2053 #define  SysTick_CTRL_COUNTFLAG              ((uint32_t)0x00010000)        /*!< Count Flag */\r
2054 \r
2055 /*****************  Bit definition for SysTick_LOAD register  *****************/\r
2056 #define  SysTick_LOAD_RELOAD                 ((uint32_t)0x00FFFFFF)        /*!< Value to load into the SysTick Current Value Register when the counter reaches 0 */\r
2057 \r
2058 /*****************  Bit definition for SysTick_VAL register  ******************/\r
2059 #define  SysTick_VAL_CURRENT                 ((uint32_t)0x00FFFFFF)        /*!< Current value at the time the register is accessed */\r
2060 \r
2061 /*****************  Bit definition for SysTick_CALIB register  ****************/\r
2062 #define  SysTick_CALIB_TENMS                 ((uint32_t)0x00FFFFFF)        /*!< Reload value to use for 10ms timing */\r
2063 #define  SysTick_CALIB_SKEW                  ((uint32_t)0x40000000)        /*!< Calibration value is not exactly 10 ms */\r
2064 #define  SysTick_CALIB_NOREF                 ((uint32_t)0x80000000)        /*!< The reference clock is not provided */\r
2065 \r
2066 /******************************************************************************/\r
2067 /*                                                                            */\r
2068 /*                  Nested Vectored Interrupt Controller                      */\r
2069 /*                                                                            */\r
2070 /******************************************************************************/\r
2071 \r
2072 /******************  Bit definition for NVIC_ISER register  *******************/\r
2073 #define  NVIC_ISER_SETENA                    ((uint32_t)0xFFFFFFFF)        /*!< Interrupt set enable bits */\r
2074 #define  NVIC_ISER_SETENA_0                  ((uint32_t)0x00000001)        /*!< bit 0 */\r
2075 #define  NVIC_ISER_SETENA_1                  ((uint32_t)0x00000002)        /*!< bit 1 */\r
2076 #define  NVIC_ISER_SETENA_2                  ((uint32_t)0x00000004)        /*!< bit 2 */\r
2077 #define  NVIC_ISER_SETENA_3                  ((uint32_t)0x00000008)        /*!< bit 3 */\r
2078 #define  NVIC_ISER_SETENA_4                  ((uint32_t)0x00000010)        /*!< bit 4 */\r
2079 #define  NVIC_ISER_SETENA_5                  ((uint32_t)0x00000020)        /*!< bit 5 */\r
2080 #define  NVIC_ISER_SETENA_6                  ((uint32_t)0x00000040)        /*!< bit 6 */\r
2081 #define  NVIC_ISER_SETENA_7                  ((uint32_t)0x00000080)        /*!< bit 7 */\r
2082 #define  NVIC_ISER_SETENA_8                  ((uint32_t)0x00000100)        /*!< bit 8 */\r
2083 #define  NVIC_ISER_SETENA_9                  ((uint32_t)0x00000200)        /*!< bit 9 */\r
2084 #define  NVIC_ISER_SETENA_10                 ((uint32_t)0x00000400)        /*!< bit 10 */\r
2085 #define  NVIC_ISER_SETENA_11                 ((uint32_t)0x00000800)        /*!< bit 11 */\r
2086 #define  NVIC_ISER_SETENA_12                 ((uint32_t)0x00001000)        /*!< bit 12 */\r
2087 #define  NVIC_ISER_SETENA_13                 ((uint32_t)0x00002000)        /*!< bit 13 */\r
2088 #define  NVIC_ISER_SETENA_14                 ((uint32_t)0x00004000)        /*!< bit 14 */\r
2089 #define  NVIC_ISER_SETENA_15                 ((uint32_t)0x00008000)        /*!< bit 15 */\r
2090 #define  NVIC_ISER_SETENA_16                 ((uint32_t)0x00010000)        /*!< bit 16 */\r
2091 #define  NVIC_ISER_SETENA_17                 ((uint32_t)0x00020000)        /*!< bit 17 */\r
2092 #define  NVIC_ISER_SETENA_18                 ((uint32_t)0x00040000)        /*!< bit 18 */\r
2093 #define  NVIC_ISER_SETENA_19                 ((uint32_t)0x00080000)        /*!< bit 19 */\r
2094 #define  NVIC_ISER_SETENA_20                 ((uint32_t)0x00100000)        /*!< bit 20 */\r
2095 #define  NVIC_ISER_SETENA_21                 ((uint32_t)0x00200000)        /*!< bit 21 */\r
2096 #define  NVIC_ISER_SETENA_22                 ((uint32_t)0x00400000)        /*!< bit 22 */\r
2097 #define  NVIC_ISER_SETENA_23                 ((uint32_t)0x00800000)        /*!< bit 23 */\r
2098 #define  NVIC_ISER_SETENA_24                 ((uint32_t)0x01000000)        /*!< bit 24 */\r
2099 #define  NVIC_ISER_SETENA_25                 ((uint32_t)0x02000000)        /*!< bit 25 */\r
2100 #define  NVIC_ISER_SETENA_26                 ((uint32_t)0x04000000)        /*!< bit 26 */\r
2101 #define  NVIC_ISER_SETENA_27                 ((uint32_t)0x08000000)        /*!< bit 27 */\r
2102 #define  NVIC_ISER_SETENA_28                 ((uint32_t)0x10000000)        /*!< bit 28 */\r
2103 #define  NVIC_ISER_SETENA_29                 ((uint32_t)0x20000000)        /*!< bit 29 */\r
2104 #define  NVIC_ISER_SETENA_30                 ((uint32_t)0x40000000)        /*!< bit 30 */\r
2105 #define  NVIC_ISER_SETENA_31                 ((uint32_t)0x80000000)        /*!< bit 31 */\r
2106 \r
2107 /******************  Bit definition for NVIC_ICER register  *******************/\r
2108 #define  NVIC_ICER_CLRENA                   ((uint32_t)0xFFFFFFFF)        /*!< Interrupt clear-enable bits */\r
2109 #define  NVIC_ICER_CLRENA_0                  ((uint32_t)0x00000001)        /*!< bit 0 */\r
2110 #define  NVIC_ICER_CLRENA_1                  ((uint32_t)0x00000002)        /*!< bit 1 */\r
2111 #define  NVIC_ICER_CLRENA_2                  ((uint32_t)0x00000004)        /*!< bit 2 */\r
2112 #define  NVIC_ICER_CLRENA_3                  ((uint32_t)0x00000008)        /*!< bit 3 */\r
2113 #define  NVIC_ICER_CLRENA_4                  ((uint32_t)0x00000010)        /*!< bit 4 */\r
2114 #define  NVIC_ICER_CLRENA_5                  ((uint32_t)0x00000020)        /*!< bit 5 */\r
2115 #define  NVIC_ICER_CLRENA_6                  ((uint32_t)0x00000040)        /*!< bit 6 */\r
2116 #define  NVIC_ICER_CLRENA_7                  ((uint32_t)0x00000080)        /*!< bit 7 */\r
2117 #define  NVIC_ICER_CLRENA_8                  ((uint32_t)0x00000100)        /*!< bit 8 */\r
2118 #define  NVIC_ICER_CLRENA_9                  ((uint32_t)0x00000200)        /*!< bit 9 */\r
2119 #define  NVIC_ICER_CLRENA_10                 ((uint32_t)0x00000400)        /*!< bit 10 */\r
2120 #define  NVIC_ICER_CLRENA_11                 ((uint32_t)0x00000800)        /*!< bit 11 */\r
2121 #define  NVIC_ICER_CLRENA_12                 ((uint32_t)0x00001000)        /*!< bit 12 */\r
2122 #define  NVIC_ICER_CLRENA_13                 ((uint32_t)0x00002000)        /*!< bit 13 */\r
2123 #define  NVIC_ICER_CLRENA_14                 ((uint32_t)0x00004000)        /*!< bit 14 */\r
2124 #define  NVIC_ICER_CLRENA_15                 ((uint32_t)0x00008000)        /*!< bit 15 */\r
2125 #define  NVIC_ICER_CLRENA_16                 ((uint32_t)0x00010000)        /*!< bit 16 */\r
2126 #define  NVIC_ICER_CLRENA_17                 ((uint32_t)0x00020000)        /*!< bit 17 */\r
2127 #define  NVIC_ICER_CLRENA_18                 ((uint32_t)0x00040000)        /*!< bit 18 */\r
2128 #define  NVIC_ICER_CLRENA_19                 ((uint32_t)0x00080000)        /*!< bit 19 */\r
2129 #define  NVIC_ICER_CLRENA_20                 ((uint32_t)0x00100000)        /*!< bit 20 */\r
2130 #define  NVIC_ICER_CLRENA_21                 ((uint32_t)0x00200000)        /*!< bit 21 */\r
2131 #define  NVIC_ICER_CLRENA_22                 ((uint32_t)0x00400000)        /*!< bit 22 */\r
2132 #define  NVIC_ICER_CLRENA_23                 ((uint32_t)0x00800000)        /*!< bit 23 */\r
2133 #define  NVIC_ICER_CLRENA_24                 ((uint32_t)0x01000000)        /*!< bit 24 */\r
2134 #define  NVIC_ICER_CLRENA_25                 ((uint32_t)0x02000000)        /*!< bit 25 */\r
2135 #define  NVIC_ICER_CLRENA_26                 ((uint32_t)0x04000000)        /*!< bit 26 */\r
2136 #define  NVIC_ICER_CLRENA_27                 ((uint32_t)0x08000000)        /*!< bit 27 */\r
2137 #define  NVIC_ICER_CLRENA_28                 ((uint32_t)0x10000000)        /*!< bit 28 */\r
2138 #define  NVIC_ICER_CLRENA_29                 ((uint32_t)0x20000000)        /*!< bit 29 */\r
2139 #define  NVIC_ICER_CLRENA_30                 ((uint32_t)0x40000000)        /*!< bit 30 */\r
2140 #define  NVIC_ICER_CLRENA_31                 ((uint32_t)0x80000000)        /*!< bit 31 */\r
2141 \r
2142 /******************  Bit definition for NVIC_ISPR register  *******************/\r
2143 #define  NVIC_ISPR_SETPEND                   ((uint32_t)0xFFFFFFFF)        /*!< Interrupt set-pending bits */\r
2144 #define  NVIC_ISPR_SETPEND_0                 ((uint32_t)0x00000001)        /*!< bit 0 */\r
2145 #define  NVIC_ISPR_SETPEND_1                 ((uint32_t)0x00000002)        /*!< bit 1 */\r
2146 #define  NVIC_ISPR_SETPEND_2                 ((uint32_t)0x00000004)        /*!< bit 2 */\r
2147 #define  NVIC_ISPR_SETPEND_3                 ((uint32_t)0x00000008)        /*!< bit 3 */\r
2148 #define  NVIC_ISPR_SETPEND_4                 ((uint32_t)0x00000010)        /*!< bit 4 */\r
2149 #define  NVIC_ISPR_SETPEND_5                 ((uint32_t)0x00000020)        /*!< bit 5 */\r
2150 #define  NVIC_ISPR_SETPEND_6                 ((uint32_t)0x00000040)        /*!< bit 6 */\r
2151 #define  NVIC_ISPR_SETPEND_7                 ((uint32_t)0x00000080)        /*!< bit 7 */\r
2152 #define  NVIC_ISPR_SETPEND_8                 ((uint32_t)0x00000100)        /*!< bit 8 */\r
2153 #define  NVIC_ISPR_SETPEND_9                 ((uint32_t)0x00000200)        /*!< bit 9 */\r
2154 #define  NVIC_ISPR_SETPEND_10                ((uint32_t)0x00000400)        /*!< bit 10 */\r
2155 #define  NVIC_ISPR_SETPEND_11                ((uint32_t)0x00000800)        /*!< bit 11 */\r
2156 #define  NVIC_ISPR_SETPEND_12                ((uint32_t)0x00001000)        /*!< bit 12 */\r
2157 #define  NVIC_ISPR_SETPEND_13                ((uint32_t)0x00002000)        /*!< bit 13 */\r
2158 #define  NVIC_ISPR_SETPEND_14                ((uint32_t)0x00004000)        /*!< bit 14 */\r
2159 #define  NVIC_ISPR_SETPEND_15                ((uint32_t)0x00008000)        /*!< bit 15 */\r
2160 #define  NVIC_ISPR_SETPEND_16                ((uint32_t)0x00010000)        /*!< bit 16 */\r
2161 #define  NVIC_ISPR_SETPEND_17                ((uint32_t)0x00020000)        /*!< bit 17 */\r
2162 #define  NVIC_ISPR_SETPEND_18                ((uint32_t)0x00040000)        /*!< bit 18 */\r
2163 #define  NVIC_ISPR_SETPEND_19                ((uint32_t)0x00080000)        /*!< bit 19 */\r
2164 #define  NVIC_ISPR_SETPEND_20                ((uint32_t)0x00100000)        /*!< bit 20 */\r
2165 #define  NVIC_ISPR_SETPEND_21                ((uint32_t)0x00200000)        /*!< bit 21 */\r
2166 #define  NVIC_ISPR_SETPEND_22                ((uint32_t)0x00400000)        /*!< bit 22 */\r
2167 #define  NVIC_ISPR_SETPEND_23                ((uint32_t)0x00800000)        /*!< bit 23 */\r
2168 #define  NVIC_ISPR_SETPEND_24                ((uint32_t)0x01000000)        /*!< bit 24 */\r
2169 #define  NVIC_ISPR_SETPEND_25                ((uint32_t)0x02000000)        /*!< bit 25 */\r
2170 #define  NVIC_ISPR_SETPEND_26                ((uint32_t)0x04000000)        /*!< bit 26 */\r
2171 #define  NVIC_ISPR_SETPEND_27                ((uint32_t)0x08000000)        /*!< bit 27 */\r
2172 #define  NVIC_ISPR_SETPEND_28                ((uint32_t)0x10000000)        /*!< bit 28 */\r
2173 #define  NVIC_ISPR_SETPEND_29                ((uint32_t)0x20000000)        /*!< bit 29 */\r
2174 #define  NVIC_ISPR_SETPEND_30                ((uint32_t)0x40000000)        /*!< bit 30 */\r
2175 #define  NVIC_ISPR_SETPEND_31                ((uint32_t)0x80000000)        /*!< bit 31 */\r
2176 \r
2177 /******************  Bit definition for NVIC_ICPR register  *******************/\r
2178 #define  NVIC_ICPR_CLRPEND                   ((uint32_t)0xFFFFFFFF)        /*!< Interrupt clear-pending bits */\r
2179 #define  NVIC_ICPR_CLRPEND_0                 ((uint32_t)0x00000001)        /*!< bit 0 */\r
2180 #define  NVIC_ICPR_CLRPEND_1                 ((uint32_t)0x00000002)        /*!< bit 1 */\r
2181 #define  NVIC_ICPR_CLRPEND_2                 ((uint32_t)0x00000004)        /*!< bit 2 */\r
2182 #define  NVIC_ICPR_CLRPEND_3                 ((uint32_t)0x00000008)        /*!< bit 3 */\r
2183 #define  NVIC_ICPR_CLRPEND_4                 ((uint32_t)0x00000010)        /*!< bit 4 */\r
2184 #define  NVIC_ICPR_CLRPEND_5                 ((uint32_t)0x00000020)        /*!< bit 5 */\r
2185 #define  NVIC_ICPR_CLRPEND_6                 ((uint32_t)0x00000040)        /*!< bit 6 */\r
2186 #define  NVIC_ICPR_CLRPEND_7                 ((uint32_t)0x00000080)        /*!< bit 7 */\r
2187 #define  NVIC_ICPR_CLRPEND_8                 ((uint32_t)0x00000100)        /*!< bit 8 */\r
2188 #define  NVIC_ICPR_CLRPEND_9                 ((uint32_t)0x00000200)        /*!< bit 9 */\r
2189 #define  NVIC_ICPR_CLRPEND_10                ((uint32_t)0x00000400)        /*!< bit 10 */\r
2190 #define  NVIC_ICPR_CLRPEND_11                ((uint32_t)0x00000800)        /*!< bit 11 */\r
2191 #define  NVIC_ICPR_CLRPEND_12                ((uint32_t)0x00001000)        /*!< bit 12 */\r
2192 #define  NVIC_ICPR_CLRPEND_13                ((uint32_t)0x00002000)        /*!< bit 13 */\r
2193 #define  NVIC_ICPR_CLRPEND_14                ((uint32_t)0x00004000)        /*!< bit 14 */\r
2194 #define  NVIC_ICPR_CLRPEND_15                ((uint32_t)0x00008000)        /*!< bit 15 */\r
2195 #define  NVIC_ICPR_CLRPEND_16                ((uint32_t)0x00010000)        /*!< bit 16 */\r
2196 #define  NVIC_ICPR_CLRPEND_17                ((uint32_t)0x00020000)        /*!< bit 17 */\r
2197 #define  NVIC_ICPR_CLRPEND_18                ((uint32_t)0x00040000)        /*!< bit 18 */\r
2198 #define  NVIC_ICPR_CLRPEND_19                ((uint32_t)0x00080000)        /*!< bit 19 */\r
2199 #define  NVIC_ICPR_CLRPEND_20                ((uint32_t)0x00100000)        /*!< bit 20 */\r
2200 #define  NVIC_ICPR_CLRPEND_21                ((uint32_t)0x00200000)        /*!< bit 21 */\r
2201 #define  NVIC_ICPR_CLRPEND_22                ((uint32_t)0x00400000)        /*!< bit 22 */\r
2202 #define  NVIC_ICPR_CLRPEND_23                ((uint32_t)0x00800000)        /*!< bit 23 */\r
2203 #define  NVIC_ICPR_CLRPEND_24                ((uint32_t)0x01000000)        /*!< bit 24 */\r
2204 #define  NVIC_ICPR_CLRPEND_25                ((uint32_t)0x02000000)        /*!< bit 25 */\r
2205 #define  NVIC_ICPR_CLRPEND_26                ((uint32_t)0x04000000)        /*!< bit 26 */\r
2206 #define  NVIC_ICPR_CLRPEND_27                ((uint32_t)0x08000000)        /*!< bit 27 */\r
2207 #define  NVIC_ICPR_CLRPEND_28                ((uint32_t)0x10000000)        /*!< bit 28 */\r
2208 #define  NVIC_ICPR_CLRPEND_29                ((uint32_t)0x20000000)        /*!< bit 29 */\r
2209 #define  NVIC_ICPR_CLRPEND_30                ((uint32_t)0x40000000)        /*!< bit 30 */\r
2210 #define  NVIC_ICPR_CLRPEND_31                ((uint32_t)0x80000000)        /*!< bit 31 */\r
2211 \r
2212 /******************  Bit definition for NVIC_IABR register  *******************/\r
2213 #define  NVIC_IABR_ACTIVE                    ((uint32_t)0xFFFFFFFF)        /*!< Interrupt active flags */\r
2214 #define  NVIC_IABR_ACTIVE_0                  ((uint32_t)0x00000001)        /*!< bit 0 */\r
2215 #define  NVIC_IABR_ACTIVE_1                  ((uint32_t)0x00000002)        /*!< bit 1 */\r
2216 #define  NVIC_IABR_ACTIVE_2                  ((uint32_t)0x00000004)        /*!< bit 2 */\r
2217 #define  NVIC_IABR_ACTIVE_3                  ((uint32_t)0x00000008)        /*!< bit 3 */\r
2218 #define  NVIC_IABR_ACTIVE_4                  ((uint32_t)0x00000010)        /*!< bit 4 */\r
2219 #define  NVIC_IABR_ACTIVE_5                  ((uint32_t)0x00000020)        /*!< bit 5 */\r
2220 #define  NVIC_IABR_ACTIVE_6                  ((uint32_t)0x00000040)        /*!< bit 6 */\r
2221 #define  NVIC_IABR_ACTIVE_7                  ((uint32_t)0x00000080)        /*!< bit 7 */\r
2222 #define  NVIC_IABR_ACTIVE_8                  ((uint32_t)0x00000100)        /*!< bit 8 */\r
2223 #define  NVIC_IABR_ACTIVE_9                  ((uint32_t)0x00000200)        /*!< bit 9 */\r
2224 #define  NVIC_IABR_ACTIVE_10                 ((uint32_t)0x00000400)        /*!< bit 10 */\r
2225 #define  NVIC_IABR_ACTIVE_11                 ((uint32_t)0x00000800)        /*!< bit 11 */\r
2226 #define  NVIC_IABR_ACTIVE_12                 ((uint32_t)0x00001000)        /*!< bit 12 */\r
2227 #define  NVIC_IABR_ACTIVE_13                 ((uint32_t)0x00002000)        /*!< bit 13 */\r
2228 #define  NVIC_IABR_ACTIVE_14                 ((uint32_t)0x00004000)        /*!< bit 14 */\r
2229 #define  NVIC_IABR_ACTIVE_15                 ((uint32_t)0x00008000)        /*!< bit 15 */\r
2230 #define  NVIC_IABR_ACTIVE_16                 ((uint32_t)0x00010000)        /*!< bit 16 */\r
2231 #define  NVIC_IABR_ACTIVE_17                 ((uint32_t)0x00020000)        /*!< bit 17 */\r
2232 #define  NVIC_IABR_ACTIVE_18                 ((uint32_t)0x00040000)        /*!< bit 18 */\r
2233 #define  NVIC_IABR_ACTIVE_19                 ((uint32_t)0x00080000)        /*!< bit 19 */\r
2234 #define  NVIC_IABR_ACTIVE_20                 ((uint32_t)0x00100000)        /*!< bit 20 */\r
2235 #define  NVIC_IABR_ACTIVE_21                 ((uint32_t)0x00200000)        /*!< bit 21 */\r
2236 #define  NVIC_IABR_ACTIVE_22                 ((uint32_t)0x00400000)        /*!< bit 22 */\r
2237 #define  NVIC_IABR_ACTIVE_23                 ((uint32_t)0x00800000)        /*!< bit 23 */\r
2238 #define  NVIC_IABR_ACTIVE_24                 ((uint32_t)0x01000000)        /*!< bit 24 */\r
2239 #define  NVIC_IABR_ACTIVE_25                 ((uint32_t)0x02000000)        /*!< bit 25 */\r
2240 #define  NVIC_IABR_ACTIVE_26                 ((uint32_t)0x04000000)        /*!< bit 26 */\r
2241 #define  NVIC_IABR_ACTIVE_27                 ((uint32_t)0x08000000)        /*!< bit 27 */\r
2242 #define  NVIC_IABR_ACTIVE_28                 ((uint32_t)0x10000000)        /*!< bit 28 */\r
2243 #define  NVIC_IABR_ACTIVE_29                 ((uint32_t)0x20000000)        /*!< bit 29 */\r
2244 #define  NVIC_IABR_ACTIVE_30                 ((uint32_t)0x40000000)        /*!< bit 30 */\r
2245 #define  NVIC_IABR_ACTIVE_31                 ((uint32_t)0x80000000)        /*!< bit 31 */\r
2246 \r
2247 /******************  Bit definition for NVIC_PRI0 register  *******************/\r
2248 #define  NVIC_IPR0_PRI_0                     ((uint32_t)0x000000FF)        /*!< Priority of interrupt 0 */\r
2249 #define  NVIC_IPR0_PRI_1                     ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 1 */\r
2250 #define  NVIC_IPR0_PRI_2                     ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 2 */\r
2251 #define  NVIC_IPR0_PRI_3                     ((uint32_t)0xFF000000)        /*!< Priority of interrupt 3 */\r
2252 \r
2253 /******************  Bit definition for NVIC_PRI1 register  *******************/\r
2254 #define  NVIC_IPR1_PRI_4                     ((uint32_t)0x000000FF)        /*!< Priority of interrupt 4 */\r
2255 #define  NVIC_IPR1_PRI_5                     ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 5 */\r
2256 #define  NVIC_IPR1_PRI_6                     ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 6 */\r
2257 #define  NVIC_IPR1_PRI_7                     ((uint32_t)0xFF000000)        /*!< Priority of interrupt 7 */\r
2258 \r
2259 /******************  Bit definition for NVIC_PRI2 register  *******************/\r
2260 #define  NVIC_IPR2_PRI_8                     ((uint32_t)0x000000FF)        /*!< Priority of interrupt 8 */\r
2261 #define  NVIC_IPR2_PRI_9                     ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 9 */\r
2262 #define  NVIC_IPR2_PRI_10                    ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 10 */\r
2263 #define  NVIC_IPR2_PRI_11                    ((uint32_t)0xFF000000)        /*!< Priority of interrupt 11 */\r
2264 \r
2265 /******************  Bit definition for NVIC_PRI3 register  *******************/\r
2266 #define  NVIC_IPR3_PRI_12                    ((uint32_t)0x000000FF)        /*!< Priority of interrupt 12 */\r
2267 #define  NVIC_IPR3_PRI_13                    ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 13 */\r
2268 #define  NVIC_IPR3_PRI_14                    ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 14 */\r
2269 #define  NVIC_IPR3_PRI_15                    ((uint32_t)0xFF000000)        /*!< Priority of interrupt 15 */\r
2270 \r
2271 /******************  Bit definition for NVIC_PRI4 register  *******************/\r
2272 #define  NVIC_IPR4_PRI_16                    ((uint32_t)0x000000FF)        /*!< Priority of interrupt 16 */\r
2273 #define  NVIC_IPR4_PRI_17                    ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 17 */\r
2274 #define  NVIC_IPR4_PRI_18                    ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 18 */\r
2275 #define  NVIC_IPR4_PRI_19                    ((uint32_t)0xFF000000)        /*!< Priority of interrupt 19 */\r
2276 \r
2277 /******************  Bit definition for NVIC_PRI5 register  *******************/\r
2278 #define  NVIC_IPR5_PRI_20                    ((uint32_t)0x000000FF)        /*!< Priority of interrupt 20 */\r
2279 #define  NVIC_IPR5_PRI_21                    ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 21 */\r
2280 #define  NVIC_IPR5_PRI_22                    ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 22 */\r
2281 #define  NVIC_IPR5_PRI_23                    ((uint32_t)0xFF000000)        /*!< Priority of interrupt 23 */\r
2282 \r
2283 /******************  Bit definition for NVIC_PRI6 register  *******************/\r
2284 #define  NVIC_IPR6_PRI_24                    ((uint32_t)0x000000FF)        /*!< Priority of interrupt 24 */\r
2285 #define  NVIC_IPR6_PRI_25                    ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 25 */\r
2286 #define  NVIC_IPR6_PRI_26                    ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 26 */\r
2287 #define  NVIC_IPR6_PRI_27                    ((uint32_t)0xFF000000)        /*!< Priority of interrupt 27 */\r
2288 \r
2289 /******************  Bit definition for NVIC_PRI7 register  *******************/\r
2290 #define  NVIC_IPR7_PRI_28                    ((uint32_t)0x000000FF)        /*!< Priority of interrupt 28 */\r
2291 #define  NVIC_IPR7_PRI_29                    ((uint32_t)0x0000FF00)        /*!< Priority of interrupt 29 */\r
2292 #define  NVIC_IPR7_PRI_30                    ((uint32_t)0x00FF0000)        /*!< Priority of interrupt 30 */\r
2293 #define  NVIC_IPR7_PRI_31                    ((uint32_t)0xFF000000)        /*!< Priority of interrupt 31 */\r
2294 \r
2295 /******************  Bit definition for SCB_CPUID register  *******************/\r
2296 #define  SCB_CPUID_REVISION                  ((uint32_t)0x0000000F)        /*!< Implementation defined revision number */\r
2297 #define  SCB_CPUID_PARTNO                    ((uint32_t)0x0000FFF0)        /*!< Number of processor within family */\r
2298 #define  SCB_CPUID_Constant                  ((uint32_t)0x000F0000)        /*!< Reads as 0x0F */\r
2299 #define  SCB_CPUID_VARIANT                   ((uint32_t)0x00F00000)        /*!< Implementation defined variant number */\r
2300 #define  SCB_CPUID_IMPLEMENTER               ((uint32_t)0xFF000000)        /*!< Implementer code. ARM is 0x41 */\r
2301 \r
2302 /*******************  Bit definition for SCB_ICSR register  *******************/\r
2303 #define  SCB_ICSR_VECTACTIVE                 ((uint32_t)0x000001FF)        /*!< Active ISR number field */\r
2304 #define  SCB_ICSR_RETTOBASE                  ((uint32_t)0x00000800)        /*!< All active exceptions minus the IPSR_current_exception yields the empty set */\r
2305 #define  SCB_ICSR_VECTPENDING                ((uint32_t)0x003FF000)        /*!< Pending ISR number field */\r
2306 #define  SCB_ICSR_ISRPENDING                 ((uint32_t)0x00400000)        /*!< Interrupt pending flag */\r
2307 #define  SCB_ICSR_ISRPREEMPT                 ((uint32_t)0x00800000)        /*!< It indicates that a pending interrupt becomes active in the next running cycle */\r
2308 #define  SCB_ICSR_PENDSTCLR                  ((uint32_t)0x02000000)        /*!< Clear pending SysTick bit */\r
2309 #define  SCB_ICSR_PENDSTSET                  ((uint32_t)0x04000000)        /*!< Set pending SysTick bit */\r
2310 #define  SCB_ICSR_PENDSVCLR                  ((uint32_t)0x08000000)        /*!< Clear pending pendSV bit */\r
2311 #define  SCB_ICSR_PENDSVSET                  ((uint32_t)0x10000000)        /*!< Set pending pendSV bit */\r
2312 #define  SCB_ICSR_NMIPENDSET                 ((uint32_t)0x80000000)        /*!< Set pending NMI bit */\r
2313 \r
2314 /*******************  Bit definition for SCB_VTOR register  *******************/\r
2315 #define  SCB_VTOR_TBLOFF                     ((uint32_t)0x1FFFFF80)        /*!< Vector table base offset field */\r
2316 #define  SCB_VTOR_TBLBASE                    ((uint32_t)0x20000000)        /*!< Table base in code(0) or RAM(1) */\r
2317 \r
2318 /*!<*****************  Bit definition for SCB_AIRCR register  *******************/\r
2319 #define  SCB_AIRCR_VECTRESET                 ((uint32_t)0x00000001)        /*!< System Reset bit */\r
2320 #define  SCB_AIRCR_VECTCLRACTIVE             ((uint32_t)0x00000002)        /*!< Clear active vector bit */\r
2321 #define  SCB_AIRCR_SYSRESETREQ               ((uint32_t)0x00000004)        /*!< Requests chip control logic to generate a reset */\r
2322 \r
2323 #define  SCB_AIRCR_PRIGROUP                  ((uint32_t)0x00000700)        /*!< PRIGROUP[2:0] bits (Priority group) */\r
2324 #define  SCB_AIRCR_PRIGROUP_0                ((uint32_t)0x00000100)        /*!< Bit 0 */\r
2325 #define  SCB_AIRCR_PRIGROUP_1                ((uint32_t)0x00000200)        /*!< Bit 1 */\r
2326 #define  SCB_AIRCR_PRIGROUP_2                ((uint32_t)0x00000400)        /*!< Bit 2  */\r
2327 \r
2328 /* prority group configuration */\r
2329 #define  SCB_AIRCR_PRIGROUP0                 ((uint32_t)0x00000000)        /*!< Priority group=0 (7 bits of pre-emption priority, 1 bit of subpriority) */\r
2330 #define  SCB_AIRCR_PRIGROUP1                 ((uint32_t)0x00000100)        /*!< Priority group=1 (6 bits of pre-emption priority, 2 bits of subpriority) */\r
2331 #define  SCB_AIRCR_PRIGROUP2                 ((uint32_t)0x00000200)        /*!< Priority group=2 (5 bits of pre-emption priority, 3 bits of subpriority) */\r
2332 #define  SCB_AIRCR_PRIGROUP3                 ((uint32_t)0x00000300)        /*!< Priority group=3 (4 bits of pre-emption priority, 4 bits of subpriority) */\r
2333 #define  SCB_AIRCR_PRIGROUP4                 ((uint32_t)0x00000400)        /*!< Priority group=4 (3 bits of pre-emption priority, 5 bits of subpriority) */\r
2334 #define  SCB_AIRCR_PRIGROUP5                 ((uint32_t)0x00000500)        /*!< Priority group=5 (2 bits of pre-emption priority, 6 bits of subpriority) */\r
2335 #define  SCB_AIRCR_PRIGROUP6                 ((uint32_t)0x00000600)        /*!< Priority group=6 (1 bit of pre-emption priority, 7 bits of subpriority) */\r
2336 #define  SCB_AIRCR_PRIGROUP7                 ((uint32_t)0x00000700)        /*!< Priority group=7 (no pre-emption priority, 8 bits of subpriority) */\r
2337 \r
2338 #define  SCB_AIRCR_ENDIANESS                 ((uint32_t)0x00008000)        /*!< Data endianness bit */\r
2339 #define  SCB_AIRCR_VECTKEY                   ((uint32_t)0xFFFF0000)        /*!< Register key (VECTKEY) - Reads as 0xFA05 (VECTKEYSTAT) */\r
2340 \r
2341 /*******************  Bit definition for SCB_SCR register  ********************/\r
2342 #define  SCB_SCR_SLEEPONEXIT                 ((uint8_t)0x02)               /*!< Sleep on exit bit */\r
2343 #define  SCB_SCR_SLEEPDEEP                   ((uint8_t)0x04)               /*!< Sleep deep bit */\r
2344 #define  SCB_SCR_SEVONPEND                   ((uint8_t)0x10)               /*!< Wake up from WFE */\r
2345 \r
2346 /********************  Bit definition for SCB_CCR register  *******************/\r
2347 #define  SCB_CCR_NONBASETHRDENA              ((uint16_t)0x0001)            /*!< Thread mode can be entered from any level in Handler mode by controlled return value */\r
2348 #define  SCB_CCR_USERSETMPEND                ((uint16_t)0x0002)            /*!< Enables user code to write the Software Trigger Interrupt register to trigger (pend) a Main exception */\r
2349 #define  SCB_CCR_UNALIGN_TRP                 ((uint16_t)0x0008)            /*!< Trap for unaligned access */\r
2350 #define  SCB_CCR_DIV_0_TRP                   ((uint16_t)0x0010)            /*!< Trap on Divide by 0 */\r
2351 #define  SCB_CCR_BFHFNMIGN                   ((uint16_t)0x0100)            /*!< Handlers running at priority -1 and -2 */\r
2352 #define  SCB_CCR_STKALIGN                    ((uint16_t)0x0200)            /*!< On exception entry, the SP used prior to the exception is adjusted to be 8-byte aligned */\r
2353 \r
2354 /*******************  Bit definition for SCB_SHPR register ********************/\r
2355 #define  SCB_SHPR_PRI_N                      ((uint32_t)0x000000FF)        /*!< Priority of system handler 4,8, and 12. Mem Manage, reserved and Debug Monitor */\r
2356 #define  SCB_SHPR_PRI_N1                     ((uint32_t)0x0000FF00)        /*!< Priority of system handler 5,9, and 13. Bus Fault, reserved and reserved */\r
2357 #define  SCB_SHPR_PRI_N2                     ((uint32_t)0x00FF0000)        /*!< Priority of system handler 6,10, and 14. Usage Fault, reserved and PendSV */\r
2358 #define  SCB_SHPR_PRI_N3                     ((uint32_t)0xFF000000)        /*!< Priority of system handler 7,11, and 15. Reserved, SVCall and SysTick */\r
2359 \r
2360 /******************  Bit definition for SCB_SHCSR register  *******************/\r
2361 #define  SCB_SHCSR_MEMFAULTACT               ((uint32_t)0x00000001)        /*!< MemManage is active */\r
2362 #define  SCB_SHCSR_BUSFAULTACT               ((uint32_t)0x00000002)        /*!< BusFault is active */\r
2363 #define  SCB_SHCSR_USGFAULTACT               ((uint32_t)0x00000008)        /*!< UsageFault is active */\r
2364 #define  SCB_SHCSR_SVCALLACT                 ((uint32_t)0x00000080)        /*!< SVCall is active */\r
2365 #define  SCB_SHCSR_MONITORACT                ((uint32_t)0x00000100)        /*!< Monitor is active */\r
2366 #define  SCB_SHCSR_PENDSVACT                 ((uint32_t)0x00000400)        /*!< PendSV is active */\r
2367 #define  SCB_SHCSR_SYSTICKACT                ((uint32_t)0x00000800)        /*!< SysTick is active */\r
2368 #define  SCB_SHCSR_USGFAULTPENDED            ((uint32_t)0x00001000)        /*!< Usage Fault is pended */\r
2369 #define  SCB_SHCSR_MEMFAULTPENDED            ((uint32_t)0x00002000)        /*!< MemManage is pended */\r
2370 #define  SCB_SHCSR_BUSFAULTPENDED            ((uint32_t)0x00004000)        /*!< Bus Fault is pended */\r
2371 #define  SCB_SHCSR_SVCALLPENDED              ((uint32_t)0x00008000)        /*!< SVCall is pended */\r
2372 #define  SCB_SHCSR_MEMFAULTENA               ((uint32_t)0x00010000)        /*!< MemManage enable */\r
2373 #define  SCB_SHCSR_BUSFAULTENA               ((uint32_t)0x00020000)        /*!< Bus Fault enable */\r
2374 #define  SCB_SHCSR_USGFAULTENA               ((uint32_t)0x00040000)        /*!< UsageFault enable */\r
2375 \r
2376 /*******************  Bit definition for SCB_CFSR register  *******************/\r
2377 /*!< MFSR */\r
2378 #define  SCB_CFSR_IACCVIOL                   ((uint32_t)0x00000001)        /*!< Instruction access violation */\r
2379 #define  SCB_CFSR_DACCVIOL                   ((uint32_t)0x00000002)        /*!< Data access violation */\r
2380 #define  SCB_CFSR_MUNSTKERR                  ((uint32_t)0x00000008)        /*!< Unstacking error */\r
2381 #define  SCB_CFSR_MSTKERR                    ((uint32_t)0x00000010)        /*!< Stacking error */\r
2382 #define  SCB_CFSR_MMARVALID                  ((uint32_t)0x00000080)        /*!< Memory Manage Address Register address valid flag */\r
2383 /*!< BFSR */\r
2384 #define  SCB_CFSR_IBUSERR                    ((uint32_t)0x00000100)        /*!< Instruction bus error flag */\r
2385 #define  SCB_CFSR_PRECISERR                  ((uint32_t)0x00000200)        /*!< Precise data bus error */\r
2386 #define  SCB_CFSR_IMPRECISERR                ((uint32_t)0x00000400)        /*!< Imprecise data bus error */\r
2387 #define  SCB_CFSR_UNSTKERR                   ((uint32_t)0x00000800)        /*!< Unstacking error */\r
2388 #define  SCB_CFSR_STKERR                     ((uint32_t)0x00001000)        /*!< Stacking error */\r
2389 #define  SCB_CFSR_BFARVALID                  ((uint32_t)0x00008000)        /*!< Bus Fault Address Register address valid flag */\r
2390 /*!< UFSR */\r
2391 #define  SCB_CFSR_UNDEFINSTR                 ((uint32_t)0x00010000)        /*!< The processor attempt to excecute an undefined instruction */\r
2392 #define  SCB_CFSR_INVSTATE                   ((uint32_t)0x00020000)        /*!< Invalid combination of EPSR and instruction */\r
2393 #define  SCB_CFSR_INVPC                      ((uint32_t)0x00040000)        /*!< Attempt to load EXC_RETURN into pc illegally */\r
2394 #define  SCB_CFSR_NOCP                       ((uint32_t)0x00080000)        /*!< Attempt to use a coprocessor instruction */\r
2395 #define  SCB_CFSR_UNALIGNED                  ((uint32_t)0x01000000)        /*!< Fault occurs when there is an attempt to make an unaligned memory access */\r
2396 #define  SCB_CFSR_DIVBYZERO                  ((uint32_t)0x02000000)        /*!< Fault occurs when SDIV or DIV instruction is used with a divisor of 0 */\r
2397 \r
2398 /*******************  Bit definition for SCB_HFSR register  *******************/\r
2399 #define  SCB_HFSR_VECTTBL                    ((uint32_t)0x00000002)        /*!< Fault occures because of vector table read on exception processing */\r
2400 #define  SCB_HFSR_FORCED                     ((uint32_t)0x40000000)        /*!< Hard Fault activated when a configurable Fault was received and cannot activate */\r
2401 #define  SCB_HFSR_DEBUGEVT                   ((uint32_t)0x80000000)        /*!< Fault related to debug */\r
2402 \r
2403 /*******************  Bit definition for SCB_DFSR register  *******************/\r
2404 #define  SCB_DFSR_HALTED                     ((uint8_t)0x01)               /*!< Halt request flag */\r
2405 #define  SCB_DFSR_BKPT                       ((uint8_t)0x02)               /*!< BKPT flag */\r
2406 #define  SCB_DFSR_DWTTRAP                    ((uint8_t)0x04)               /*!< Data Watchpoint and Trace (DWT) flag */\r
2407 #define  SCB_DFSR_VCATCH                     ((uint8_t)0x08)               /*!< Vector catch flag */\r
2408 #define  SCB_DFSR_EXTERNAL                   ((uint8_t)0x10)               /*!< External debug request flag */\r
2409 \r
2410 /*******************  Bit definition for SCB_MMFAR register  ******************/\r
2411 #define  SCB_MMFAR_ADDRESS                   ((uint32_t)0xFFFFFFFF)        /*!< Mem Manage fault address field */\r
2412 \r
2413 /*******************  Bit definition for SCB_BFAR register  *******************/\r
2414 #define  SCB_BFAR_ADDRESS                    ((uint32_t)0xFFFFFFFF)        /*!< Bus fault address field */\r
2415 \r
2416 /*******************  Bit definition for SCB_afsr register  *******************/\r
2417 #define  SCB_AFSR_IMPDEF                     ((uint32_t)0xFFFFFFFF)        /*!< Implementation defined */\r
2418 \r
2419 /******************************************************************************/\r
2420 /*                                                                            */\r
2421 /*                    External Interrupt/Event Controller                     */\r
2422 /*                                                                            */\r
2423 /******************************************************************************/\r
2424 \r
2425 /*******************  Bit definition for EXTI_IMR register  *******************/\r
2426 #define  EXTI_IMR_MR0                        ((uint32_t)0x00000001)        /*!< Interrupt Mask on line 0 */\r
2427 #define  EXTI_IMR_MR1                        ((uint32_t)0x00000002)        /*!< Interrupt Mask on line 1 */\r
2428 #define  EXTI_IMR_MR2                        ((uint32_t)0x00000004)        /*!< Interrupt Mask on line 2 */\r
2429 #define  EXTI_IMR_MR3                        ((uint32_t)0x00000008)        /*!< Interrupt Mask on line 3 */\r
2430 #define  EXTI_IMR_MR4                        ((uint32_t)0x00000010)        /*!< Interrupt Mask on line 4 */\r
2431 #define  EXTI_IMR_MR5                        ((uint32_t)0x00000020)        /*!< Interrupt Mask on line 5 */\r
2432 #define  EXTI_IMR_MR6                        ((uint32_t)0x00000040)        /*!< Interrupt Mask on line 6 */\r
2433 #define  EXTI_IMR_MR7                        ((uint32_t)0x00000080)        /*!< Interrupt Mask on line 7 */\r
2434 #define  EXTI_IMR_MR8                        ((uint32_t)0x00000100)        /*!< Interrupt Mask on line 8 */\r
2435 #define  EXTI_IMR_MR9                        ((uint32_t)0x00000200)        /*!< Interrupt Mask on line 9 */\r
2436 #define  EXTI_IMR_MR10                       ((uint32_t)0x00000400)        /*!< Interrupt Mask on line 10 */\r
2437 #define  EXTI_IMR_MR11                       ((uint32_t)0x00000800)        /*!< Interrupt Mask on line 11 */\r
2438 #define  EXTI_IMR_MR12                       ((uint32_t)0x00001000)        /*!< Interrupt Mask on line 12 */\r
2439 #define  EXTI_IMR_MR13                       ((uint32_t)0x00002000)        /*!< Interrupt Mask on line 13 */\r
2440 #define  EXTI_IMR_MR14                       ((uint32_t)0x00004000)        /*!< Interrupt Mask on line 14 */\r
2441 #define  EXTI_IMR_MR15                       ((uint32_t)0x00008000)        /*!< Interrupt Mask on line 15 */\r
2442 #define  EXTI_IMR_MR16                       ((uint32_t)0x00010000)        /*!< Interrupt Mask on line 16 */\r
2443 #define  EXTI_IMR_MR17                       ((uint32_t)0x00020000)        /*!< Interrupt Mask on line 17 */\r
2444 #define  EXTI_IMR_MR18                       ((uint32_t)0x00040000)        /*!< Interrupt Mask on line 18 */\r
2445 \r
2446 /*******************  Bit definition for EXTI_EMR register  *******************/\r
2447 #define  EXTI_EMR_MR0                        ((uint32_t)0x00000001)        /*!< Event Mask on line 0 */\r
2448 #define  EXTI_EMR_MR1                        ((uint32_t)0x00000002)        /*!< Event Mask on line 1 */\r
2449 #define  EXTI_EMR_MR2                        ((uint32_t)0x00000004)        /*!< Event Mask on line 2 */\r
2450 #define  EXTI_EMR_MR3                        ((uint32_t)0x00000008)        /*!< Event Mask on line 3 */\r
2451 #define  EXTI_EMR_MR4                        ((uint32_t)0x00000010)        /*!< Event Mask on line 4 */\r
2452 #define  EXTI_EMR_MR5                        ((uint32_t)0x00000020)        /*!< Event Mask on line 5 */\r
2453 #define  EXTI_EMR_MR6                        ((uint32_t)0x00000040)        /*!< Event Mask on line 6 */\r
2454 #define  EXTI_EMR_MR7                        ((uint32_t)0x00000080)        /*!< Event Mask on line 7 */\r
2455 #define  EXTI_EMR_MR8                        ((uint32_t)0x00000100)        /*!< Event Mask on line 8 */\r
2456 #define  EXTI_EMR_MR9                        ((uint32_t)0x00000200)        /*!< Event Mask on line 9 */\r
2457 #define  EXTI_EMR_MR10                       ((uint32_t)0x00000400)        /*!< Event Mask on line 10 */\r
2458 #define  EXTI_EMR_MR11                       ((uint32_t)0x00000800)        /*!< Event Mask on line 11 */\r
2459 #define  EXTI_EMR_MR12                       ((uint32_t)0x00001000)        /*!< Event Mask on line 12 */\r
2460 #define  EXTI_EMR_MR13                       ((uint32_t)0x00002000)        /*!< Event Mask on line 13 */\r
2461 #define  EXTI_EMR_MR14                       ((uint32_t)0x00004000)        /*!< Event Mask on line 14 */\r
2462 #define  EXTI_EMR_MR15                       ((uint32_t)0x00008000)        /*!< Event Mask on line 15 */\r
2463 #define  EXTI_EMR_MR16                       ((uint32_t)0x00010000)        /*!< Event Mask on line 16 */\r
2464 #define  EXTI_EMR_MR17                       ((uint32_t)0x00020000)        /*!< Event Mask on line 17 */\r
2465 #define  EXTI_EMR_MR18                       ((uint32_t)0x00040000)        /*!< Event Mask on line 18 */\r
2466 \r
2467 /******************  Bit definition for EXTI_RTSR register  *******************/\r
2468 #define  EXTI_RTSR_TR0                       ((uint32_t)0x00000001)        /*!< Rising trigger event configuration bit of line 0 */\r
2469 #define  EXTI_RTSR_TR1                       ((uint32_t)0x00000002)        /*!< Rising trigger event configuration bit of line 1 */\r
2470 #define  EXTI_RTSR_TR2                       ((uint32_t)0x00000004)        /*!< Rising trigger event configuration bit of line 2 */\r
2471 #define  EXTI_RTSR_TR3                       ((uint32_t)0x00000008)        /*!< Rising trigger event configuration bit of line 3 */\r
2472 #define  EXTI_RTSR_TR4                       ((uint32_t)0x00000010)        /*!< Rising trigger event configuration bit of line 4 */\r
2473 #define  EXTI_RTSR_TR5                       ((uint32_t)0x00000020)        /*!< Rising trigger event configuration bit of line 5 */\r
2474 #define  EXTI_RTSR_TR6                       ((uint32_t)0x00000040)        /*!< Rising trigger event configuration bit of line 6 */\r
2475 #define  EXTI_RTSR_TR7                       ((uint32_t)0x00000080)        /*!< Rising trigger event configuration bit of line 7 */\r
2476 #define  EXTI_RTSR_TR8                       ((uint32_t)0x00000100)        /*!< Rising trigger event configuration bit of line 8 */\r
2477 #define  EXTI_RTSR_TR9                       ((uint32_t)0x00000200)        /*!< Rising trigger event configuration bit of line 9 */\r
2478 #define  EXTI_RTSR_TR10                      ((uint32_t)0x00000400)        /*!< Rising trigger event configuration bit of line 10 */\r
2479 #define  EXTI_RTSR_TR11                      ((uint32_t)0x00000800)        /*!< Rising trigger event configuration bit of line 11 */\r
2480 #define  EXTI_RTSR_TR12                      ((uint32_t)0x00001000)        /*!< Rising trigger event configuration bit of line 12 */\r
2481 #define  EXTI_RTSR_TR13                      ((uint32_t)0x00002000)        /*!< Rising trigger event configuration bit of line 13 */\r
2482 #define  EXTI_RTSR_TR14                      ((uint32_t)0x00004000)        /*!< Rising trigger event configuration bit of line 14 */\r
2483 #define  EXTI_RTSR_TR15                      ((uint32_t)0x00008000)        /*!< Rising trigger event configuration bit of line 15 */\r
2484 #define  EXTI_RTSR_TR16                      ((uint32_t)0x00010000)        /*!< Rising trigger event configuration bit of line 16 */\r
2485 #define  EXTI_RTSR_TR17                      ((uint32_t)0x00020000)        /*!< Rising trigger event configuration bit of line 17 */\r
2486 #define  EXTI_RTSR_TR18                      ((uint32_t)0x00040000)        /*!< Rising trigger event configuration bit of line 18 */\r
2487 \r
2488 /******************  Bit definition for EXTI_FTSR register  *******************/\r
2489 #define  EXTI_FTSR_TR0                       ((uint32_t)0x00000001)        /*!< Falling trigger event configuration bit of line 0 */\r
2490 #define  EXTI_FTSR_TR1                       ((uint32_t)0x00000002)        /*!< Falling trigger event configuration bit of line 1 */\r
2491 #define  EXTI_FTSR_TR2                       ((uint32_t)0x00000004)        /*!< Falling trigger event configuration bit of line 2 */\r
2492 #define  EXTI_FTSR_TR3                       ((uint32_t)0x00000008)        /*!< Falling trigger event configuration bit of line 3 */\r
2493 #define  EXTI_FTSR_TR4                       ((uint32_t)0x00000010)        /*!< Falling trigger event configuration bit of line 4 */\r
2494 #define  EXTI_FTSR_TR5                       ((uint32_t)0x00000020)        /*!< Falling trigger event configuration bit of line 5 */\r
2495 #define  EXTI_FTSR_TR6                       ((uint32_t)0x00000040)        /*!< Falling trigger event configuration bit of line 6 */\r
2496 #define  EXTI_FTSR_TR7                       ((uint32_t)0x00000080)        /*!< Falling trigger event configuration bit of line 7 */\r
2497 #define  EXTI_FTSR_TR8                       ((uint32_t)0x00000100)        /*!< Falling trigger event configuration bit of line 8 */\r
2498 #define  EXTI_FTSR_TR9                       ((uint32_t)0x00000200)        /*!< Falling trigger event configuration bit of line 9 */\r
2499 #define  EXTI_FTSR_TR10                      ((uint32_t)0x00000400)        /*!< Falling trigger event configuration bit of line 10 */\r
2500 #define  EXTI_FTSR_TR11                      ((uint32_t)0x00000800)        /*!< Falling trigger event configuration bit of line 11 */\r
2501 #define  EXTI_FTSR_TR12                      ((uint32_t)0x00001000)        /*!< Falling trigger event configuration bit of line 12 */\r
2502 #define  EXTI_FTSR_TR13                      ((uint32_t)0x00002000)        /*!< Falling trigger event configuration bit of line 13 */\r
2503 #define  EXTI_FTSR_TR14                      ((uint32_t)0x00004000)        /*!< Falling trigger event configuration bit of line 14 */\r
2504 #define  EXTI_FTSR_TR15                      ((uint32_t)0x00008000)        /*!< Falling trigger event configuration bit of line 15 */\r
2505 #define  EXTI_FTSR_TR16                      ((uint32_t)0x00010000)        /*!< Falling trigger event configuration bit of line 16 */\r
2506 #define  EXTI_FTSR_TR17                      ((uint32_t)0x00020000)        /*!< Falling trigger event configuration bit of line 17 */\r
2507 #define  EXTI_FTSR_TR18                      ((uint32_t)0x00040000)        /*!< Falling trigger event configuration bit of line 18 */\r
2508 \r
2509 /******************  Bit definition for EXTI_SWIER register  ******************/\r
2510 #define  EXTI_SWIER_SWIER0                   ((uint32_t)0x00000001)        /*!< Software Interrupt on line 0 */\r
2511 #define  EXTI_SWIER_SWIER1                   ((uint32_t)0x00000002)        /*!< Software Interrupt on line 1 */\r
2512 #define  EXTI_SWIER_SWIER2                   ((uint32_t)0x00000004)        /*!< Software Interrupt on line 2 */\r
2513 #define  EXTI_SWIER_SWIER3                   ((uint32_t)0x00000008)        /*!< Software Interrupt on line 3 */\r
2514 #define  EXTI_SWIER_SWIER4                   ((uint32_t)0x00000010)        /*!< Software Interrupt on line 4 */\r
2515 #define  EXTI_SWIER_SWIER5                   ((uint32_t)0x00000020)        /*!< Software Interrupt on line 5 */\r
2516 #define  EXTI_SWIER_SWIER6                   ((uint32_t)0x00000040)        /*!< Software Interrupt on line 6 */\r
2517 #define  EXTI_SWIER_SWIER7                   ((uint32_t)0x00000080)        /*!< Software Interrupt on line 7 */\r
2518 #define  EXTI_SWIER_SWIER8                   ((uint32_t)0x00000100)        /*!< Software Interrupt on line 8 */\r
2519 #define  EXTI_SWIER_SWIER9                   ((uint32_t)0x00000200)        /*!< Software Interrupt on line 9 */\r
2520 #define  EXTI_SWIER_SWIER10                  ((uint32_t)0x00000400)        /*!< Software Interrupt on line 10 */\r
2521 #define  EXTI_SWIER_SWIER11                  ((uint32_t)0x00000800)        /*!< Software Interrupt on line 11 */\r
2522 #define  EXTI_SWIER_SWIER12                  ((uint32_t)0x00001000)        /*!< Software Interrupt on line 12 */\r
2523 #define  EXTI_SWIER_SWIER13                  ((uint32_t)0x00002000)        /*!< Software Interrupt on line 13 */\r
2524 #define  EXTI_SWIER_SWIER14                  ((uint32_t)0x00004000)        /*!< Software Interrupt on line 14 */\r
2525 #define  EXTI_SWIER_SWIER15                  ((uint32_t)0x00008000)        /*!< Software Interrupt on line 15 */\r
2526 #define  EXTI_SWIER_SWIER16                  ((uint32_t)0x00010000)        /*!< Software Interrupt on line 16 */\r
2527 #define  EXTI_SWIER_SWIER17                  ((uint32_t)0x00020000)        /*!< Software Interrupt on line 17 */\r
2528 #define  EXTI_SWIER_SWIER18                  ((uint32_t)0x00040000)        /*!< Software Interrupt on line 18 */\r
2529 \r
2530 /*******************  Bit definition for EXTI_PR register  ********************/\r
2531 #define  EXTI_PR_PR0                         ((uint32_t)0x00000001)        /*!< Pending bit 0 */\r
2532 #define  EXTI_PR_PR1                         ((uint32_t)0x00000002)        /*!< Pending bit 1 */\r
2533 #define  EXTI_PR_PR2                         ((uint32_t)0x00000004)        /*!< Pending bit 2 */\r
2534 #define  EXTI_PR_PR3                         ((uint32_t)0x00000008)        /*!< Pending bit 3 */\r
2535 #define  EXTI_PR_PR4                         ((uint32_t)0x00000010)        /*!< Pending bit 4 */\r
2536 #define  EXTI_PR_PR5                         ((uint32_t)0x00000020)        /*!< Pending bit 5 */\r
2537 #define  EXTI_PR_PR6                         ((uint32_t)0x00000040)        /*!< Pending bit 6 */\r
2538 #define  EXTI_PR_PR7                         ((uint32_t)0x00000080)        /*!< Pending bit 7 */\r
2539 #define  EXTI_PR_PR8                         ((uint32_t)0x00000100)        /*!< Pending bit 8 */\r
2540 #define  EXTI_PR_PR9                         ((uint32_t)0x00000200)        /*!< Pending bit 9 */\r
2541 #define  EXTI_PR_PR10                        ((uint32_t)0x00000400)        /*!< Pending bit 10 */\r
2542 #define  EXTI_PR_PR11                        ((uint32_t)0x00000800)        /*!< Pending bit 11 */\r
2543 #define  EXTI_PR_PR12                        ((uint32_t)0x00001000)        /*!< Pending bit 12 */\r
2544 #define  EXTI_PR_PR13                        ((uint32_t)0x00002000)        /*!< Pending bit 13 */\r
2545 #define  EXTI_PR_PR14                        ((uint32_t)0x00004000)        /*!< Pending bit 14 */\r
2546 #define  EXTI_PR_PR15                        ((uint32_t)0x00008000)        /*!< Pending bit 15 */\r
2547 #define  EXTI_PR_PR16                        ((uint32_t)0x00010000)        /*!< Pending bit 16 */\r
2548 #define  EXTI_PR_PR17                        ((uint32_t)0x00020000)        /*!< Pending bit 17 */\r
2549 #define  EXTI_PR_PR18                        ((uint32_t)0x00040000)        /*!< Trigger request occurred on the external interrupt line 18 */\r
2550 \r
2551 /******************************************************************************/\r
2552 /*                                                                            */\r
2553 /*                             DMA Controller                                 */\r
2554 /*                                                                            */\r
2555 /******************************************************************************/\r
2556 \r
2557 /*******************  Bit definition for DMA_ISR register  ********************/\r
2558 #define  DMA_ISR_GIF1                        ((uint32_t)0x00000001)        /*!< Channel 1 Global interrupt flag */\r
2559 #define  DMA_ISR_TCIF1                       ((uint32_t)0x00000002)        /*!< Channel 1 Transfer Complete flag */\r
2560 #define  DMA_ISR_HTIF1                       ((uint32_t)0x00000004)        /*!< Channel 1 Half Transfer flag */\r
2561 #define  DMA_ISR_TEIF1                       ((uint32_t)0x00000008)        /*!< Channel 1 Transfer Error flag */\r
2562 #define  DMA_ISR_GIF2                        ((uint32_t)0x00000010)        /*!< Channel 2 Global interrupt flag */\r
2563 #define  DMA_ISR_TCIF2                       ((uint32_t)0x00000020)        /*!< Channel 2 Transfer Complete flag */\r
2564 #define  DMA_ISR_HTIF2                       ((uint32_t)0x00000040)        /*!< Channel 2 Half Transfer flag */\r
2565 #define  DMA_ISR_TEIF2                       ((uint32_t)0x00000080)        /*!< Channel 2 Transfer Error flag */\r
2566 #define  DMA_ISR_GIF3                        ((uint32_t)0x00000100)        /*!< Channel 3 Global interrupt flag */\r
2567 #define  DMA_ISR_TCIF3                       ((uint32_t)0x00000200)        /*!< Channel 3 Transfer Complete flag */\r
2568 #define  DMA_ISR_HTIF3                       ((uint32_t)0x00000400)        /*!< Channel 3 Half Transfer flag */\r
2569 #define  DMA_ISR_TEIF3                       ((uint32_t)0x00000800)        /*!< Channel 3 Transfer Error flag */\r
2570 #define  DMA_ISR_GIF4                        ((uint32_t)0x00001000)        /*!< Channel 4 Global interrupt flag */\r
2571 #define  DMA_ISR_TCIF4                       ((uint32_t)0x00002000)        /*!< Channel 4 Transfer Complete flag */\r
2572 #define  DMA_ISR_HTIF4                       ((uint32_t)0x00004000)        /*!< Channel 4 Half Transfer flag */\r
2573 #define  DMA_ISR_TEIF4                       ((uint32_t)0x00008000)        /*!< Channel 4 Transfer Error flag */\r
2574 #define  DMA_ISR_GIF5                        ((uint32_t)0x00010000)        /*!< Channel 5 Global interrupt flag */\r
2575 #define  DMA_ISR_TCIF5                       ((uint32_t)0x00020000)        /*!< Channel 5 Transfer Complete flag */\r
2576 #define  DMA_ISR_HTIF5                       ((uint32_t)0x00040000)        /*!< Channel 5 Half Transfer flag */\r
2577 #define  DMA_ISR_TEIF5                       ((uint32_t)0x00080000)        /*!< Channel 5 Transfer Error flag */\r
2578 #define  DMA_ISR_GIF6                        ((uint32_t)0x00100000)        /*!< Channel 6 Global interrupt flag */\r
2579 #define  DMA_ISR_TCIF6                       ((uint32_t)0x00200000)        /*!< Channel 6 Transfer Complete flag */\r
2580 #define  DMA_ISR_HTIF6                       ((uint32_t)0x00400000)        /*!< Channel 6 Half Transfer flag */\r
2581 #define  DMA_ISR_TEIF6                       ((uint32_t)0x00800000)        /*!< Channel 6 Transfer Error flag */\r
2582 #define  DMA_ISR_GIF7                        ((uint32_t)0x01000000)        /*!< Channel 7 Global interrupt flag */\r
2583 #define  DMA_ISR_TCIF7                       ((uint32_t)0x02000000)        /*!< Channel 7 Transfer Complete flag */\r
2584 #define  DMA_ISR_HTIF7                       ((uint32_t)0x04000000)        /*!< Channel 7 Half Transfer flag */\r
2585 #define  DMA_ISR_TEIF7                       ((uint32_t)0x08000000)        /*!< Channel 7 Transfer Error flag */\r
2586 \r
2587 /*******************  Bit definition for DMA_IFCR register  *******************/\r
2588 #define  DMA_IFCR_CGIF1                      ((uint32_t)0x00000001)        /*!< Channel 1 Global interrupt clearr */\r
2589 #define  DMA_IFCR_CTCIF1                     ((uint32_t)0x00000002)        /*!< Channel 1 Transfer Complete clear */\r
2590 #define  DMA_IFCR_CHTIF1                     ((uint32_t)0x00000004)        /*!< Channel 1 Half Transfer clear */\r
2591 #define  DMA_IFCR_CTEIF1                     ((uint32_t)0x00000008)        /*!< Channel 1 Transfer Error clear */\r
2592 #define  DMA_IFCR_CGIF2                      ((uint32_t)0x00000010)        /*!< Channel 2 Global interrupt clear */\r
2593 #define  DMA_IFCR_CTCIF2                     ((uint32_t)0x00000020)        /*!< Channel 2 Transfer Complete clear */\r
2594 #define  DMA_IFCR_CHTIF2                     ((uint32_t)0x00000040)        /*!< Channel 2 Half Transfer clear */\r
2595 #define  DMA_IFCR_CTEIF2                     ((uint32_t)0x00000080)        /*!< Channel 2 Transfer Error clear */\r
2596 #define  DMA_IFCR_CGIF3                      ((uint32_t)0x00000100)        /*!< Channel 3 Global interrupt clear */\r
2597 #define  DMA_IFCR_CTCIF3                     ((uint32_t)0x00000200)        /*!< Channel 3 Transfer Complete clear */\r
2598 #define  DMA_IFCR_CHTIF3                     ((uint32_t)0x00000400)        /*!< Channel 3 Half Transfer clear */\r
2599 #define  DMA_IFCR_CTEIF3                     ((uint32_t)0x00000800)        /*!< Channel 3 Transfer Error clear */\r
2600 #define  DMA_IFCR_CGIF4                      ((uint32_t)0x00001000)        /*!< Channel 4 Global interrupt clear */\r
2601 #define  DMA_IFCR_CTCIF4                     ((uint32_t)0x00002000)        /*!< Channel 4 Transfer Complete clear */\r
2602 #define  DMA_IFCR_CHTIF4                     ((uint32_t)0x00004000)        /*!< Channel 4 Half Transfer clear */\r
2603 #define  DMA_IFCR_CTEIF4                     ((uint32_t)0x00008000)        /*!< Channel 4 Transfer Error clear */\r
2604 #define  DMA_IFCR_CGIF5                      ((uint32_t)0x00010000)        /*!< Channel 5 Global interrupt clear */\r
2605 #define  DMA_IFCR_CTCIF5                     ((uint32_t)0x00020000)        /*!< Channel 5 Transfer Complete clear */\r
2606 #define  DMA_IFCR_CHTIF5                     ((uint32_t)0x00040000)        /*!< Channel 5 Half Transfer clear */\r
2607 #define  DMA_IFCR_CTEIF5                     ((uint32_t)0x00080000)        /*!< Channel 5 Transfer Error clear */\r
2608 #define  DMA_IFCR_CGIF6                      ((uint32_t)0x00100000)        /*!< Channel 6 Global interrupt clear */\r
2609 #define  DMA_IFCR_CTCIF6                     ((uint32_t)0x00200000)        /*!< Channel 6 Transfer Complete clear */\r
2610 #define  DMA_IFCR_CHTIF6                     ((uint32_t)0x00400000)        /*!< Channel 6 Half Transfer clear */\r
2611 #define  DMA_IFCR_CTEIF6                     ((uint32_t)0x00800000)        /*!< Channel 6 Transfer Error clear */\r
2612 #define  DMA_IFCR_CGIF7                      ((uint32_t)0x01000000)        /*!< Channel 7 Global interrupt clear */\r
2613 #define  DMA_IFCR_CTCIF7                     ((uint32_t)0x02000000)        /*!< Channel 7 Transfer Complete clear */\r
2614 #define  DMA_IFCR_CHTIF7                     ((uint32_t)0x04000000)        /*!< Channel 7 Half Transfer clear */\r
2615 #define  DMA_IFCR_CTEIF7                     ((uint32_t)0x08000000)        /*!< Channel 7 Transfer Error clear */\r
2616 \r
2617 /*******************  Bit definition for DMA_CCR1 register  *******************/\r
2618 #define  DMA_CCR1_EN                         ((uint16_t)0x0001)            /*!< Channel enable*/\r
2619 #define  DMA_CCR1_TCIE                       ((uint16_t)0x0002)            /*!< Transfer complete interrupt enable */\r
2620 #define  DMA_CCR1_HTIE                       ((uint16_t)0x0004)            /*!< Half Transfer interrupt enable */\r
2621 #define  DMA_CCR1_TEIE                       ((uint16_t)0x0008)            /*!< Transfer error interrupt enable */\r
2622 #define  DMA_CCR1_DIR                        ((uint16_t)0x0010)            /*!< Data transfer direction */\r
2623 #define  DMA_CCR1_CIRC                       ((uint16_t)0x0020)            /*!< Circular mode */\r
2624 #define  DMA_CCR1_PINC                       ((uint16_t)0x0040)            /*!< Peripheral increment mode */\r
2625 #define  DMA_CCR1_MINC                       ((uint16_t)0x0080)            /*!< Memory increment mode */\r
2626 \r
2627 #define  DMA_CCR1_PSIZE                      ((uint16_t)0x0300)            /*!< PSIZE[1:0] bits (Peripheral size) */\r
2628 #define  DMA_CCR1_PSIZE_0                    ((uint16_t)0x0100)            /*!< Bit 0 */\r
2629 #define  DMA_CCR1_PSIZE_1                    ((uint16_t)0x0200)            /*!< Bit 1 */\r
2630 \r
2631 #define  DMA_CCR1_MSIZE                      ((uint16_t)0x0C00)            /*!< MSIZE[1:0] bits (Memory size) */\r
2632 #define  DMA_CCR1_MSIZE_0                    ((uint16_t)0x0400)            /*!< Bit 0 */\r
2633 #define  DMA_CCR1_MSIZE_1                    ((uint16_t)0x0800)            /*!< Bit 1 */\r
2634 \r
2635 #define  DMA_CCR1_PL                         ((uint16_t)0x3000)            /*!< PL[1:0] bits(Channel Priority level) */\r
2636 #define  DMA_CCR1_PL_0                       ((uint16_t)0x1000)            /*!< Bit 0 */\r
2637 #define  DMA_CCR1_PL_1                       ((uint16_t)0x2000)            /*!< Bit 1 */\r
2638 \r
2639 #define  DMA_CCR1_MEM2MEM                    ((uint16_t)0x4000)            /*!< Memory to memory mode */\r
2640 \r
2641 /*******************  Bit definition for DMA_CCR2 register  *******************/\r
2642 #define  DMA_CCR2_EN                         ((uint16_t)0x0001)            /*!< Channel enable */\r
2643 #define  DMA_CCR2_TCIE                       ((uint16_t)0x0002)            /*!< ransfer complete interrupt enable */\r
2644 #define  DMA_CCR2_HTIE                       ((uint16_t)0x0004)            /*!< Half Transfer interrupt enable */\r
2645 #define  DMA_CCR2_TEIE                       ((uint16_t)0x0008)            /*!< Transfer error interrupt enable */\r
2646 #define  DMA_CCR2_DIR                        ((uint16_t)0x0010)            /*!< Data transfer direction */\r
2647 #define  DMA_CCR2_CIRC                       ((uint16_t)0x0020)            /*!< Circular mode */\r
2648 #define  DMA_CCR2_PINC                       ((uint16_t)0x0040)            /*!< Peripheral increment mode */\r
2649 #define  DMA_CCR2_MINC                       ((uint16_t)0x0080)            /*!< Memory increment mode */\r
2650 \r
2651 #define  DMA_CCR2_PSIZE                      ((uint16_t)0x0300)            /*!< PSIZE[1:0] bits (Peripheral size) */\r
2652 #define  DMA_CCR2_PSIZE_0                    ((uint16_t)0x0100)            /*!< Bit 0 */\r
2653 #define  DMA_CCR2_PSIZE_1                    ((uint16_t)0x0200)            /*!< Bit 1 */\r
2654 \r
2655 #define  DMA_CCR2_MSIZE                      ((uint16_t)0x0C00)            /*!< MSIZE[1:0] bits (Memory size) */\r
2656 #define  DMA_CCR2_MSIZE_0                    ((uint16_t)0x0400)            /*!< Bit 0 */\r
2657 #define  DMA_CCR2_MSIZE_1                    ((uint16_t)0x0800)            /*!< Bit 1 */\r
2658 \r
2659 #define  DMA_CCR2_PL                         ((uint16_t)0x3000)            /*!< PL[1:0] bits (Channel Priority level) */\r
2660 #define  DMA_CCR2_PL_0                       ((uint16_t)0x1000)            /*!< Bit 0 */\r
2661 #define  DMA_CCR2_PL_1                       ((uint16_t)0x2000)            /*!< Bit 1 */\r
2662 \r
2663 #define  DMA_CCR2_MEM2MEM                    ((uint16_t)0x4000)            /*!< Memory to memory mode */\r
2664 \r
2665 /*******************  Bit definition for DMA_CCR3 register  *******************/\r
2666 #define  DMA_CCR3_EN                         ((uint16_t)0x0001)            /*!< Channel enable */\r
2667 #define  DMA_CCR3_TCIE                       ((uint16_t)0x0002)            /*!< Transfer complete interrupt enable */\r
2668 #define  DMA_CCR3_HTIE                       ((uint16_t)0x0004)            /*!< Half Transfer interrupt enable */\r
2669 #define  DMA_CCR3_TEIE                       ((uint16_t)0x0008)            /*!< Transfer error interrupt enable */\r
2670 #define  DMA_CCR3_DIR                        ((uint16_t)0x0010)            /*!< Data transfer direction */\r
2671 #define  DMA_CCR3_CIRC                       ((uint16_t)0x0020)            /*!< Circular mode */\r
2672 #define  DMA_CCR3_PINC                       ((uint16_t)0x0040)            /*!< Peripheral increment mode */\r
2673 #define  DMA_CCR3_MINC                       ((uint16_t)0x0080)            /*!< Memory increment mode */\r
2674 \r
2675 #define  DMA_CCR3_PSIZE                      ((uint16_t)0x0300)            /*!< PSIZE[1:0] bits (Peripheral size) */\r
2676 #define  DMA_CCR3_PSIZE_0                    ((uint16_t)0x0100)            /*!< Bit 0 */\r
2677 #define  DMA_CCR3_PSIZE_1                    ((uint16_t)0x0200)            /*!< Bit 1 */\r
2678 \r
2679 #define  DMA_CCR3_MSIZE                      ((uint16_t)0x0C00)            /*!< MSIZE[1:0] bits (Memory size) */\r
2680 #define  DMA_CCR3_MSIZE_0                    ((uint16_t)0x0400)            /*!< Bit 0 */\r
2681 #define  DMA_CCR3_MSIZE_1                    ((uint16_t)0x0800)            /*!< Bit 1 */\r
2682 \r
2683 #define  DMA_CCR3_PL                         ((uint16_t)0x3000)            /*!< PL[1:0] bits (Channel Priority level) */\r
2684 #define  DMA_CCR3_PL_0                       ((uint16_t)0x1000)            /*!< Bit 0 */\r
2685 #define  DMA_CCR3_PL_1                       ((uint16_t)0x2000)            /*!< Bit 1 */\r
2686 \r
2687 #define  DMA_CCR3_MEM2MEM                    ((uint16_t)0x4000)            /*!< Memory to memory mode */\r
2688 \r
2689 /*!<******************  Bit definition for DMA_CCR4 register  *******************/\r
2690 #define  DMA_CCR4_EN                         ((uint16_t)0x0001)            /*!<Channel enable */\r
2691 #define  DMA_CCR4_TCIE                       ((uint16_t)0x0002)            /*!<Transfer complete interrupt enable */\r
2692 #define  DMA_CCR4_HTIE                       ((uint16_t)0x0004)            /*!<Half Transfer interrupt enable */\r
2693 #define  DMA_CCR4_TEIE                       ((uint16_t)0x0008)            /*!<Transfer error interrupt enable */\r
2694 #define  DMA_CCR4_DIR                        ((uint16_t)0x0010)            /*!<Data transfer direction */\r
2695 #define  DMA_CCR4_CIRC                       ((uint16_t)0x0020)            /*!<Circular mode */\r
2696 #define  DMA_CCR4_PINC                       ((uint16_t)0x0040)            /*!<Peripheral increment mode */\r
2697 #define  DMA_CCR4_MINC                       ((uint16_t)0x0080)            /*!<Memory increment mode */\r
2698 \r
2699 #define  DMA_CCR4_PSIZE                      ((uint16_t)0x0300)            /*!<PSIZE[1:0] bits (Peripheral size) */\r
2700 #define  DMA_CCR4_PSIZE_0                    ((uint16_t)0x0100)            /*!<Bit 0 */\r
2701 #define  DMA_CCR4_PSIZE_1                    ((uint16_t)0x0200)            /*!<Bit 1 */\r
2702 \r
2703 #define  DMA_CCR4_MSIZE                      ((uint16_t)0x0C00)            /*!<MSIZE[1:0] bits (Memory size) */\r
2704 #define  DMA_CCR4_MSIZE_0                    ((uint16_t)0x0400)            /*!<Bit 0 */\r
2705 #define  DMA_CCR4_MSIZE_1                    ((uint16_t)0x0800)            /*!<Bit 1 */\r
2706 \r
2707 #define  DMA_CCR4_PL                         ((uint16_t)0x3000)            /*!<PL[1:0] bits (Channel Priority level) */\r
2708 #define  DMA_CCR4_PL_0                       ((uint16_t)0x1000)            /*!<Bit 0 */\r
2709 #define  DMA_CCR4_PL_1                       ((uint16_t)0x2000)            /*!<Bit 1 */\r
2710 \r
2711 #define  DMA_CCR4_MEM2MEM                    ((uint16_t)0x4000)            /*!<Memory to memory mode */\r
2712 \r
2713 /******************  Bit definition for DMA_CCR5 register  *******************/\r
2714 #define  DMA_CCR5_EN                         ((uint16_t)0x0001)            /*!<Channel enable */\r
2715 #define  DMA_CCR5_TCIE                       ((uint16_t)0x0002)            /*!<Transfer complete interrupt enable */\r
2716 #define  DMA_CCR5_HTIE                       ((uint16_t)0x0004)            /*!<Half Transfer interrupt enable */\r
2717 #define  DMA_CCR5_TEIE                       ((uint16_t)0x0008)            /*!<Transfer error interrupt enable */\r
2718 #define  DMA_CCR5_DIR                        ((uint16_t)0x0010)            /*!<Data transfer direction */\r
2719 #define  DMA_CCR5_CIRC                       ((uint16_t)0x0020)            /*!<Circular mode */\r
2720 #define  DMA_CCR5_PINC                       ((uint16_t)0x0040)            /*!<Peripheral increment mode */\r
2721 #define  DMA_CCR5_MINC                       ((uint16_t)0x0080)            /*!<Memory increment mode */\r
2722 \r
2723 #define  DMA_CCR5_PSIZE                      ((uint16_t)0x0300)            /*!<PSIZE[1:0] bits (Peripheral size) */\r
2724 #define  DMA_CCR5_PSIZE_0                    ((uint16_t)0x0100)            /*!<Bit 0 */\r
2725 #define  DMA_CCR5_PSIZE_1                    ((uint16_t)0x0200)            /*!<Bit 1 */\r
2726 \r
2727 #define  DMA_CCR5_MSIZE                      ((uint16_t)0x0C00)            /*!<MSIZE[1:0] bits (Memory size) */\r
2728 #define  DMA_CCR5_MSIZE_0                    ((uint16_t)0x0400)            /*!<Bit 0 */\r
2729 #define  DMA_CCR5_MSIZE_1                    ((uint16_t)0x0800)            /*!<Bit 1 */\r
2730 \r
2731 #define  DMA_CCR5_PL                         ((uint16_t)0x3000)            /*!<PL[1:0] bits (Channel Priority level) */\r
2732 #define  DMA_CCR5_PL_0                       ((uint16_t)0x1000)            /*!<Bit 0 */\r
2733 #define  DMA_CCR5_PL_1                       ((uint16_t)0x2000)            /*!<Bit 1 */\r
2734 \r
2735 #define  DMA_CCR5_MEM2MEM                    ((uint16_t)0x4000)            /*!<Memory to memory mode enable */\r
2736 \r
2737 /*******************  Bit definition for DMA_CCR6 register  *******************/\r
2738 #define  DMA_CCR6_EN                         ((uint16_t)0x0001)            /*!<Channel enable */\r
2739 #define  DMA_CCR6_TCIE                       ((uint16_t)0x0002)            /*!<Transfer complete interrupt enable */\r
2740 #define  DMA_CCR6_HTIE                       ((uint16_t)0x0004)            /*!<Half Transfer interrupt enable */\r
2741 #define  DMA_CCR6_TEIE                       ((uint16_t)0x0008)            /*!<Transfer error interrupt enable */\r
2742 #define  DMA_CCR6_DIR                        ((uint16_t)0x0010)            /*!<Data transfer direction */\r
2743 #define  DMA_CCR6_CIRC                       ((uint16_t)0x0020)            /*!<Circular mode */\r
2744 #define  DMA_CCR6_PINC                       ((uint16_t)0x0040)            /*!<Peripheral increment mode */\r
2745 #define  DMA_CCR6_MINC                       ((uint16_t)0x0080)            /*!<Memory increment mode */\r
2746 \r
2747 #define  DMA_CCR6_PSIZE                      ((uint16_t)0x0300)            /*!<PSIZE[1:0] bits (Peripheral size) */\r
2748 #define  DMA_CCR6_PSIZE_0                    ((uint16_t)0x0100)            /*!<Bit 0 */\r
2749 #define  DMA_CCR6_PSIZE_1                    ((uint16_t)0x0200)            /*!<Bit 1 */\r
2750 \r
2751 #define  DMA_CCR6_MSIZE                      ((uint16_t)0x0C00)            /*!<MSIZE[1:0] bits (Memory size) */\r
2752 #define  DMA_CCR6_MSIZE_0                    ((uint16_t)0x0400)            /*!<Bit 0 */\r
2753 #define  DMA_CCR6_MSIZE_1                    ((uint16_t)0x0800)            /*!<Bit 1 */\r
2754 \r
2755 #define  DMA_CCR6_PL                         ((uint16_t)0x3000)            /*!<PL[1:0] bits (Channel Priority level) */\r
2756 #define  DMA_CCR6_PL_0                       ((uint16_t)0x1000)            /*!<Bit 0 */\r
2757 #define  DMA_CCR6_PL_1                       ((uint16_t)0x2000)            /*!<Bit 1 */\r
2758 \r
2759 #define  DMA_CCR6_MEM2MEM                    ((uint16_t)0x4000)            /*!<Memory to memory mode */\r
2760 \r
2761 /*******************  Bit definition for DMA_CCR7 register  *******************/\r
2762 #define  DMA_CCR7_EN                         ((uint16_t)0x0001)            /*!<Channel enable */\r
2763 #define  DMA_CCR7_TCIE                       ((uint16_t)0x0002)            /*!<Transfer complete interrupt enable */\r
2764 #define  DMA_CCR7_HTIE                       ((uint16_t)0x0004)            /*!<Half Transfer interrupt enable */\r
2765 #define  DMA_CCR7_TEIE                       ((uint16_t)0x0008)            /*!<Transfer error interrupt enable */\r
2766 #define  DMA_CCR7_DIR                        ((uint16_t)0x0010)            /*!<Data transfer direction */\r
2767 #define  DMA_CCR7_CIRC                       ((uint16_t)0x0020)            /*!<Circular mode */\r
2768 #define  DMA_CCR7_PINC                       ((uint16_t)0x0040)            /*!<Peripheral increment mode */\r
2769 #define  DMA_CCR7_MINC                       ((uint16_t)0x0080)            /*!<Memory increment mode */\r
2770 \r
2771 #define  DMA_CCR7_PSIZE            ,         ((uint16_t)0x0300)            /*!<PSIZE[1:0] bits (Peripheral size) */\r
2772 #define  DMA_CCR7_PSIZE_0                    ((uint16_t)0x0100)            /*!<Bit 0 */\r
2773 #define  DMA_CCR7_PSIZE_1                    ((uint16_t)0x0200)            /*!<Bit 1 */\r
2774 \r
2775 #define  DMA_CCR7_MSIZE                      ((uint16_t)0x0C00)            /*!<MSIZE[1:0] bits (Memory size) */\r
2776 #define  DMA_CCR7_MSIZE_0                    ((uint16_t)0x0400)            /*!<Bit 0 */\r
2777 #define  DMA_CCR7_MSIZE_1                    ((uint16_t)0x0800)            /*!<Bit 1 */\r
2778 \r
2779 #define  DMA_CCR7_PL                         ((uint16_t)0x3000)            /*!<PL[1:0] bits (Channel Priority level) */\r
2780 #define  DMA_CCR7_PL_0                       ((uint16_t)0x1000)            /*!<Bit 0 */\r
2781 #define  DMA_CCR7_PL_1                       ((uint16_t)0x2000)            /*!<Bit 1 */\r
2782 \r
2783 #define  DMA_CCR7_MEM2MEM                    ((uint16_t)0x4000)            /*!<Memory to memory mode enable */\r
2784 \r
2785 /******************  Bit definition for DMA_CNDTR1 register  ******************/\r
2786 #define  DMA_CNDTR1_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2787 \r
2788 /******************  Bit definition for DMA_CNDTR2 register  ******************/\r
2789 #define  DMA_CNDTR2_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2790 \r
2791 /******************  Bit definition for DMA_CNDTR3 register  ******************/\r
2792 #define  DMA_CNDTR3_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2793 \r
2794 /******************  Bit definition for DMA_CNDTR4 register  ******************/\r
2795 #define  DMA_CNDTR4_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2796 \r
2797 /******************  Bit definition for DMA_CNDTR5 register  ******************/\r
2798 #define  DMA_CNDTR5_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2799 \r
2800 /******************  Bit definition for DMA_CNDTR6 register  ******************/\r
2801 #define  DMA_CNDTR6_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2802 \r
2803 /******************  Bit definition for DMA_CNDTR7 register  ******************/\r
2804 #define  DMA_CNDTR7_NDT                      ((uint16_t)0xFFFF)            /*!<Number of data to Transfer */\r
2805 \r
2806 /******************  Bit definition for DMA_CPAR1 register  *******************/\r
2807 #define  DMA_CPAR1_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2808 \r
2809 /******************  Bit definition for DMA_CPAR2 register  *******************/\r
2810 #define  DMA_CPAR2_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2811 \r
2812 /******************  Bit definition for DMA_CPAR3 register  *******************/\r
2813 #define  DMA_CPAR3_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2814 \r
2815 \r
2816 /******************  Bit definition for DMA_CPAR4 register  *******************/\r
2817 #define  DMA_CPAR4_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2818 \r
2819 /******************  Bit definition for DMA_CPAR5 register  *******************/\r
2820 #define  DMA_CPAR5_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2821 \r
2822 /******************  Bit definition for DMA_CPAR6 register  *******************/\r
2823 #define  DMA_CPAR6_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2824 \r
2825 \r
2826 /******************  Bit definition for DMA_CPAR7 register  *******************/\r
2827 #define  DMA_CPAR7_PA                        ((uint32_t)0xFFFFFFFF)        /*!<Peripheral Address */\r
2828 \r
2829 /******************  Bit definition for DMA_CMAR1 register  *******************/\r
2830 #define  DMA_CMAR1_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2831 \r
2832 /******************  Bit definition for DMA_CMAR2 register  *******************/\r
2833 #define  DMA_CMAR2_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2834 \r
2835 /******************  Bit definition for DMA_CMAR3 register  *******************/\r
2836 #define  DMA_CMAR3_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2837 \r
2838 \r
2839 /******************  Bit definition for DMA_CMAR4 register  *******************/\r
2840 #define  DMA_CMAR4_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2841 \r
2842 /******************  Bit definition for DMA_CMAR5 register  *******************/\r
2843 #define  DMA_CMAR5_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2844 \r
2845 /******************  Bit definition for DMA_CMAR6 register  *******************/\r
2846 #define  DMA_CMAR6_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2847 \r
2848 /******************  Bit definition for DMA_CMAR7 register  *******************/\r
2849 #define  DMA_CMAR7_MA                        ((uint32_t)0xFFFFFFFF)        /*!<Memory Address */\r
2850 \r
2851 /******************************************************************************/\r
2852 /*                                                                            */\r
2853 /*                        Analog to Digital Converter                         */\r
2854 /*                                                                            */\r
2855 /******************************************************************************/\r
2856 \r
2857 /********************  Bit definition for ADC_SR register  ********************/\r
2858 #define  ADC_SR_AWD                          ((uint8_t)0x01)               /*!<Analog watchdog flag */\r
2859 #define  ADC_SR_EOC                          ((uint8_t)0x02)               /*!<End of conversion */\r
2860 #define  ADC_SR_JEOC                         ((uint8_t)0x04)               /*!<Injected channel end of conversion */\r
2861 #define  ADC_SR_JSTRT                        ((uint8_t)0x08)               /*!<Injected channel Start flag */\r
2862 #define  ADC_SR_STRT                         ((uint8_t)0x10)               /*!<Regular channel Start flag */\r
2863 \r
2864 /*******************  Bit definition for ADC_CR1 register  ********************/\r
2865 #define  ADC_CR1_AWDCH                       ((uint32_t)0x0000001F)        /*!<AWDCH[4:0] bits (Analog watchdog channel select bits) */\r
2866 #define  ADC_CR1_AWDCH_0                     ((uint32_t)0x00000001)        /*!<Bit 0 */\r
2867 #define  ADC_CR1_AWDCH_1                     ((uint32_t)0x00000002)        /*!<Bit 1 */\r
2868 #define  ADC_CR1_AWDCH_2                     ((uint32_t)0x00000004)        /*!<Bit 2 */\r
2869 #define  ADC_CR1_AWDCH_3                     ((uint32_t)0x00000008)        /*!<Bit 3 */\r
2870 #define  ADC_CR1_AWDCH_4                     ((uint32_t)0x00000010)        /*!<Bit 4 */\r
2871 \r
2872 #define  ADC_CR1_EOCIE                       ((uint32_t)0x00000020)        /*!<Interrupt enable for EOC */\r
2873 #define  ADC_CR1_AWDIE                       ((uint32_t)0x00000040)        /*!<AAnalog Watchdog interrupt enable */\r
2874 #define  ADC_CR1_JEOCIE                      ((uint32_t)0x00000080)        /*!<Interrupt enable for injected channels */\r
2875 #define  ADC_CR1_SCAN                        ((uint32_t)0x00000100)        /*!<Scan mode */\r
2876 #define  ADC_CR1_AWDSGL                      ((uint32_t)0x00000200)        /*!<Enable the watchdog on a single channel in scan mode */\r
2877 #define  ADC_CR1_JAUTO                       ((uint32_t)0x00000400)        /*!<Automatic injected group conversion */\r
2878 #define  ADC_CR1_DISCEN                      ((uint32_t)0x00000800)        /*!<Discontinuous mode on regular channels */\r
2879 #define  ADC_CR1_JDISCEN                     ((uint32_t)0x00001000)        /*!<Discontinuous mode on injected channels */\r
2880 \r
2881 #define  ADC_CR1_DISCNUM                     ((uint32_t)0x0000E000)        /*!<DISCNUM[2:0] bits (Discontinuous mode channel count) */\r
2882 #define  ADC_CR1_DISCNUM_0                   ((uint32_t)0x00002000)        /*!<Bit 0 */\r
2883 #define  ADC_CR1_DISCNUM_1                   ((uint32_t)0x00004000)        /*!<Bit 1 */\r
2884 #define  ADC_CR1_DISCNUM_2                   ((uint32_t)0x00008000)        /*!<Bit 2 */\r
2885 \r
2886 #define  ADC_CR1_DUALMOD                     ((uint32_t)0x000F0000)        /*!<DUALMOD[3:0] bits (Dual mode selection) */\r
2887 #define  ADC_CR1_DUALMOD_0                   ((uint32_t)0x00010000)        /*!<Bit 0 */\r
2888 #define  ADC_CR1_DUALMOD_1                   ((uint32_t)0x00020000)        /*!<Bit 1 */\r
2889 #define  ADC_CR1_DUALMOD_2                   ((uint32_t)0x00040000)        /*!<Bit 2 */\r
2890 #define  ADC_CR1_DUALMOD_3                   ((uint32_t)0x00080000)        /*!<Bit 3 */\r
2891 \r
2892 #define  ADC_CR1_JAWDEN                      ((uint32_t)0x00400000)        /*!<Analog watchdog enable on injected channels */\r
2893 #define  ADC_CR1_AWDEN                       ((uint32_t)0x00800000)        /*!<Analog watchdog enable on regular channels */\r
2894 \r
2895 \r
2896 /*******************  Bit definition for ADC_CR2 register  ********************/\r
2897 #define  ADC_CR2_ADON                        ((uint32_t)0x00000001)        /*!<A/D Converter ON / OFF */\r
2898 #define  ADC_CR2_CONT                        ((uint32_t)0x00000002)        /*!<Continuous Conversion */\r
2899 #define  ADC_CR2_CAL                         ((uint32_t)0x00000004)        /*!<A/D Calibration */\r
2900 #define  ADC_CR2_RSTCAL                      ((uint32_t)0x00000008)        /*!<Reset Calibration */\r
2901 #define  ADC_CR2_DMA                         ((uint32_t)0x00000100)        /*!<Direct Memory access mode */\r
2902 #define  ADC_CR2_ALIGN                       ((uint32_t)0x00000800)        /*!<Data Alignment */\r
2903 \r
2904 #define  ADC_CR2_JEXTSEL                     ((uint32_t)0x00007000)        /*!<JEXTSEL[2:0] bits (External event select for injected group) */\r
2905 #define  ADC_CR2_JEXTSEL_0                   ((uint32_t)0x00001000)        /*!<Bit 0 */\r
2906 #define  ADC_CR2_JEXTSEL_1                   ((uint32_t)0x00002000)        /*!<Bit 1 */\r
2907 #define  ADC_CR2_JEXTSEL_2                   ((uint32_t)0x00004000)        /*!<Bit 2 */\r
2908 \r
2909 #define  ADC_CR2_JEXTTRIG                    ((uint32_t)0x00008000)        /*!<External Trigger Conversion mode for injected channels */\r
2910 \r
2911 #define  ADC_CR2_EXTSEL                      ((uint32_t)0x000E0000)        /*!<EXTSEL[2:0] bits (External Event Select for regular group) */\r
2912 #define  ADC_CR2_EXTSEL_0                    ((uint32_t)0x00020000)        /*!<Bit 0 */\r
2913 #define  ADC_CR2_EXTSEL_1                    ((uint32_t)0x00040000)        /*!<Bit 1 */\r
2914 #define  ADC_CR2_EXTSEL_2                    ((uint32_t)0x00080000)        /*!<Bit 2 */\r
2915 \r
2916 #define  ADC_CR2_EXTTRIG                     ((uint32_t)0x00100000)        /*!<External Trigger Conversion mode for regular channels */\r
2917 #define  ADC_CR2_JSWSTART                    ((uint32_t)0x00200000)        /*!<Start Conversion of injected channels */\r
2918 #define  ADC_CR2_SWSTART                     ((uint32_t)0x00400000)        /*!<Start Conversion of regular channels */\r
2919 #define  ADC_CR2_TSVREFE                     ((uint32_t)0x00800000)        /*!<Temperature Sensor and VREFINT Enable */\r
2920 \r
2921 /******************  Bit definition for ADC_SMPR1 register  *******************/\r
2922 #define  ADC_SMPR1_SMP10                     ((uint32_t)0x00000007)        /*!<SMP10[2:0] bits (Channel 10 Sample time selection) */\r
2923 #define  ADC_SMPR1_SMP10_0                   ((uint32_t)0x00000001)        /*!<Bit 0 */\r
2924 #define  ADC_SMPR1_SMP10_1                   ((uint32_t)0x00000002)        /*!<Bit 1 */\r
2925 #define  ADC_SMPR1_SMP10_2                   ((uint32_t)0x00000004)        /*!<Bit 2 */\r
2926 \r
2927 #define  ADC_SMPR1_SMP11                     ((uint32_t)0x00000038)        /*!<SMP11[2:0] bits (Channel 11 Sample time selection) */\r
2928 #define  ADC_SMPR1_SMP11_0                   ((uint32_t)0x00000008)        /*!<Bit 0 */\r
2929 #define  ADC_SMPR1_SMP11_1                   ((uint32_t)0x00000010)        /*!<Bit 1 */\r
2930 #define  ADC_SMPR1_SMP11_2                   ((uint32_t)0x00000020)        /*!<Bit 2 */\r
2931 \r
2932 #define  ADC_SMPR1_SMP12                     ((uint32_t)0x000001C0)        /*!<SMP12[2:0] bits (Channel 12 Sample time selection) */\r
2933 #define  ADC_SMPR1_SMP12_0                   ((uint32_t)0x00000040)        /*!<Bit 0 */\r
2934 #define  ADC_SMPR1_SMP12_1                   ((uint32_t)0x00000080)        /*!<Bit 1 */\r
2935 #define  ADC_SMPR1_SMP12_2                   ((uint32_t)0x00000100)        /*!<Bit 2 */\r
2936 \r
2937 #define  ADC_SMPR1_SMP13                     ((uint32_t)0x00000E00)        /*!<SMP13[2:0] bits (Channel 13 Sample time selection) */\r
2938 #define  ADC_SMPR1_SMP13_0                   ((uint32_t)0x00000200)        /*!<Bit 0 */\r
2939 #define  ADC_SMPR1_SMP13_1                   ((uint32_t)0x00000400)        /*!<Bit 1 */\r
2940 #define  ADC_SMPR1_SMP13_2                   ((uint32_t)0x00000800)        /*!<Bit 2 */\r
2941 \r
2942 #define  ADC_SMPR1_SMP14                     ((uint32_t)0x00007000)        /*!<SMP14[2:0] bits (Channel 14 Sample time selection) */\r
2943 #define  ADC_SMPR1_SMP14_0                   ((uint32_t)0x00001000)        /*!<Bit 0 */\r
2944 #define  ADC_SMPR1_SMP14_1                   ((uint32_t)0x00002000)        /*!<Bit 1 */\r
2945 #define  ADC_SMPR1_SMP14_2                   ((uint32_t)0x00004000)        /*!<Bit 2 */\r
2946 \r
2947 #define  ADC_SMPR1_SMP15                     ((uint32_t)0x00038000)        /*!<SMP15[2:0] bits (Channel 15 Sample time selection) */\r
2948 #define  ADC_SMPR1_SMP15_0                   ((uint32_t)0x00008000)        /*!<Bit 0 */\r
2949 #define  ADC_SMPR1_SMP15_1                   ((uint32_t)0x00010000)        /*!<Bit 1 */\r
2950 #define  ADC_SMPR1_SMP15_2                   ((uint32_t)0x00020000)        /*!<Bit 2 */\r
2951 \r
2952 #define  ADC_SMPR1_SMP16                     ((uint32_t)0x001C0000)        /*!<SMP16[2:0] bits (Channel 16 Sample time selection) */\r
2953 #define  ADC_SMPR1_SMP16_0                   ((uint32_t)0x00040000)        /*!<Bit 0 */\r
2954 #define  ADC_SMPR1_SMP16_1                   ((uint32_t)0x00080000)        /*!<Bit 1 */\r
2955 #define  ADC_SMPR1_SMP16_2                   ((uint32_t)0x00100000)        /*!<Bit 2 */\r
2956 \r
2957 #define  ADC_SMPR1_SMP17                     ((uint32_t)0x00E00000)        /*!<SMP17[2:0] bits (Channel 17 Sample time selection) */\r
2958 #define  ADC_SMPR1_SMP17_0                   ((uint32_t)0x00200000)        /*!<Bit 0 */\r
2959 #define  ADC_SMPR1_SMP17_1                   ((uint32_t)0x00400000)        /*!<Bit 1 */\r
2960 #define  ADC_SMPR1_SMP17_2                   ((uint32_t)0x00800000)        /*!<Bit 2 */\r
2961 \r
2962 /******************  Bit definition for ADC_SMPR2 register  *******************/\r
2963 #define  ADC_SMPR2_SMP0                      ((uint32_t)0x00000007)        /*!<SMP0[2:0] bits (Channel 0 Sample time selection) */\r
2964 #define  ADC_SMPR2_SMP0_0                    ((uint32_t)0x00000001)        /*!<Bit 0 */\r
2965 #define  ADC_SMPR2_SMP0_1                    ((uint32_t)0x00000002)        /*!<Bit 1 */\r
2966 #define  ADC_SMPR2_SMP0_2                    ((uint32_t)0x00000004)        /*!<Bit 2 */\r
2967 \r
2968 #define  ADC_SMPR2_SMP1                      ((uint32_t)0x00000038)        /*!<SMP1[2:0] bits (Channel 1 Sample time selection) */\r
2969 #define  ADC_SMPR2_SMP1_0                    ((uint32_t)0x00000008)        /*!<Bit 0 */\r
2970 #define  ADC_SMPR2_SMP1_1                    ((uint32_t)0x00000010)        /*!<Bit 1 */\r
2971 #define  ADC_SMPR2_SMP1_2                    ((uint32_t)0x00000020)        /*!<Bit 2 */\r
2972 \r
2973 #define  ADC_SMPR2_SMP2                      ((uint32_t)0x000001C0)        /*!<SMP2[2:0] bits (Channel 2 Sample time selection) */\r
2974 #define  ADC_SMPR2_SMP2_0                    ((uint32_t)0x00000040)        /*!<Bit 0 */\r
2975 #define  ADC_SMPR2_SMP2_1                    ((uint32_t)0x00000080)        /*!<Bit 1 */\r
2976 #define  ADC_SMPR2_SMP2_2                    ((uint32_t)0x00000100)        /*!<Bit 2 */\r
2977 \r
2978 #define  ADC_SMPR2_SMP3                      ((uint32_t)0x00000E00)        /*!<SMP3[2:0] bits (Channel 3 Sample time selection) */\r
2979 #define  ADC_SMPR2_SMP3_0                    ((uint32_t)0x00000200)        /*!<Bit 0 */\r
2980 #define  ADC_SMPR2_SMP3_1                    ((uint32_t)0x00000400)        /*!<Bit 1 */\r
2981 #define  ADC_SMPR2_SMP3_2                    ((uint32_t)0x00000800)        /*!<Bit 2 */\r
2982 \r
2983 #define  ADC_SMPR2_SMP4                      ((uint32_t)0x00007000)        /*!<SMP4[2:0] bits (Channel 4 Sample time selection) */\r
2984 #define  ADC_SMPR2_SMP4_0                    ((uint32_t)0x00001000)        /*!<Bit 0 */\r
2985 #define  ADC_SMPR2_SMP4_1                    ((uint32_t)0x00002000)        /*!<Bit 1 */\r
2986 #define  ADC_SMPR2_SMP4_2                    ((uint32_t)0x00004000)        /*!<Bit 2 */\r
2987 \r
2988 #define  ADC_SMPR2_SMP5                      ((uint32_t)0x00038000)        /*!<SMP5[2:0] bits (Channel 5 Sample time selection) */\r
2989 #define  ADC_SMPR2_SMP5_0                    ((uint32_t)0x00008000)        /*!<Bit 0 */\r
2990 #define  ADC_SMPR2_SMP5_1                    ((uint32_t)0x00010000)        /*!<Bit 1 */\r
2991 #define  ADC_SMPR2_SMP5_2                    ((uint32_t)0x00020000)        /*!<Bit 2 */\r
2992 \r
2993 #define  ADC_SMPR2_SMP6                      ((uint32_t)0x001C0000)        /*!<SMP6[2:0] bits (Channel 6 Sample time selection) */\r
2994 #define  ADC_SMPR2_SMP6_0                    ((uint32_t)0x00040000)        /*!<Bit 0 */\r
2995 #define  ADC_SMPR2_SMP6_1                    ((uint32_t)0x00080000)        /*!<Bit 1 */\r
2996 #define  ADC_SMPR2_SMP6_2                    ((uint32_t)0x00100000)        /*!<Bit 2 */\r
2997 \r
2998 #define  ADC_SMPR2_SMP7                      ((uint32_t)0x00E00000)        /*!<SMP7[2:0] bits (Channel 7 Sample time selection) */\r
2999 #define  ADC_SMPR2_SMP7_0                    ((uint32_t)0x00200000)        /*!<Bit 0 */\r
3000 #define  ADC_SMPR2_SMP7_1                    ((uint32_t)0x00400000)        /*!<Bit 1 */\r
3001 #define  ADC_SMPR2_SMP7_2                    ((uint32_t)0x00800000)        /*!<Bit 2 */\r
3002 \r
3003 #define  ADC_SMPR2_SMP8                      ((uint32_t)0x07000000)        /*!<SMP8[2:0] bits (Channel 8 Sample time selection) */\r
3004 #define  ADC_SMPR2_SMP8_0                    ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3005 #define  ADC_SMPR2_SMP8_1                    ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3006 #define  ADC_SMPR2_SMP8_2                    ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3007 \r
3008 #define  ADC_SMPR2_SMP9                      ((uint32_t)0x38000000)        /*!<SMP9[2:0] bits (Channel 9 Sample time selection) */\r
3009 #define  ADC_SMPR2_SMP9_0                    ((uint32_t)0x08000000)        /*!<Bit 0 */\r
3010 #define  ADC_SMPR2_SMP9_1                    ((uint32_t)0x10000000)        /*!<Bit 1 */\r
3011 #define  ADC_SMPR2_SMP9_2                    ((uint32_t)0x20000000)        /*!<Bit 2 */\r
3012 \r
3013 /******************  Bit definition for ADC_JOFR1 register  *******************/\r
3014 #define  ADC_JOFR1_JOFFSET1                  ((uint16_t)0x0FFF)            /*!<Data offset for injected channel 1 */\r
3015 \r
3016 /******************  Bit definition for ADC_JOFR2 register  *******************/\r
3017 #define  ADC_JOFR2_JOFFSET2                  ((uint16_t)0x0FFF)            /*!<Data offset for injected channel 2 */\r
3018 \r
3019 /******************  Bit definition for ADC_JOFR3 register  *******************/\r
3020 #define  ADC_JOFR3_JOFFSET3                  ((uint16_t)0x0FFF)            /*!<Data offset for injected channel 3 */\r
3021 \r
3022 /******************  Bit definition for ADC_JOFR4 register  *******************/\r
3023 #define  ADC_JOFR4_JOFFSET4                  ((uint16_t)0x0FFF)            /*!<Data offset for injected channel 4 */\r
3024 \r
3025 /*******************  Bit definition for ADC_HTR register  ********************/\r
3026 #define  ADC_HTR_HT                          ((uint16_t)0x0FFF)            /*!<Analog watchdog high threshold */\r
3027 \r
3028 /*******************  Bit definition for ADC_LTR register  ********************/\r
3029 #define  ADC_LTR_LT                          ((uint16_t)0x0FFF)            /*!<Analog watchdog low threshold */\r
3030 \r
3031 /*******************  Bit definition for ADC_SQR1 register  *******************/\r
3032 #define  ADC_SQR1_SQ13                       ((uint32_t)0x0000001F)        /*!<SQ13[4:0] bits (13th conversion in regular sequence) */\r
3033 #define  ADC_SQR1_SQ13_0                     ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3034 #define  ADC_SQR1_SQ13_1                     ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3035 #define  ADC_SQR1_SQ13_2                     ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3036 #define  ADC_SQR1_SQ13_3                     ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3037 #define  ADC_SQR1_SQ13_4                     ((uint32_t)0x00000010)        /*!<Bit 4 */\r
3038 \r
3039 #define  ADC_SQR1_SQ14                       ((uint32_t)0x000003E0)        /*!<SQ14[4:0] bits (14th conversion in regular sequence) */\r
3040 #define  ADC_SQR1_SQ14_0                     ((uint32_t)0x00000020)        /*!<Bit 0 */\r
3041 #define  ADC_SQR1_SQ14_1                     ((uint32_t)0x00000040)        /*!<Bit 1 */\r
3042 #define  ADC_SQR1_SQ14_2                     ((uint32_t)0x00000080)        /*!<Bit 2 */\r
3043 #define  ADC_SQR1_SQ14_3                     ((uint32_t)0x00000100)        /*!<Bit 3 */\r
3044 #define  ADC_SQR1_SQ14_4                     ((uint32_t)0x00000200)        /*!<Bit 4 */\r
3045 \r
3046 #define  ADC_SQR1_SQ15                       ((uint32_t)0x00007C00)        /*!<SQ15[4:0] bits (15th conversion in regular sequence) */\r
3047 #define  ADC_SQR1_SQ15_0                     ((uint32_t)0x00000400)        /*!<Bit 0 */\r
3048 #define  ADC_SQR1_SQ15_1                     ((uint32_t)0x00000800)        /*!<Bit 1 */\r
3049 #define  ADC_SQR1_SQ15_2                     ((uint32_t)0x00001000)        /*!<Bit 2 */\r
3050 #define  ADC_SQR1_SQ15_3                     ((uint32_t)0x00002000)        /*!<Bit 3 */\r
3051 #define  ADC_SQR1_SQ15_4                     ((uint32_t)0x00004000)        /*!<Bit 4 */\r
3052 \r
3053 #define  ADC_SQR1_SQ16                       ((uint32_t)0x000F8000)        /*!<SQ16[4:0] bits (16th conversion in regular sequence) */\r
3054 #define  ADC_SQR1_SQ16_0                     ((uint32_t)0x00008000)        /*!<Bit 0 */\r
3055 #define  ADC_SQR1_SQ16_1                     ((uint32_t)0x00010000)        /*!<Bit 1 */\r
3056 #define  ADC_SQR1_SQ16_2                     ((uint32_t)0x00020000)        /*!<Bit 2 */\r
3057 #define  ADC_SQR1_SQ16_3                     ((uint32_t)0x00040000)        /*!<Bit 3 */\r
3058 #define  ADC_SQR1_SQ16_4                     ((uint32_t)0x00080000)        /*!<Bit 4 */\r
3059 \r
3060 #define  ADC_SQR1_L                          ((uint32_t)0x00F00000)        /*!<L[3:0] bits (Regular channel sequence length) */\r
3061 #define  ADC_SQR1_L_0                        ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3062 #define  ADC_SQR1_L_1                        ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3063 #define  ADC_SQR1_L_2                        ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3064 #define  ADC_SQR1_L_3                        ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3065 \r
3066 /*******************  Bit definition for ADC_SQR2 register  *******************/\r
3067 #define  ADC_SQR2_SQ7                        ((uint32_t)0x0000001F)        /*!<SQ7[4:0] bits (7th conversion in regular sequence) */\r
3068 #define  ADC_SQR2_SQ7_0                      ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3069 #define  ADC_SQR2_SQ7_1                      ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3070 #define  ADC_SQR2_SQ7_2                      ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3071 #define  ADC_SQR2_SQ7_3                      ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3072 #define  ADC_SQR2_SQ7_4                      ((uint32_t)0x00000010)        /*!<Bit 4 */\r
3073 \r
3074 #define  ADC_SQR2_SQ8                        ((uint32_t)0x000003E0)        /*!<SQ8[4:0] bits (8th conversion in regular sequence) */\r
3075 #define  ADC_SQR2_SQ8_0                      ((uint32_t)0x00000020)        /*!<Bit 0 */\r
3076 #define  ADC_SQR2_SQ8_1                      ((uint32_t)0x00000040)        /*!<Bit 1 */\r
3077 #define  ADC_SQR2_SQ8_2                      ((uint32_t)0x00000080)        /*!<Bit 2 */\r
3078 #define  ADC_SQR2_SQ8_3                      ((uint32_t)0x00000100)        /*!<Bit 3 */\r
3079 #define  ADC_SQR2_SQ8_4                      ((uint32_t)0x00000200)        /*!<Bit 4 */\r
3080 \r
3081 #define  ADC_SQR2_SQ9                        ((uint32_t)0x00007C00)        /*!<SQ9[4:0] bits (9th conversion in regular sequence) */\r
3082 #define  ADC_SQR2_SQ9_0                      ((uint32_t)0x00000400)        /*!<Bit 0 */\r
3083 #define  ADC_SQR2_SQ9_1                      ((uint32_t)0x00000800)        /*!<Bit 1 */\r
3084 #define  ADC_SQR2_SQ9_2                      ((uint32_t)0x00001000)        /*!<Bit 2 */\r
3085 #define  ADC_SQR2_SQ9_3                      ((uint32_t)0x00002000)        /*!<Bit 3 */\r
3086 #define  ADC_SQR2_SQ9_4                      ((uint32_t)0x00004000)        /*!<Bit 4 */\r
3087 \r
3088 #define  ADC_SQR2_SQ10                       ((uint32_t)0x000F8000)        /*!<SQ10[4:0] bits (10th conversion in regular sequence) */\r
3089 #define  ADC_SQR2_SQ10_0                     ((uint32_t)0x00008000)        /*!<Bit 0 */\r
3090 #define  ADC_SQR2_SQ10_1                     ((uint32_t)0x00010000)        /*!<Bit 1 */\r
3091 #define  ADC_SQR2_SQ10_2                     ((uint32_t)0x00020000)        /*!<Bit 2 */\r
3092 #define  ADC_SQR2_SQ10_3                     ((uint32_t)0x00040000)        /*!<Bit 3 */\r
3093 #define  ADC_SQR2_SQ10_4                     ((uint32_t)0x00080000)        /*!<Bit 4 */\r
3094 \r
3095 #define  ADC_SQR2_SQ11                       ((uint32_t)0x01F00000)        /*!<SQ11[4:0] bits (11th conversion in regular sequence) */\r
3096 #define  ADC_SQR2_SQ11_0                     ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3097 #define  ADC_SQR2_SQ11_1                     ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3098 #define  ADC_SQR2_SQ11_2                     ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3099 #define  ADC_SQR2_SQ11_3                     ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3100 #define  ADC_SQR2_SQ11_4                     ((uint32_t)0x01000000)        /*!<Bit 4 */\r
3101 \r
3102 #define  ADC_SQR2_SQ12                       ((uint32_t)0x3E000000)        /*!<SQ12[4:0] bits (12th conversion in regular sequence) */\r
3103 #define  ADC_SQR2_SQ12_0                     ((uint32_t)0x02000000)        /*!<Bit 0 */\r
3104 #define  ADC_SQR2_SQ12_1                     ((uint32_t)0x04000000)        /*!<Bit 1 */\r
3105 #define  ADC_SQR2_SQ12_2                     ((uint32_t)0x08000000)        /*!<Bit 2 */\r
3106 #define  ADC_SQR2_SQ12_3                     ((uint32_t)0x10000000)        /*!<Bit 3 */\r
3107 #define  ADC_SQR2_SQ12_4                     ((uint32_t)0x20000000)        /*!<Bit 4 */\r
3108 \r
3109 /*******************  Bit definition for ADC_SQR3 register  *******************/\r
3110 #define  ADC_SQR3_SQ1                        ((uint32_t)0x0000001F)        /*!<SQ1[4:0] bits (1st conversion in regular sequence) */\r
3111 #define  ADC_SQR3_SQ1_0                      ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3112 #define  ADC_SQR3_SQ1_1                      ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3113 #define  ADC_SQR3_SQ1_2                      ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3114 #define  ADC_SQR3_SQ1_3                      ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3115 #define  ADC_SQR3_SQ1_4                      ((uint32_t)0x00000010)        /*!<Bit 4 */\r
3116 \r
3117 #define  ADC_SQR3_SQ2                        ((uint32_t)0x000003E0)        /*!<SQ2[4:0] bits (2nd conversion in regular sequence) */\r
3118 #define  ADC_SQR3_SQ2_0                      ((uint32_t)0x00000020)        /*!<Bit 0 */\r
3119 #define  ADC_SQR3_SQ2_1                      ((uint32_t)0x00000040)        /*!<Bit 1 */\r
3120 #define  ADC_SQR3_SQ2_2                      ((uint32_t)0x00000080)        /*!<Bit 2 */\r
3121 #define  ADC_SQR3_SQ2_3                      ((uint32_t)0x00000100)        /*!<Bit 3 */\r
3122 #define  ADC_SQR3_SQ2_4                      ((uint32_t)0x00000200)        /*!<Bit 4 */\r
3123 \r
3124 #define  ADC_SQR3_SQ3                        ((uint32_t)0x00007C00)        /*!<SQ3[4:0] bits (3rd conversion in regular sequence) */\r
3125 #define  ADC_SQR3_SQ3_0                      ((uint32_t)0x00000400)        /*!<Bit 0 */\r
3126 #define  ADC_SQR3_SQ3_1                      ((uint32_t)0x00000800)        /*!<Bit 1 */\r
3127 #define  ADC_SQR3_SQ3_2                      ((uint32_t)0x00001000)        /*!<Bit 2 */\r
3128 #define  ADC_SQR3_SQ3_3                      ((uint32_t)0x00002000)        /*!<Bit 3 */\r
3129 #define  ADC_SQR3_SQ3_4                      ((uint32_t)0x00004000)        /*!<Bit 4 */\r
3130 \r
3131 #define  ADC_SQR3_SQ4                        ((uint32_t)0x000F8000)        /*!<SQ4[4:0] bits (4th conversion in regular sequence) */\r
3132 #define  ADC_SQR3_SQ4_0                      ((uint32_t)0x00008000)        /*!<Bit 0 */\r
3133 #define  ADC_SQR3_SQ4_1                      ((uint32_t)0x00010000)        /*!<Bit 1 */\r
3134 #define  ADC_SQR3_SQ4_2                      ((uint32_t)0x00020000)        /*!<Bit 2 */\r
3135 #define  ADC_SQR3_SQ4_3                      ((uint32_t)0x00040000)        /*!<Bit 3 */\r
3136 #define  ADC_SQR3_SQ4_4                      ((uint32_t)0x00080000)        /*!<Bit 4 */\r
3137 \r
3138 #define  ADC_SQR3_SQ5                        ((uint32_t)0x01F00000)        /*!<SQ5[4:0] bits (5th conversion in regular sequence) */\r
3139 #define  ADC_SQR3_SQ5_0                      ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3140 #define  ADC_SQR3_SQ5_1                      ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3141 #define  ADC_SQR3_SQ5_2                      ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3142 #define  ADC_SQR3_SQ5_3                      ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3143 #define  ADC_SQR3_SQ5_4                      ((uint32_t)0x01000000)        /*!<Bit 4 */\r
3144 \r
3145 #define  ADC_SQR3_SQ6                        ((uint32_t)0x3E000000)        /*!<SQ6[4:0] bits (6th conversion in regular sequence) */\r
3146 #define  ADC_SQR3_SQ6_0                      ((uint32_t)0x02000000)        /*!<Bit 0 */\r
3147 #define  ADC_SQR3_SQ6_1                      ((uint32_t)0x04000000)        /*!<Bit 1 */\r
3148 #define  ADC_SQR3_SQ6_2                      ((uint32_t)0x08000000)        /*!<Bit 2 */\r
3149 #define  ADC_SQR3_SQ6_3                      ((uint32_t)0x10000000)        /*!<Bit 3 */\r
3150 #define  ADC_SQR3_SQ6_4                      ((uint32_t)0x20000000)        /*!<Bit 4 */\r
3151 \r
3152 /*******************  Bit definition for ADC_JSQR register  *******************/\r
3153 #define  ADC_JSQR_JSQ1                       ((uint32_t)0x0000001F)        /*!<JSQ1[4:0] bits (1st conversion in injected sequence) */\r
3154 #define  ADC_JSQR_JSQ1_0                     ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3155 #define  ADC_JSQR_JSQ1_1                     ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3156 #define  ADC_JSQR_JSQ1_2                     ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3157 #define  ADC_JSQR_JSQ1_3                     ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3158 #define  ADC_JSQR_JSQ1_4                     ((uint32_t)0x00000010)        /*!<Bit 4 */\r
3159 \r
3160 #define  ADC_JSQR_JSQ2                       ((uint32_t)0x000003E0)        /*!<JSQ2[4:0] bits (2nd conversion in injected sequence) */\r
3161 #define  ADC_JSQR_JSQ2_0                     ((uint32_t)0x00000020)        /*!<Bit 0 */\r
3162 #define  ADC_JSQR_JSQ2_1                     ((uint32_t)0x00000040)        /*!<Bit 1 */\r
3163 #define  ADC_JSQR_JSQ2_2                     ((uint32_t)0x00000080)        /*!<Bit 2 */\r
3164 #define  ADC_JSQR_JSQ2_3                     ((uint32_t)0x00000100)        /*!<Bit 3 */\r
3165 #define  ADC_JSQR_JSQ2_4                     ((uint32_t)0x00000200)        /*!<Bit 4 */\r
3166 \r
3167 #define  ADC_JSQR_JSQ3                       ((uint32_t)0x00007C00)        /*!<JSQ3[4:0] bits (3rd conversion in injected sequence) */\r
3168 #define  ADC_JSQR_JSQ3_0                     ((uint32_t)0x00000400)        /*!<Bit 0 */\r
3169 #define  ADC_JSQR_JSQ3_1                     ((uint32_t)0x00000800)        /*!<Bit 1 */\r
3170 #define  ADC_JSQR_JSQ3_2                     ((uint32_t)0x00001000)        /*!<Bit 2 */\r
3171 #define  ADC_JSQR_JSQ3_3                     ((uint32_t)0x00002000)        /*!<Bit 3 */\r
3172 #define  ADC_JSQR_JSQ3_4                     ((uint32_t)0x00004000)        /*!<Bit 4 */\r
3173 \r
3174 #define  ADC_JSQR_JSQ4                       ((uint32_t)0x000F8000)        /*!<JSQ4[4:0] bits (4th conversion in injected sequence) */\r
3175 #define  ADC_JSQR_JSQ4_0                     ((uint32_t)0x00008000)        /*!<Bit 0 */\r
3176 #define  ADC_JSQR_JSQ4_1                     ((uint32_t)0x00010000)        /*!<Bit 1 */\r
3177 #define  ADC_JSQR_JSQ4_2                     ((uint32_t)0x00020000)        /*!<Bit 2 */\r
3178 #define  ADC_JSQR_JSQ4_3                     ((uint32_t)0x00040000)        /*!<Bit 3 */\r
3179 #define  ADC_JSQR_JSQ4_4                     ((uint32_t)0x00080000)        /*!<Bit 4 */\r
3180 \r
3181 #define  ADC_JSQR_JL                         ((uint32_t)0x00300000)        /*!<JL[1:0] bits (Injected Sequence length) */\r
3182 #define  ADC_JSQR_JL_0                       ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3183 #define  ADC_JSQR_JL_1                       ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3184 \r
3185 /*******************  Bit definition for ADC_JDR1 register  *******************/\r
3186 #define  ADC_JDR1_JDATA                      ((uint16_t)0xFFFF)            /*!<Injected data */\r
3187 \r
3188 /*******************  Bit definition for ADC_JDR2 register  *******************/\r
3189 #define  ADC_JDR2_JDATA                      ((uint16_t)0xFFFF)            /*!<Injected data */\r
3190 \r
3191 /*******************  Bit definition for ADC_JDR3 register  *******************/\r
3192 #define  ADC_JDR3_JDATA                      ((uint16_t)0xFFFF)            /*!<Injected data */\r
3193 \r
3194 /*******************  Bit definition for ADC_JDR4 register  *******************/\r
3195 #define  ADC_JDR4_JDATA                      ((uint16_t)0xFFFF)            /*!<Injected data */\r
3196 \r
3197 /********************  Bit definition for ADC_DR register  ********************/\r
3198 #define  ADC_DR_DATA                         ((uint32_t)0x0000FFFF)        /*!<Regular data */\r
3199 #define  ADC_DR_ADC2DATA                     ((uint32_t)0xFFFF0000)        /*!<ADC2 data */\r
3200 \r
3201 /******************************************************************************/\r
3202 /*                                                                            */\r
3203 /*                      Digital to Analog Converter                           */\r
3204 /*                                                                            */\r
3205 /******************************************************************************/\r
3206 \r
3207 /********************  Bit definition for DAC_CR register  ********************/\r
3208 #define  DAC_CR_EN1                          ((uint32_t)0x00000001)        /*!<DAC channel1 enable */\r
3209 #define  DAC_CR_BOFF1                        ((uint32_t)0x00000002)        /*!<DAC channel1 output buffer disable */\r
3210 #define  DAC_CR_TEN1                         ((uint32_t)0x00000004)        /*!<DAC channel1 Trigger enable */\r
3211 \r
3212 #define  DAC_CR_TSEL1                        ((uint32_t)0x00000038)        /*!<TSEL1[2:0] (DAC channel1 Trigger selection) */\r
3213 #define  DAC_CR_TSEL1_0                      ((uint32_t)0x00000008)        /*!<Bit 0 */\r
3214 #define  DAC_CR_TSEL1_1                      ((uint32_t)0x00000010)        /*!<Bit 1 */\r
3215 #define  DAC_CR_TSEL1_2                      ((uint32_t)0x00000020)        /*!<Bit 2 */\r
3216 \r
3217 #define  DAC_CR_WAVE1                        ((uint32_t)0x000000C0)        /*!<WAVE1[1:0] (DAC channel1 noise/triangle wave generation enable) */\r
3218 #define  DAC_CR_WAVE1_0                      ((uint32_t)0x00000040)        /*!<Bit 0 */\r
3219 #define  DAC_CR_WAVE1_1                      ((uint32_t)0x00000080)        /*!<Bit 1 */\r
3220 \r
3221 #define  DAC_CR_MAMP1                        ((uint32_t)0x00000F00)        /*!<MAMP1[3:0] (DAC channel1 Mask/Amplitude selector) */\r
3222 #define  DAC_CR_MAMP1_0                      ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3223 #define  DAC_CR_MAMP1_1                      ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3224 #define  DAC_CR_MAMP1_2                      ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3225 #define  DAC_CR_MAMP1_3                      ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3226 \r
3227 #define  DAC_CR_DMAEN1                       ((uint32_t)0x00001000)        /*!<DAC channel1 DMA enable */\r
3228 #define  DAC_CR_EN2                          ((uint32_t)0x00010000)        /*!<DAC channel2 enable */\r
3229 #define  DAC_CR_BOFF2                        ((uint32_t)0x00020000)        /*!<DAC channel2 output buffer disable */\r
3230 #define  DAC_CR_TEN2                         ((uint32_t)0x00040000)        /*!<DAC channel2 Trigger enable */\r
3231 \r
3232 #define  DAC_CR_TSEL2                        ((uint32_t)0x00380000)        /*!<TSEL2[2:0] (DAC channel2 Trigger selection) */\r
3233 #define  DAC_CR_TSEL2_0                      ((uint32_t)0x00080000)        /*!<Bit 0 */\r
3234 #define  DAC_CR_TSEL2_1                      ((uint32_t)0x00100000)        /*!<Bit 1 */\r
3235 #define  DAC_CR_TSEL2_2                      ((uint32_t)0x00200000)        /*!<Bit 2 */\r
3236 \r
3237 #define  DAC_CR_WAVE2                        ((uint32_t)0x00C00000)        /*!<WAVE2[1:0] (DAC channel2 noise/triangle wave generation enable) */\r
3238 #define  DAC_CR_WAVE2_0                      ((uint32_t)0x00400000)        /*!<Bit 0 */\r
3239 #define  DAC_CR_WAVE2_1                      ((uint32_t)0x00800000)        /*!<Bit 1 */\r
3240 \r
3241 #define  DAC_CR_MAMP2                        ((uint32_t)0x0F000000)        /*!<MAMP2[3:0] (DAC channel2 Mask/Amplitude selector) */\r
3242 #define  DAC_CR_MAMP2_0                      ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3243 #define  DAC_CR_MAMP2_1                      ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3244 #define  DAC_CR_MAMP2_2                      ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3245 #define  DAC_CR_MAMP2_3                      ((uint32_t)0x08000000)        /*!<Bit 3 */\r
3246 \r
3247 #define  DAC_CR_DMAEN2                       ((uint32_t)0x10000000)        /*!<DAC channel2 DMA enabled */\r
3248 \r
3249 /*****************  Bit definition for DAC_SWTRIGR register  ******************/\r
3250 #define  DAC_SWTRIGR_SWTRIG1                 ((uint8_t)0x01)               /*!<DAC channel1 software trigger */\r
3251 #define  DAC_SWTRIGR_SWTRIG2                 ((uint8_t)0x02)               /*!<DAC channel2 software trigger */\r
3252 \r
3253 /*****************  Bit definition for DAC_DHR12R1 register  ******************/\r
3254 #define  DAC_DHR12R1_DACC1DHR                ((uint16_t)0x0FFF)            /*!<DAC channel1 12-bit Right aligned data */\r
3255 \r
3256 /*****************  Bit definition for DAC_DHR12L1 register  ******************/\r
3257 #define  DAC_DHR12L1_DACC1DHR                ((uint16_t)0xFFF0)            /*!<DAC channel1 12-bit Left aligned data */\r
3258 \r
3259 /******************  Bit definition for DAC_DHR8R1 register  ******************/\r
3260 #define  DAC_DHR8R1_DACC1DHR                 ((uint8_t)0xFF)               /*!<DAC channel1 8-bit Right aligned data */\r
3261 \r
3262 /*****************  Bit definition for DAC_DHR12R2 register  ******************/\r
3263 #define  DAC_DHR12R2_DACC2DHR                ((uint16_t)0x0FFF)            /*!<DAC channel2 12-bit Right aligned data */\r
3264 \r
3265 /*****************  Bit definition for DAC_DHR12L2 register  ******************/\r
3266 #define  DAC_DHR12L2_DACC2DHR                ((uint16_t)0xFFF0)            /*!<DAC channel2 12-bit Left aligned data */\r
3267 \r
3268 /******************  Bit definition for DAC_DHR8R2 register  ******************/\r
3269 #define  DAC_DHR8R2_DACC2DHR                 ((uint8_t)0xFF)               /*!<DAC channel2 8-bit Right aligned data */\r
3270 \r
3271 /*****************  Bit definition for DAC_DHR12RD register  ******************/\r
3272 #define  DAC_DHR12RD_DACC1DHR                ((uint32_t)0x00000FFF)        /*!<DAC channel1 12-bit Right aligned data */\r
3273 #define  DAC_DHR12RD_DACC2DHR                ((uint32_t)0x0FFF0000)        /*!<DAC channel2 12-bit Right aligned data */\r
3274 \r
3275 /*****************  Bit definition for DAC_DHR12LD register  ******************/\r
3276 #define  DAC_DHR12LD_DACC1DHR                ((uint32_t)0x0000FFF0)        /*!<DAC channel1 12-bit Left aligned data */\r
3277 #define  DAC_DHR12LD_DACC2DHR                ((uint32_t)0xFFF00000)        /*!<DAC channel2 12-bit Left aligned data */\r
3278 \r
3279 /******************  Bit definition for DAC_DHR8RD register  ******************/\r
3280 #define  DAC_DHR8RD_DACC1DHR                 ((uint16_t)0x00FF)            /*!<DAC channel1 8-bit Right aligned data */\r
3281 #define  DAC_DHR8RD_DACC2DHR                 ((uint16_t)0xFF00)            /*!<DAC channel2 8-bit Right aligned data */\r
3282 \r
3283 /*******************  Bit definition for DAC_DOR1 register  *******************/\r
3284 #define  DAC_DOR1_DACC1DOR                   ((uint16_t)0x0FFF)            /*!<DAC channel1 data output */\r
3285 \r
3286 /*******************  Bit definition for DAC_DOR2 register  *******************/\r
3287 #define  DAC_DOR2_DACC2DOR                   ((uint16_t)0x0FFF)            /*!<DAC channel2 data output */\r
3288 \r
3289 /******************************************************************************/\r
3290 /*                                                                            */\r
3291 /*                                    TIM                                     */\r
3292 /*                                                                            */\r
3293 /******************************************************************************/\r
3294 \r
3295 /*******************  Bit definition for TIM_CR1 register  ********************/\r
3296 #define  TIM_CR1_CEN                         ((uint16_t)0x0001)            /*!<Counter enable */\r
3297 #define  TIM_CR1_UDIS                        ((uint16_t)0x0002)            /*!<Update disable */\r
3298 #define  TIM_CR1_URS                         ((uint16_t)0x0004)            /*!<Update request source */\r
3299 #define  TIM_CR1_OPM                         ((uint16_t)0x0008)            /*!<One pulse mode */\r
3300 #define  TIM_CR1_DIR                         ((uint16_t)0x0010)            /*!<Direction */\r
3301 \r
3302 #define  TIM_CR1_CMS                         ((uint16_t)0x0060)            /*!<CMS[1:0] bits (Center-aligned mode selection) */\r
3303 #define  TIM_CR1_CMS_0                       ((uint16_t)0x0020)            /*!<Bit 0 */\r
3304 #define  TIM_CR1_CMS_1                       ((uint16_t)0x0040)            /*!<Bit 1 */\r
3305 \r
3306 #define  TIM_CR1_ARPE                        ((uint16_t)0x0080)            /*!<Auto-reload preload enable */\r
3307 \r
3308 #define  TIM_CR1_CKD                         ((uint16_t)0x0300)            /*!<CKD[1:0] bits (clock division) */\r
3309 #define  TIM_CR1_CKD_0                       ((uint16_t)0x0100)            /*!<Bit 0 */\r
3310 #define  TIM_CR1_CKD_1                       ((uint16_t)0x0200)            /*!<Bit 1 */\r
3311 \r
3312 /*******************  Bit definition for TIM_CR2 register  ********************/\r
3313 #define  TIM_CR2_CCPC                        ((uint16_t)0x0001)            /*!<Capture/Compare Preloaded Control */\r
3314 #define  TIM_CR2_CCUS                        ((uint16_t)0x0004)            /*!<Capture/Compare Control Update Selection */\r
3315 #define  TIM_CR2_CCDS                        ((uint16_t)0x0008)            /*!<Capture/Compare DMA Selection */\r
3316 \r
3317 #define  TIM_CR2_MMS                         ((uint16_t)0x0070)            /*!<MMS[2:0] bits (Master Mode Selection) */\r
3318 #define  TIM_CR2_MMS_0                       ((uint16_t)0x0010)            /*!<Bit 0 */\r
3319 #define  TIM_CR2_MMS_1                       ((uint16_t)0x0020)            /*!<Bit 1 */\r
3320 #define  TIM_CR2_MMS_2                       ((uint16_t)0x0040)            /*!<Bit 2 */\r
3321 \r
3322 #define  TIM_CR2_TI1S                        ((uint16_t)0x0080)            /*!<TI1 Selection */\r
3323 #define  TIM_CR2_OIS1                        ((uint16_t)0x0100)            /*!<Output Idle state 1 (OC1 output) */\r
3324 #define  TIM_CR2_OIS1N                       ((uint16_t)0x0200)            /*!<Output Idle state 1 (OC1N output) */\r
3325 #define  TIM_CR2_OIS2                        ((uint16_t)0x0400)            /*!<Output Idle state 2 (OC2 output) */\r
3326 #define  TIM_CR2_OIS2N                       ((uint16_t)0x0800)            /*!<Output Idle state 2 (OC2N output) */\r
3327 #define  TIM_CR2_OIS3                        ((uint16_t)0x1000)            /*!<Output Idle state 3 (OC3 output) */\r
3328 #define  TIM_CR2_OIS3N                       ((uint16_t)0x2000)            /*!<Output Idle state 3 (OC3N output) */\r
3329 #define  TIM_CR2_OIS4                        ((uint16_t)0x4000)            /*!<Output Idle state 4 (OC4 output) */\r
3330 \r
3331 /*******************  Bit definition for TIM_SMCR register  *******************/\r
3332 #define  TIM_SMCR_SMS                        ((uint16_t)0x0007)            /*!<SMS[2:0] bits (Slave mode selection) */\r
3333 #define  TIM_SMCR_SMS_0                      ((uint16_t)0x0001)            /*!<Bit 0 */\r
3334 #define  TIM_SMCR_SMS_1                      ((uint16_t)0x0002)            /*!<Bit 1 */\r
3335 #define  TIM_SMCR_SMS_2                      ((uint16_t)0x0004)            /*!<Bit 2 */\r
3336 \r
3337 #define  TIM_SMCR_TS                         ((uint16_t)0x0070)            /*!<TS[2:0] bits (Trigger selection) */\r
3338 #define  TIM_SMCR_TS_0                       ((uint16_t)0x0010)            /*!<Bit 0 */\r
3339 #define  TIM_SMCR_TS_1                       ((uint16_t)0x0020)            /*!<Bit 1 */\r
3340 #define  TIM_SMCR_TS_2                       ((uint16_t)0x0040)            /*!<Bit 2 */\r
3341 \r
3342 #define  TIM_SMCR_MSM                        ((uint16_t)0x0080)            /*!<Master/slave mode */\r
3343 \r
3344 #define  TIM_SMCR_ETF                        ((uint16_t)0x0F00)            /*!<ETF[3:0] bits (External trigger filter) */\r
3345 #define  TIM_SMCR_ETF_0                      ((uint16_t)0x0100)            /*!<Bit 0 */\r
3346 #define  TIM_SMCR_ETF_1                      ((uint16_t)0x0200)            /*!<Bit 1 */\r
3347 #define  TIM_SMCR_ETF_2                      ((uint16_t)0x0400)            /*!<Bit 2 */\r
3348 #define  TIM_SMCR_ETF_3                      ((uint16_t)0x0800)            /*!<Bit 3 */\r
3349 \r
3350 #define  TIM_SMCR_ETPS                       ((uint16_t)0x3000)            /*!<ETPS[1:0] bits (External trigger prescaler) */\r
3351 #define  TIM_SMCR_ETPS_0                     ((uint16_t)0x1000)            /*!<Bit 0 */\r
3352 #define  TIM_SMCR_ETPS_1                     ((uint16_t)0x2000)            /*!<Bit 1 */\r
3353 \r
3354 #define  TIM_SMCR_ECE                        ((uint16_t)0x4000)            /*!<External clock enable */\r
3355 #define  TIM_SMCR_ETP                        ((uint16_t)0x8000)            /*!<External trigger polarity */\r
3356 \r
3357 /*******************  Bit definition for TIM_DIER register  *******************/\r
3358 #define  TIM_DIER_UIE                        ((uint16_t)0x0001)            /*!<Update interrupt enable */\r
3359 #define  TIM_DIER_CC1IE                      ((uint16_t)0x0002)            /*!<Capture/Compare 1 interrupt enable */\r
3360 #define  TIM_DIER_CC2IE                      ((uint16_t)0x0004)            /*!<Capture/Compare 2 interrupt enable */\r
3361 #define  TIM_DIER_CC3IE                      ((uint16_t)0x0008)            /*!<Capture/Compare 3 interrupt enable */\r
3362 #define  TIM_DIER_CC4IE                      ((uint16_t)0x0010)            /*!<Capture/Compare 4 interrupt enable */\r
3363 #define  TIM_DIER_COMIE                      ((uint16_t)0x0020)            /*!<COM interrupt enable */\r
3364 #define  TIM_DIER_TIE                        ((uint16_t)0x0040)            /*!<Trigger interrupt enable */\r
3365 #define  TIM_DIER_BIE                        ((uint16_t)0x0080)            /*!<Break interrupt enable */\r
3366 #define  TIM_DIER_UDE                        ((uint16_t)0x0100)            /*!<Update DMA request enable */\r
3367 #define  TIM_DIER_CC1DE                      ((uint16_t)0x0200)            /*!<Capture/Compare 1 DMA request enable */\r
3368 #define  TIM_DIER_CC2DE                      ((uint16_t)0x0400)            /*!<Capture/Compare 2 DMA request enable */\r
3369 #define  TIM_DIER_CC3DE                      ((uint16_t)0x0800)            /*!<Capture/Compare 3 DMA request enable */\r
3370 #define  TIM_DIER_CC4DE                      ((uint16_t)0x1000)            /*!<Capture/Compare 4 DMA request enable */\r
3371 #define  TIM_DIER_COMDE                      ((uint16_t)0x2000)            /*!<COM DMA request enable */\r
3372 #define  TIM_DIER_TDE                        ((uint16_t)0x4000)            /*!<Trigger DMA request enable */\r
3373 \r
3374 /********************  Bit definition for TIM_SR register  ********************/\r
3375 #define  TIM_SR_UIF                          ((uint16_t)0x0001)            /*!<Update interrupt Flag */\r
3376 #define  TIM_SR_CC1IF                        ((uint16_t)0x0002)            /*!<Capture/Compare 1 interrupt Flag */\r
3377 #define  TIM_SR_CC2IF                        ((uint16_t)0x0004)            /*!<Capture/Compare 2 interrupt Flag */\r
3378 #define  TIM_SR_CC3IF                        ((uint16_t)0x0008)            /*!<Capture/Compare 3 interrupt Flag */\r
3379 #define  TIM_SR_CC4IF                        ((uint16_t)0x0010)            /*!<Capture/Compare 4 interrupt Flag */\r
3380 #define  TIM_SR_COMIF                        ((uint16_t)0x0020)            /*!<COM interrupt Flag */\r
3381 #define  TIM_SR_TIF                          ((uint16_t)0x0040)            /*!<Trigger interrupt Flag */\r
3382 #define  TIM_SR_BIF                          ((uint16_t)0x0080)            /*!<Break interrupt Flag */\r
3383 #define  TIM_SR_CC1OF                        ((uint16_t)0x0200)            /*!<Capture/Compare 1 Overcapture Flag */\r
3384 #define  TIM_SR_CC2OF                        ((uint16_t)0x0400)            /*!<Capture/Compare 2 Overcapture Flag */\r
3385 #define  TIM_SR_CC3OF                        ((uint16_t)0x0800)            /*!<Capture/Compare 3 Overcapture Flag */\r
3386 #define  TIM_SR_CC4OF                        ((uint16_t)0x1000)            /*!<Capture/Compare 4 Overcapture Flag */\r
3387 \r
3388 /*******************  Bit definition for TIM_EGR register  ********************/\r
3389 #define  TIM_EGR_UG                          ((uint8_t)0x01)               /*!<Update Generation */\r
3390 #define  TIM_EGR_CC1G                        ((uint8_t)0x02)               /*!<Capture/Compare 1 Generation */\r
3391 #define  TIM_EGR_CC2G                        ((uint8_t)0x04)               /*!<Capture/Compare 2 Generation */\r
3392 #define  TIM_EGR_CC3G                        ((uint8_t)0x08)               /*!<Capture/Compare 3 Generation */\r
3393 #define  TIM_EGR_CC4G                        ((uint8_t)0x10)               /*!<Capture/Compare 4 Generation */\r
3394 #define  TIM_EGR_COMG                        ((uint8_t)0x20)               /*!<Capture/Compare Control Update Generation */\r
3395 #define  TIM_EGR_TG                          ((uint8_t)0x40)               /*!<Trigger Generation */\r
3396 #define  TIM_EGR_BG                          ((uint8_t)0x80)               /*!<Break Generation */\r
3397 \r
3398 /******************  Bit definition for TIM_CCMR1 register  *******************/\r
3399 #define  TIM_CCMR1_CC1S                      ((uint16_t)0x0003)            /*!<CC1S[1:0] bits (Capture/Compare 1 Selection) */\r
3400 #define  TIM_CCMR1_CC1S_0                    ((uint16_t)0x0001)            /*!<Bit 0 */\r
3401 #define  TIM_CCMR1_CC1S_1                    ((uint16_t)0x0002)            /*!<Bit 1 */\r
3402 \r
3403 #define  TIM_CCMR1_OC1FE                     ((uint16_t)0x0004)            /*!<Output Compare 1 Fast enable */\r
3404 #define  TIM_CCMR1_OC1PE                     ((uint16_t)0x0008)            /*!<Output Compare 1 Preload enable */\r
3405 \r
3406 #define  TIM_CCMR1_OC1M                      ((uint16_t)0x0070)            /*!<OC1M[2:0] bits (Output Compare 1 Mode) */\r
3407 #define  TIM_CCMR1_OC1M_0                    ((uint16_t)0x0010)            /*!<Bit 0 */\r
3408 #define  TIM_CCMR1_OC1M_1                    ((uint16_t)0x0020)            /*!<Bit 1 */\r
3409 #define  TIM_CCMR1_OC1M_2                    ((uint16_t)0x0040)            /*!<Bit 2 */\r
3410 \r
3411 #define  TIM_CCMR1_OC1CE                     ((uint16_t)0x0080)            /*!<Output Compare 1Clear Enable */\r
3412 \r
3413 #define  TIM_CCMR1_CC2S                      ((uint16_t)0x0300)            /*!<CC2S[1:0] bits (Capture/Compare 2 Selection) */\r
3414 #define  TIM_CCMR1_CC2S_0                    ((uint16_t)0x0100)            /*!<Bit 0 */\r
3415 #define  TIM_CCMR1_CC2S_1                    ((uint16_t)0x0200)            /*!<Bit 1 */\r
3416 \r
3417 #define  TIM_CCMR1_OC2FE                     ((uint16_t)0x0400)            /*!<Output Compare 2 Fast enable */\r
3418 #define  TIM_CCMR1_OC2PE                     ((uint16_t)0x0800)            /*!<Output Compare 2 Preload enable */\r
3419 \r
3420 #define  TIM_CCMR1_OC2M                      ((uint16_t)0x7000)            /*!<OC2M[2:0] bits (Output Compare 2 Mode) */\r
3421 #define  TIM_CCMR1_OC2M_0                    ((uint16_t)0x1000)            /*!<Bit 0 */\r
3422 #define  TIM_CCMR1_OC2M_1                    ((uint16_t)0x2000)            /*!<Bit 1 */\r
3423 #define  TIM_CCMR1_OC2M_2                    ((uint16_t)0x4000)            /*!<Bit 2 */\r
3424 \r
3425 #define  TIM_CCMR1_OC2CE                     ((uint16_t)0x8000)            /*!<Output Compare 2 Clear Enable */\r
3426 \r
3427 /*----------------------------------------------------------------------------*/\r
3428 \r
3429 #define  TIM_CCMR1_IC1PSC                    ((uint16_t)0x000C)            /*!<IC1PSC[1:0] bits (Input Capture 1 Prescaler) */\r
3430 #define  TIM_CCMR1_IC1PSC_0                  ((uint16_t)0x0004)            /*!<Bit 0 */\r
3431 #define  TIM_CCMR1_IC1PSC_1                  ((uint16_t)0x0008)            /*!<Bit 1 */\r
3432 \r
3433 #define  TIM_CCMR1_IC1F                      ((uint16_t)0x00F0)            /*!<IC1F[3:0] bits (Input Capture 1 Filter) */\r
3434 #define  TIM_CCMR1_IC1F_0                    ((uint16_t)0x0010)            /*!<Bit 0 */\r
3435 #define  TIM_CCMR1_IC1F_1                    ((uint16_t)0x0020)            /*!<Bit 1 */\r
3436 #define  TIM_CCMR1_IC1F_2                    ((uint16_t)0x0040)            /*!<Bit 2 */\r
3437 #define  TIM_CCMR1_IC1F_3                    ((uint16_t)0x0080)            /*!<Bit 3 */\r
3438 \r
3439 #define  TIM_CCMR1_IC2PSC                    ((uint16_t)0x0C00)            /*!<IC2PSC[1:0] bits (Input Capture 2 Prescaler) */\r
3440 #define  TIM_CCMR1_IC2PSC_0                  ((uint16_t)0x0400)            /*!<Bit 0 */\r
3441 #define  TIM_CCMR1_IC2PSC_1                  ((uint16_t)0x0800)            /*!<Bit 1 */\r
3442 \r
3443 #define  TIM_CCMR1_IC2F                      ((uint16_t)0xF000)            /*!<IC2F[3:0] bits (Input Capture 2 Filter) */\r
3444 #define  TIM_CCMR1_IC2F_0                    ((uint16_t)0x1000)            /*!<Bit 0 */\r
3445 #define  TIM_CCMR1_IC2F_1                    ((uint16_t)0x2000)            /*!<Bit 1 */\r
3446 #define  TIM_CCMR1_IC2F_2                    ((uint16_t)0x4000)            /*!<Bit 2 */\r
3447 #define  TIM_CCMR1_IC2F_3                    ((uint16_t)0x8000)            /*!<Bit 3 */\r
3448 \r
3449 /******************  Bit definition for TIM_CCMR2 register  *******************/\r
3450 #define  TIM_CCMR2_CC3S                      ((uint16_t)0x0003)            /*!<CC3S[1:0] bits (Capture/Compare 3 Selection) */\r
3451 #define  TIM_CCMR2_CC3S_0                    ((uint16_t)0x0001)            /*!<Bit 0 */\r
3452 #define  TIM_CCMR2_CC3S_1                    ((uint16_t)0x0002)            /*!<Bit 1 */\r
3453 \r
3454 #define  TIM_CCMR2_OC3FE                     ((uint16_t)0x0004)            /*!<Output Compare 3 Fast enable */\r
3455 #define  TIM_CCMR2_OC3PE                     ((uint16_t)0x0008)            /*!<Output Compare 3 Preload enable */\r
3456 \r
3457 #define  TIM_CCMR2_OC3M                      ((uint16_t)0x0070)            /*!<OC3M[2:0] bits (Output Compare 3 Mode) */\r
3458 #define  TIM_CCMR2_OC3M_0                    ((uint16_t)0x0010)            /*!<Bit 0 */\r
3459 #define  TIM_CCMR2_OC3M_1                    ((uint16_t)0x0020)            /*!<Bit 1 */\r
3460 #define  TIM_CCMR2_OC3M_2                    ((uint16_t)0x0040)            /*!<Bit 2 */\r
3461 \r
3462 #define  TIM_CCMR2_OC3CE                     ((uint16_t)0x0080)            /*!<Output Compare 3 Clear Enable */\r
3463 \r
3464 #define  TIM_CCMR2_CC4S                      ((uint16_t)0x0300)            /*!<CC4S[1:0] bits (Capture/Compare 4 Selection) */\r
3465 #define  TIM_CCMR2_CC4S_0                    ((uint16_t)0x0100)            /*!<Bit 0 */\r
3466 #define  TIM_CCMR2_CC4S_1                    ((uint16_t)0x0200)            /*!<Bit 1 */\r
3467 \r
3468 #define  TIM_CCMR2_OC4FE                     ((uint16_t)0x0400)            /*!<Output Compare 4 Fast enable */\r
3469 #define  TIM_CCMR2_OC4PE                     ((uint16_t)0x0800)            /*!<Output Compare 4 Preload enable */\r
3470 \r
3471 #define  TIM_CCMR2_OC4M                      ((uint16_t)0x7000)            /*!<OC4M[2:0] bits (Output Compare 4 Mode) */\r
3472 #define  TIM_CCMR2_OC4M_0                    ((uint16_t)0x1000)            /*!<Bit 0 */\r
3473 #define  TIM_CCMR2_OC4M_1                    ((uint16_t)0x2000)            /*!<Bit 1 */\r
3474 #define  TIM_CCMR2_OC4M_2                    ((uint16_t)0x4000)            /*!<Bit 2 */\r
3475 \r
3476 #define  TIM_CCMR2_OC4CE                     ((uint16_t)0x8000)            /*!<Output Compare 4 Clear Enable */\r
3477 \r
3478 /*----------------------------------------------------------------------------*/\r
3479 \r
3480 #define  TIM_CCMR2_IC3PSC                    ((uint16_t)0x000C)            /*!<IC3PSC[1:0] bits (Input Capture 3 Prescaler) */\r
3481 #define  TIM_CCMR2_IC3PSC_0                  ((uint16_t)0x0004)            /*!<Bit 0 */\r
3482 #define  TIM_CCMR2_IC3PSC_1                  ((uint16_t)0x0008)            /*!<Bit 1 */\r
3483 \r
3484 #define  TIM_CCMR2_IC3F                      ((uint16_t)0x00F0)            /*!<IC3F[3:0] bits (Input Capture 3 Filter) */\r
3485 #define  TIM_CCMR2_IC3F_0                    ((uint16_t)0x0010)            /*!<Bit 0 */\r
3486 #define  TIM_CCMR2_IC3F_1                    ((uint16_t)0x0020)            /*!<Bit 1 */\r
3487 #define  TIM_CCMR2_IC3F_2                    ((uint16_t)0x0040)            /*!<Bit 2 */\r
3488 #define  TIM_CCMR2_IC3F_3                    ((uint16_t)0x0080)            /*!<Bit 3 */\r
3489 \r
3490 #define  TIM_CCMR2_IC4PSC                    ((uint16_t)0x0C00)            /*!<IC4PSC[1:0] bits (Input Capture 4 Prescaler) */\r
3491 #define  TIM_CCMR2_IC4PSC_0                  ((uint16_t)0x0400)            /*!<Bit 0 */\r
3492 #define  TIM_CCMR2_IC4PSC_1                  ((uint16_t)0x0800)            /*!<Bit 1 */\r
3493 \r
3494 #define  TIM_CCMR2_IC4F                      ((uint16_t)0xF000)            /*!<IC4F[3:0] bits (Input Capture 4 Filter) */\r
3495 #define  TIM_CCMR2_IC4F_0                    ((uint16_t)0x1000)            /*!<Bit 0 */\r
3496 #define  TIM_CCMR2_IC4F_1                    ((uint16_t)0x2000)            /*!<Bit 1 */\r
3497 #define  TIM_CCMR2_IC4F_2                    ((uint16_t)0x4000)            /*!<Bit 2 */\r
3498 #define  TIM_CCMR2_IC4F_3                    ((uint16_t)0x8000)            /*!<Bit 3 */\r
3499 \r
3500 /*******************  Bit definition for TIM_CCER register  *******************/\r
3501 #define  TIM_CCER_CC1E                       ((uint16_t)0x0001)            /*!<Capture/Compare 1 output enable */\r
3502 #define  TIM_CCER_CC1P                       ((uint16_t)0x0002)            /*!<Capture/Compare 1 output Polarity */\r
3503 #define  TIM_CCER_CC1NE                      ((uint16_t)0x0004)            /*!<Capture/Compare 1 Complementary output enable */\r
3504 #define  TIM_CCER_CC1NP                      ((uint16_t)0x0008)            /*!<Capture/Compare 1 Complementary output Polarity */\r
3505 #define  TIM_CCER_CC2E                       ((uint16_t)0x0010)            /*!<Capture/Compare 2 output enable */\r
3506 #define  TIM_CCER_CC2P                       ((uint16_t)0x0020)            /*!<Capture/Compare 2 output Polarity */\r
3507 #define  TIM_CCER_CC2NE                      ((uint16_t)0x0040)            /*!<Capture/Compare 2 Complementary output enable */\r
3508 #define  TIM_CCER_CC2NP                      ((uint16_t)0x0080)            /*!<Capture/Compare 2 Complementary output Polarity */\r
3509 #define  TIM_CCER_CC3E                       ((uint16_t)0x0100)            /*!<Capture/Compare 3 output enable */\r
3510 #define  TIM_CCER_CC3P                       ((uint16_t)0x0200)            /*!<Capture/Compare 3 output Polarity */\r
3511 #define  TIM_CCER_CC3NE                      ((uint16_t)0x0400)            /*!<Capture/Compare 3 Complementary output enable */\r
3512 #define  TIM_CCER_CC3NP                      ((uint16_t)0x0800)            /*!<Capture/Compare 3 Complementary output Polarity */\r
3513 #define  TIM_CCER_CC4E                       ((uint16_t)0x1000)            /*!<Capture/Compare 4 output enable */\r
3514 #define  TIM_CCER_CC4P                       ((uint16_t)0x2000)            /*!<Capture/Compare 4 output Polarity */\r
3515 \r
3516 /*******************  Bit definition for TIM_CNT register  ********************/\r
3517 #define  TIM_CNT_CNT                         ((uint16_t)0xFFFF)            /*!<Counter Value */\r
3518 \r
3519 /*******************  Bit definition for TIM_PSC register  ********************/\r
3520 #define  TIM_PSC_PSC                         ((uint16_t)0xFFFF)            /*!<Prescaler Value */\r
3521 \r
3522 /*******************  Bit definition for TIM_ARR register  ********************/\r
3523 #define  TIM_ARR_ARR                         ((uint16_t)0xFFFF)            /*!<actual auto-reload Value */\r
3524 \r
3525 /*******************  Bit definition for TIM_RCR register  ********************/\r
3526 #define  TIM_RCR_REP                         ((uint8_t)0xFF)               /*!<Repetition Counter Value */\r
3527 \r
3528 /*******************  Bit definition for TIM_CCR1 register  *******************/\r
3529 #define  TIM_CCR1_CCR1                       ((uint16_t)0xFFFF)            /*!<Capture/Compare 1 Value */\r
3530 \r
3531 /*******************  Bit definition for TIM_CCR2 register  *******************/\r
3532 #define  TIM_CCR2_CCR2                       ((uint16_t)0xFFFF)            /*!<Capture/Compare 2 Value */\r
3533 \r
3534 /*******************  Bit definition for TIM_CCR3 register  *******************/\r
3535 #define  TIM_CCR3_CCR3                       ((uint16_t)0xFFFF)            /*!<Capture/Compare 3 Value */\r
3536 \r
3537 /*******************  Bit definition for TIM_CCR4 register  *******************/\r
3538 #define  TIM_CCR4_CCR4                       ((uint16_t)0xFFFF)            /*!<Capture/Compare 4 Value */\r
3539 \r
3540 /*******************  Bit definition for TIM_BDTR register  *******************/\r
3541 #define  TIM_BDTR_DTG                        ((uint16_t)0x00FF)            /*!<DTG[0:7] bits (Dead-Time Generator set-up) */\r
3542 #define  TIM_BDTR_DTG_0                      ((uint16_t)0x0001)            /*!<Bit 0 */\r
3543 #define  TIM_BDTR_DTG_1                      ((uint16_t)0x0002)            /*!<Bit 1 */\r
3544 #define  TIM_BDTR_DTG_2                      ((uint16_t)0x0004)            /*!<Bit 2 */\r
3545 #define  TIM_BDTR_DTG_3                      ((uint16_t)0x0008)            /*!<Bit 3 */\r
3546 #define  TIM_BDTR_DTG_4                      ((uint16_t)0x0010)            /*!<Bit 4 */\r
3547 #define  TIM_BDTR_DTG_5                      ((uint16_t)0x0020)            /*!<Bit 5 */\r
3548 #define  TIM_BDTR_DTG_6                      ((uint16_t)0x0040)            /*!<Bit 6 */\r
3549 #define  TIM_BDTR_DTG_7                      ((uint16_t)0x0080)            /*!<Bit 7 */\r
3550 \r
3551 #define  TIM_BDTR_LOCK                       ((uint16_t)0x0300)            /*!<LOCK[1:0] bits (Lock Configuration) */\r
3552 #define  TIM_BDTR_LOCK_0                     ((uint16_t)0x0100)            /*!<Bit 0 */\r
3553 #define  TIM_BDTR_LOCK_1                     ((uint16_t)0x0200)            /*!<Bit 1 */\r
3554 \r
3555 #define  TIM_BDTR_OSSI                       ((uint16_t)0x0400)            /*!<Off-State Selection for Idle mode */\r
3556 #define  TIM_BDTR_OSSR                       ((uint16_t)0x0800)            /*!<Off-State Selection for Run mode */\r
3557 #define  TIM_BDTR_BKE                        ((uint16_t)0x1000)            /*!<Break enable */\r
3558 #define  TIM_BDTR_BKP                        ((uint16_t)0x2000)            /*!<Break Polarity */\r
3559 #define  TIM_BDTR_AOE                        ((uint16_t)0x4000)            /*!<Automatic Output enable */\r
3560 #define  TIM_BDTR_MOE                        ((uint16_t)0x8000)            /*!<Main Output enable */\r
3561 \r
3562 /*******************  Bit definition for TIM_DCR register  ********************/\r
3563 #define  TIM_DCR_DBA                         ((uint16_t)0x001F)            /*!<DBA[4:0] bits (DMA Base Address) */\r
3564 #define  TIM_DCR_DBA_0                       ((uint16_t)0x0001)            /*!<Bit 0 */\r
3565 #define  TIM_DCR_DBA_1                       ((uint16_t)0x0002)            /*!<Bit 1 */\r
3566 #define  TIM_DCR_DBA_2                       ((uint16_t)0x0004)            /*!<Bit 2 */\r
3567 #define  TIM_DCR_DBA_3                       ((uint16_t)0x0008)            /*!<Bit 3 */\r
3568 #define  TIM_DCR_DBA_4                       ((uint16_t)0x0010)            /*!<Bit 4 */\r
3569 \r
3570 #define  TIM_DCR_DBL                         ((uint16_t)0x1F00)            /*!<DBL[4:0] bits (DMA Burst Length) */\r
3571 #define  TIM_DCR_DBL_0                       ((uint16_t)0x0100)            /*!<Bit 0 */\r
3572 #define  TIM_DCR_DBL_1                       ((uint16_t)0x0200)            /*!<Bit 1 */\r
3573 #define  TIM_DCR_DBL_2                       ((uint16_t)0x0400)            /*!<Bit 2 */\r
3574 #define  TIM_DCR_DBL_3                       ((uint16_t)0x0800)            /*!<Bit 3 */\r
3575 #define  TIM_DCR_DBL_4                       ((uint16_t)0x1000)            /*!<Bit 4 */\r
3576 \r
3577 /*******************  Bit definition for TIM_DMAR register  *******************/\r
3578 #define  TIM_DMAR_DMAB                       ((uint16_t)0xFFFF)            /*!<DMA register for burst accesses */\r
3579 \r
3580 /******************************************************************************/\r
3581 /*                                                                            */\r
3582 /*                             Real-Time Clock                                */\r
3583 /*                                                                            */\r
3584 /******************************************************************************/\r
3585 \r
3586 /*******************  Bit definition for RTC_CRH register  ********************/\r
3587 #define  RTC_CRH_SECIE                       ((uint8_t)0x01)               /*!<Second Interrupt Enable */\r
3588 #define  RTC_CRH_ALRIE                       ((uint8_t)0x02)               /*!<Alarm Interrupt Enable */\r
3589 #define  RTC_CRH_OWIE                        ((uint8_t)0x04)               /*!<OverfloW Interrupt Enable */\r
3590 \r
3591 /*******************  Bit definition for RTC_CRL register  ********************/\r
3592 #define  RTC_CRL_SECF                        ((uint8_t)0x01)               /*!<Second Flag */\r
3593 #define  RTC_CRL_ALRF                        ((uint8_t)0x02)               /*!<Alarm Flag */\r
3594 #define  RTC_CRL_OWF                         ((uint8_t)0x04)               /*!<OverfloW Flag */\r
3595 #define  RTC_CRL_RSF                         ((uint8_t)0x08)               /*!<Registers Synchronized Flag */\r
3596 #define  RTC_CRL_CNF                         ((uint8_t)0x10)               /*!<Configuration Flag */\r
3597 #define  RTC_CRL_RTOFF                       ((uint8_t)0x20)               /*!<RTC operation OFF */\r
3598 \r
3599 /*******************  Bit definition for RTC_PRLH register  *******************/\r
3600 #define  RTC_PRLH_PRL                        ((uint16_t)0x000F)            /*!<RTC Prescaler Reload Value High */\r
3601 \r
3602 /*******************  Bit definition for RTC_PRLL register  *******************/\r
3603 #define  RTC_PRLL_PRL                        ((uint16_t)0xFFFF)            /*!<RTC Prescaler Reload Value Low */\r
3604 \r
3605 /*******************  Bit definition for RTC_DIVH register  *******************/\r
3606 #define  RTC_DIVH_RTC_DIV                    ((uint16_t)0x000F)            /*!<RTC Clock Divider High */\r
3607 \r
3608 /*******************  Bit definition for RTC_DIVL register  *******************/\r
3609 #define  RTC_DIVL_RTC_DIV                    ((uint16_t)0xFFFF)            /*!<RTC Clock Divider Low */\r
3610 \r
3611 /*******************  Bit definition for RTC_CNTH register  *******************/\r
3612 #define  RTC_CNTH_RTC_CNT                    ((uint16_t)0xFFFF)            /*!<RTC Counter High */\r
3613 \r
3614 /*******************  Bit definition for RTC_CNTL register  *******************/\r
3615 #define  RTC_CNTL_RTC_CNT                    ((uint16_t)0xFFFF)            /*!<RTC Counter Low */\r
3616 \r
3617 /*******************  Bit definition for RTC_ALRH register  *******************/\r
3618 #define  RTC_ALRH_RTC_ALR                    ((uint16_t)0xFFFF)            /*!<RTC Alarm High */\r
3619 \r
3620 /*******************  Bit definition for RTC_ALRL register  *******************/\r
3621 #define  RTC_ALRL_RTC_ALR                    ((uint16_t)0xFFFF)            /*!<RTC Alarm Low */\r
3622 \r
3623 /******************************************************************************/\r
3624 /*                                                                            */\r
3625 /*                           Independent WATCHDOG                             */\r
3626 /*                                                                            */\r
3627 /******************************************************************************/\r
3628 \r
3629 /*******************  Bit definition for IWDG_KR register  ********************/\r
3630 #define  IWDG_KR_KEY                         ((uint16_t)0xFFFF)            /*!<Key value (write only, read 0000h) */\r
3631 \r
3632 /*******************  Bit definition for IWDG_PR register  ********************/\r
3633 #define  IWDG_PR_PR                          ((uint8_t)0x07)               /*!<PR[2:0] (Prescaler divider) */\r
3634 #define  IWDG_PR_PR_0                        ((uint8_t)0x01)               /*!<Bit 0 */\r
3635 #define  IWDG_PR_PR_1                        ((uint8_t)0x02)               /*!<Bit 1 */\r
3636 #define  IWDG_PR_PR_2                        ((uint8_t)0x04)               /*!<Bit 2 */\r
3637 \r
3638 /*******************  Bit definition for IWDG_RLR register  *******************/\r
3639 #define  IWDG_RLR_RL                         ((uint16_t)0x0FFF)            /*!<Watchdog counter reload value */\r
3640 \r
3641 /*******************  Bit definition for IWDG_SR register  ********************/\r
3642 #define  IWDG_SR_PVU                         ((uint8_t)0x01)               /*!<Watchdog prescaler value update */\r
3643 #define  IWDG_SR_RVU                         ((uint8_t)0x02)               /*!<Watchdog counter reload value update */\r
3644 \r
3645 /******************************************************************************/\r
3646 /*                                                                            */\r
3647 /*                            Window WATCHDOG                                 */\r
3648 /*                                                                            */\r
3649 /******************************************************************************/\r
3650 \r
3651 /*******************  Bit definition for WWDG_CR register  ********************/\r
3652 #define  WWDG_CR_T                           ((uint8_t)0x7F)               /*!<T[6:0] bits (7-Bit counter (MSB to LSB)) */\r
3653 #define  WWDG_CR_T0                          ((uint8_t)0x01)               /*!<Bit 0 */\r
3654 #define  WWDG_CR_T1                          ((uint8_t)0x02)               /*!<Bit 1 */\r
3655 #define  WWDG_CR_T2                          ((uint8_t)0x04)               /*!<Bit 2 */\r
3656 #define  WWDG_CR_T3                          ((uint8_t)0x08)               /*!<Bit 3 */\r
3657 #define  WWDG_CR_T4                          ((uint8_t)0x10)               /*!<Bit 4 */\r
3658 #define  WWDG_CR_T5                          ((uint8_t)0x20)               /*!<Bit 5 */\r
3659 #define  WWDG_CR_T6                          ((uint8_t)0x40)               /*!<Bit 6 */\r
3660 \r
3661 #define  WWDG_CR_WDGA                        ((uint8_t)0x80)               /*!<Activation bit */\r
3662 \r
3663 /*******************  Bit definition for WWDG_CFR register  *******************/\r
3664 #define  WWDG_CFR_W                          ((uint16_t)0x007F)            /*!<W[6:0] bits (7-bit window value) */\r
3665 #define  WWDG_CFR_W0                         ((uint16_t)0x0001)            /*!<Bit 0 */\r
3666 #define  WWDG_CFR_W1                         ((uint16_t)0x0002)            /*!<Bit 1 */\r
3667 #define  WWDG_CFR_W2                         ((uint16_t)0x0004)            /*!<Bit 2 */\r
3668 #define  WWDG_CFR_W3                         ((uint16_t)0x0008)            /*!<Bit 3 */\r
3669 #define  WWDG_CFR_W4                         ((uint16_t)0x0010)            /*!<Bit 4 */\r
3670 #define  WWDG_CFR_W5                         ((uint16_t)0x0020)            /*!<Bit 5 */\r
3671 #define  WWDG_CFR_W6                         ((uint16_t)0x0040)            /*!<Bit 6 */\r
3672 \r
3673 #define  WWDG_CFR_WDGTB                      ((uint16_t)0x0180)            /*!<WDGTB[1:0] bits (Timer Base) */\r
3674 #define  WWDG_CFR_WDGTB0                     ((uint16_t)0x0080)            /*!<Bit 0 */\r
3675 #define  WWDG_CFR_WDGTB1                     ((uint16_t)0x0100)            /*!<Bit 1 */\r
3676 \r
3677 #define  WWDG_CFR_EWI                        ((uint16_t)0x0200)            /*!<Early Wakeup Interrupt */\r
3678 \r
3679 /*******************  Bit definition for WWDG_SR register  ********************/\r
3680 #define  WWDG_SR_EWIF                        ((uint8_t)0x01)               /*!<Early Wakeup Interrupt Flag */\r
3681 \r
3682 /******************************************************************************/\r
3683 /*                                                                            */\r
3684 /*                       Flexible Static Memory Controller                    */\r
3685 /*                                                                            */\r
3686 /******************************************************************************/\r
3687 \r
3688 /******************  Bit definition for FSMC_BCR1 register  *******************/\r
3689 #define  FSMC_BCR1_MBKEN                     ((uint32_t)0x00000001)        /*!<Memory bank enable bit */\r
3690 #define  FSMC_BCR1_MUXEN                     ((uint32_t)0x00000002)        /*!<Address/data multiplexing enable bit */\r
3691 \r
3692 #define  FSMC_BCR1_MTYP                      ((uint32_t)0x0000000C)        /*!<MTYP[1:0] bits (Memory type) */\r
3693 #define  FSMC_BCR1_MTYP_0                    ((uint32_t)0x00000004)        /*!<Bit 0 */\r
3694 #define  FSMC_BCR1_MTYP_1                    ((uint32_t)0x00000008)        /*!<Bit 1 */\r
3695 \r
3696 #define  FSMC_BCR1_MWID                      ((uint32_t)0x00000030)        /*!<MWID[1:0] bits (Memory data bus width) */\r
3697 #define  FSMC_BCR1_MWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3698 #define  FSMC_BCR1_MWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3699 \r
3700 #define  FSMC_BCR1_FACCEN                    ((uint32_t)0x00000040)        /*!<Flash access enable */\r
3701 #define  FSMC_BCR1_BURSTEN                   ((uint32_t)0x00000100)        /*!<Burst enable bit */\r
3702 #define  FSMC_BCR1_WAITPOL                   ((uint32_t)0x00000200)        /*!<Wait signal polarity bit */\r
3703 #define  FSMC_BCR1_WRAPMOD                   ((uint32_t)0x00000400)        /*!<Wrapped burst mode support */\r
3704 #define  FSMC_BCR1_WAITCFG                   ((uint32_t)0x00000800)        /*!<Wait timing configuration */\r
3705 #define  FSMC_BCR1_WREN                      ((uint32_t)0x00001000)        /*!<Write enable bit */\r
3706 #define  FSMC_BCR1_WAITEN                    ((uint32_t)0x00002000)        /*!<Wait enable bit */\r
3707 #define  FSMC_BCR1_EXTMOD                    ((uint32_t)0x00004000)        /*!<Extended mode enable */\r
3708 #define  FSMC_BCR1_CBURSTRW                  ((uint32_t)0x00080000)        /*!<Write burst enable */\r
3709 \r
3710 /******************  Bit definition for FSMC_BCR2 register  *******************/\r
3711 #define  FSMC_BCR2_MBKEN                     ((uint32_t)0x00000001)        /*!<Memory bank enable bit */\r
3712 #define  FSMC_BCR2_MUXEN                     ((uint32_t)0x00000002)        /*!<Address/data multiplexing enable bit */\r
3713 \r
3714 #define  FSMC_BCR2_MTYP                      ((uint32_t)0x0000000C)        /*!<MTYP[1:0] bits (Memory type) */\r
3715 #define  FSMC_BCR2_MTYP_0                    ((uint32_t)0x00000004)        /*!<Bit 0 */\r
3716 #define  FSMC_BCR2_MTYP_1                    ((uint32_t)0x00000008)        /*!<Bit 1 */\r
3717 \r
3718 #define  FSMC_BCR2_MWID                      ((uint32_t)0x00000030)        /*!<MWID[1:0] bits (Memory data bus width) */\r
3719 #define  FSMC_BCR2_MWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3720 #define  FSMC_BCR2_MWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3721 \r
3722 #define  FSMC_BCR2_FACCEN                    ((uint32_t)0x00000040)        /*!<Flash access enable */\r
3723 #define  FSMC_BCR2_BURSTEN                   ((uint32_t)0x00000100)        /*!<Burst enable bit */\r
3724 #define  FSMC_BCR2_WAITPOL                   ((uint32_t)0x00000200)        /*!<Wait signal polarity bit */\r
3725 #define  FSMC_BCR2_WRAPMOD                   ((uint32_t)0x00000400)        /*!<Wrapped burst mode support */\r
3726 #define  FSMC_BCR2_WAITCFG                   ((uint32_t)0x00000800)        /*!<Wait timing configuration */\r
3727 #define  FSMC_BCR2_WREN                      ((uint32_t)0x00001000)        /*!<Write enable bit */\r
3728 #define  FSMC_BCR2_WAITEN                    ((uint32_t)0x00002000)        /*!<Wait enable bit */\r
3729 #define  FSMC_BCR2_EXTMOD                    ((uint32_t)0x00004000)        /*!<Extended mode enable */\r
3730 #define  FSMC_BCR2_CBURSTRW                  ((uint32_t)0x00080000)        /*!<Write burst enable */\r
3731 \r
3732 /******************  Bit definition for FSMC_BCR3 register  *******************/\r
3733 #define  FSMC_BCR3_MBKEN                     ((uint32_t)0x00000001)        /*!<Memory bank enable bit */\r
3734 #define  FSMC_BCR3_MUXEN                     ((uint32_t)0x00000002)        /*!<Address/data multiplexing enable bit */\r
3735 \r
3736 #define  FSMC_BCR3_MTYP                      ((uint32_t)0x0000000C)        /*!<MTYP[1:0] bits (Memory type) */\r
3737 #define  FSMC_BCR3_MTYP_0                    ((uint32_t)0x00000004)        /*!<Bit 0 */\r
3738 #define  FSMC_BCR3_MTYP_1                    ((uint32_t)0x00000008)        /*!<Bit 1 */\r
3739 \r
3740 #define  FSMC_BCR3_MWID                      ((uint32_t)0x00000030)        /*!<MWID[1:0] bits (Memory data bus width) */\r
3741 #define  FSMC_BCR3_MWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3742 #define  FSMC_BCR3_MWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3743 \r
3744 #define  FSMC_BCR3_FACCEN                    ((uint32_t)0x00000040)        /*!<Flash access enable */\r
3745 #define  FSMC_BCR3_BURSTEN                   ((uint32_t)0x00000100)        /*!<Burst enable bit */\r
3746 #define  FSMC_BCR3_WAITPOL                   ((uint32_t)0x00000200)        /*!<Wait signal polarity bit. */\r
3747 #define  FSMC_BCR3_WRAPMOD                   ((uint32_t)0x00000400)        /*!<Wrapped burst mode support */\r
3748 #define  FSMC_BCR3_WAITCFG                   ((uint32_t)0x00000800)        /*!<Wait timing configuration */\r
3749 #define  FSMC_BCR3_WREN                      ((uint32_t)0x00001000)        /*!<Write enable bit */\r
3750 #define  FSMC_BCR3_WAITEN                    ((uint32_t)0x00002000)        /*!<Wait enable bit */\r
3751 #define  FSMC_BCR3_EXTMOD                    ((uint32_t)0x00004000)        /*!<Extended mode enable */\r
3752 #define  FSMC_BCR3_CBURSTRW                  ((uint32_t)0x00080000)        /*!<Write burst enable */\r
3753 \r
3754 /******************  Bit definition for FSMC_BCR4 register  *******************/\r
3755 #define  FSMC_BCR4_MBKEN                     ((uint32_t)0x00000001)        /*!<Memory bank enable bit */\r
3756 #define  FSMC_BCR4_MUXEN                     ((uint32_t)0x00000002)        /*!<Address/data multiplexing enable bit */\r
3757 \r
3758 #define  FSMC_BCR4_MTYP                      ((uint32_t)0x0000000C)        /*!<MTYP[1:0] bits (Memory type) */\r
3759 #define  FSMC_BCR4_MTYP_0                    ((uint32_t)0x00000004)        /*!<Bit 0 */\r
3760 #define  FSMC_BCR4_MTYP_1                    ((uint32_t)0x00000008)        /*!<Bit 1 */\r
3761 \r
3762 #define  FSMC_BCR4_MWID                      ((uint32_t)0x00000030)        /*!<MWID[1:0] bits (Memory data bus width) */\r
3763 #define  FSMC_BCR4_MWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3764 #define  FSMC_BCR4_MWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3765 \r
3766 #define  FSMC_BCR4_FACCEN                    ((uint32_t)0x00000040)        /*!<Flash access enable */\r
3767 #define  FSMC_BCR4_BURSTEN                   ((uint32_t)0x00000100)        /*!<Burst enable bit */\r
3768 #define  FSMC_BCR4_WAITPOL                   ((uint32_t)0x00000200)        /*!<Wait signal polarity bit */\r
3769 #define  FSMC_BCR4_WRAPMOD                   ((uint32_t)0x00000400)        /*!<Wrapped burst mode support */\r
3770 #define  FSMC_BCR4_WAITCFG                   ((uint32_t)0x00000800)        /*!<Wait timing configuration */\r
3771 #define  FSMC_BCR4_WREN                      ((uint32_t)0x00001000)        /*!<Write enable bit */\r
3772 #define  FSMC_BCR4_WAITEN                    ((uint32_t)0x00002000)        /*!<Wait enable bit */\r
3773 #define  FSMC_BCR4_EXTMOD                    ((uint32_t)0x00004000)        /*!<Extended mode enable */\r
3774 #define  FSMC_BCR4_CBURSTRW                  ((uint32_t)0x00080000)        /*!<Write burst enable */\r
3775 \r
3776 /******************  Bit definition for FSMC_BTR1 register  ******************/\r
3777 #define  FSMC_BTR1_ADDSET                    ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
3778 #define  FSMC_BTR1_ADDSET_0                  ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3779 #define  FSMC_BTR1_ADDSET_1                  ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3780 #define  FSMC_BTR1_ADDSET_2                  ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3781 #define  FSMC_BTR1_ADDSET_3                  ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3782 \r
3783 #define  FSMC_BTR1_ADDHLD                    ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
3784 #define  FSMC_BTR1_ADDHLD_0                  ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3785 #define  FSMC_BTR1_ADDHLD_1                  ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3786 #define  FSMC_BTR1_ADDHLD_2                  ((uint32_t)0x00000040)        /*!<Bit 2 */\r
3787 #define  FSMC_BTR1_ADDHLD_3                  ((uint32_t)0x00000080)        /*!<Bit 3 */\r
3788 \r
3789 #define  FSMC_BTR1_DATAST                    ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
3790 #define  FSMC_BTR1_DATAST_0                  ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3791 #define  FSMC_BTR1_DATAST_1                  ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3792 #define  FSMC_BTR1_DATAST_2                  ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3793 #define  FSMC_BTR1_DATAST_3                  ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3794 \r
3795 #define  FSMC_BTR1_BUSTURN                   ((uint32_t)0x000F0000)        /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */\r
3796 #define  FSMC_BTR1_BUSTURN_0                 ((uint32_t)0x00010000)        /*!<Bit 0 */\r
3797 #define  FSMC_BTR1_BUSTURN_1                 ((uint32_t)0x00020000)        /*!<Bit 1 */\r
3798 #define  FSMC_BTR1_BUSTURN_2                 ((uint32_t)0x00040000)        /*!<Bit 2 */\r
3799 #define  FSMC_BTR1_BUSTURN_3                 ((uint32_t)0x00080000)        /*!<Bit 3 */\r
3800 \r
3801 #define  FSMC_BTR1_CLKDIV                    ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
3802 #define  FSMC_BTR1_CLKDIV_0                  ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3803 #define  FSMC_BTR1_CLKDIV_1                  ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3804 #define  FSMC_BTR1_CLKDIV_2                  ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3805 #define  FSMC_BTR1_CLKDIV_3                  ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3806 \r
3807 #define  FSMC_BTR1_DATLAT                    ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
3808 #define  FSMC_BTR1_DATLAT_0                  ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3809 #define  FSMC_BTR1_DATLAT_1                  ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3810 #define  FSMC_BTR1_DATLAT_2                  ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3811 #define  FSMC_BTR1_DATLAT_3                  ((uint32_t)0x08000000)        /*!<Bit 3 */\r
3812 \r
3813 #define  FSMC_BTR1_ACCMOD                    ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
3814 #define  FSMC_BTR1_ACCMOD_0                  ((uint32_t)0x10000000)        /*!<Bit 0 */\r
3815 #define  FSMC_BTR1_ACCMOD_1                  ((uint32_t)0x20000000)        /*!<Bit 1 */\r
3816 \r
3817 /******************  Bit definition for FSMC_BTR2 register  *******************/\r
3818 #define  FSMC_BTR2_ADDSET                    ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
3819 #define  FSMC_BTR2_ADDSET_0                  ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3820 #define  FSMC_BTR2_ADDSET_1                  ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3821 #define  FSMC_BTR2_ADDSET_2                  ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3822 #define  FSMC_BTR2_ADDSET_3                  ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3823 \r
3824 #define  FSMC_BTR2_ADDHLD                    ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
3825 #define  FSMC_BTR2_ADDHLD_0                  ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3826 #define  FSMC_BTR2_ADDHLD_1                  ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3827 #define  FSMC_BTR2_ADDHLD_2                  ((uint32_t)0x00000040)        /*!<Bit 2 */\r
3828 #define  FSMC_BTR2_ADDHLD_3                  ((uint32_t)0x00000080)        /*!<Bit 3 */\r
3829 \r
3830 #define  FSMC_BTR2_DATAST                    ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
3831 #define  FSMC_BTR2_DATAST_0                  ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3832 #define  FSMC_BTR2_DATAST_1                  ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3833 #define  FSMC_BTR2_DATAST_2                  ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3834 #define  FSMC_BTR2_DATAST_3                  ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3835 \r
3836 #define  FSMC_BTR2_BUSTURN                   ((uint32_t)0x000F0000)        /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */\r
3837 #define  FSMC_BTR2_BUSTURN_0                 ((uint32_t)0x00010000)        /*!<Bit 0 */\r
3838 #define  FSMC_BTR2_BUSTURN_1                 ((uint32_t)0x00020000)        /*!<Bit 1 */\r
3839 #define  FSMC_BTR2_BUSTURN_2                 ((uint32_t)0x00040000)        /*!<Bit 2 */\r
3840 #define  FSMC_BTR2_BUSTURN_3                 ((uint32_t)0x00080000)        /*!<Bit 3 */\r
3841 \r
3842 #define  FSMC_BTR2_CLKDIV                    ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
3843 #define  FSMC_BTR2_CLKDIV_0                  ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3844 #define  FSMC_BTR2_CLKDIV_1                  ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3845 #define  FSMC_BTR2_CLKDIV_2                  ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3846 #define  FSMC_BTR2_CLKDIV_3                  ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3847 \r
3848 #define  FSMC_BTR2_DATLAT                    ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
3849 #define  FSMC_BTR2_DATLAT_0                  ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3850 #define  FSMC_BTR2_DATLAT_1                  ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3851 #define  FSMC_BTR2_DATLAT_2                  ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3852 #define  FSMC_BTR2_DATLAT_3                  ((uint32_t)0x08000000)        /*!<Bit 3 */\r
3853 \r
3854 #define  FSMC_BTR2_ACCMOD                    ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
3855 #define  FSMC_BTR2_ACCMOD_0                  ((uint32_t)0x10000000)        /*!<Bit 0 */\r
3856 #define  FSMC_BTR2_ACCMOD_1                  ((uint32_t)0x20000000)        /*!<Bit 1 */\r
3857 \r
3858 /*******************  Bit definition for FSMC_BTR3 register  *******************/\r
3859 #define  FSMC_BTR3_ADDSET                    ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
3860 #define  FSMC_BTR3_ADDSET_0                  ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3861 #define  FSMC_BTR3_ADDSET_1                  ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3862 #define  FSMC_BTR3_ADDSET_2                  ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3863 #define  FSMC_BTR3_ADDSET_3                  ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3864 \r
3865 #define  FSMC_BTR3_ADDHLD                    ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
3866 #define  FSMC_BTR3_ADDHLD_0                  ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3867 #define  FSMC_BTR3_ADDHLD_1                  ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3868 #define  FSMC_BTR3_ADDHLD_2                  ((uint32_t)0x00000040)        /*!<Bit 2 */\r
3869 #define  FSMC_BTR3_ADDHLD_3                  ((uint32_t)0x00000080)        /*!<Bit 3 */\r
3870 \r
3871 #define  FSMC_BTR3_DATAST                    ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
3872 #define  FSMC_BTR3_DATAST_0                  ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3873 #define  FSMC_BTR3_DATAST_1                  ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3874 #define  FSMC_BTR3_DATAST_2                  ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3875 #define  FSMC_BTR3_DATAST_3                  ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3876 \r
3877 #define  FSMC_BTR3_BUSTURN                   ((uint32_t)0x000F0000)        /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */\r
3878 #define  FSMC_BTR3_BUSTURN_0                 ((uint32_t)0x00010000)        /*!<Bit 0 */\r
3879 #define  FSMC_BTR3_BUSTURN_1                 ((uint32_t)0x00020000)        /*!<Bit 1 */\r
3880 #define  FSMC_BTR3_BUSTURN_2                 ((uint32_t)0x00040000)        /*!<Bit 2 */\r
3881 #define  FSMC_BTR3_BUSTURN_3                 ((uint32_t)0x00080000)        /*!<Bit 3 */\r
3882 \r
3883 #define  FSMC_BTR3_CLKDIV                    ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
3884 #define  FSMC_BTR3_CLKDIV_0                  ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3885 #define  FSMC_BTR3_CLKDIV_1                  ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3886 #define  FSMC_BTR3_CLKDIV_2                  ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3887 #define  FSMC_BTR3_CLKDIV_3                  ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3888 \r
3889 #define  FSMC_BTR3_DATLAT                    ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
3890 #define  FSMC_BTR3_DATLAT_0                  ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3891 #define  FSMC_BTR3_DATLAT_1                  ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3892 #define  FSMC_BTR3_DATLAT_2                  ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3893 #define  FSMC_BTR3_DATLAT_3                  ((uint32_t)0x08000000)        /*!<Bit 3 */\r
3894 \r
3895 #define  FSMC_BTR3_ACCMOD                    ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
3896 #define  FSMC_BTR3_ACCMOD_0                  ((uint32_t)0x10000000)        /*!<Bit 0 */\r
3897 #define  FSMC_BTR3_ACCMOD_1                  ((uint32_t)0x20000000)        /*!<Bit 1 */\r
3898 \r
3899 /******************  Bit definition for FSMC_BTR4 register  *******************/\r
3900 #define  FSMC_BTR4_ADDSET                    ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
3901 #define  FSMC_BTR4_ADDSET_0                  ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3902 #define  FSMC_BTR4_ADDSET_1                  ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3903 #define  FSMC_BTR4_ADDSET_2                  ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3904 #define  FSMC_BTR4_ADDSET_3                  ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3905 \r
3906 #define  FSMC_BTR4_ADDHLD                    ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
3907 #define  FSMC_BTR4_ADDHLD_0                  ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3908 #define  FSMC_BTR4_ADDHLD_1                  ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3909 #define  FSMC_BTR4_ADDHLD_2                  ((uint32_t)0x00000040)        /*!<Bit 2 */\r
3910 #define  FSMC_BTR4_ADDHLD_3                  ((uint32_t)0x00000080)        /*!<Bit 3 */\r
3911 \r
3912 #define  FSMC_BTR4_DATAST                    ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
3913 #define  FSMC_BTR4_DATAST_0                  ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3914 #define  FSMC_BTR4_DATAST_1                  ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3915 #define  FSMC_BTR4_DATAST_2                  ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3916 #define  FSMC_BTR4_DATAST_3                  ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3917 \r
3918 #define  FSMC_BTR4_BUSTURN                   ((uint32_t)0x000F0000)        /*!<BUSTURN[3:0] bits (Bus turnaround phase duration) */\r
3919 #define  FSMC_BTR4_BUSTURN_0                 ((uint32_t)0x00010000)        /*!<Bit 0 */\r
3920 #define  FSMC_BTR4_BUSTURN_1                 ((uint32_t)0x00020000)        /*!<Bit 1 */\r
3921 #define  FSMC_BTR4_BUSTURN_2                 ((uint32_t)0x00040000)        /*!<Bit 2 */\r
3922 #define  FSMC_BTR4_BUSTURN_3                 ((uint32_t)0x00080000)        /*!<Bit 3 */\r
3923 \r
3924 #define  FSMC_BTR4_CLKDIV                    ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
3925 #define  FSMC_BTR4_CLKDIV_0                  ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3926 #define  FSMC_BTR4_CLKDIV_1                  ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3927 #define  FSMC_BTR4_CLKDIV_2                  ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3928 #define  FSMC_BTR4_CLKDIV_3                  ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3929 \r
3930 #define  FSMC_BTR4_DATLAT                    ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
3931 #define  FSMC_BTR4_DATLAT_0                  ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3932 #define  FSMC_BTR4_DATLAT_1                  ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3933 #define  FSMC_BTR4_DATLAT_2                  ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3934 #define  FSMC_BTR4_DATLAT_3                  ((uint32_t)0x08000000)        /*!<Bit 3 */\r
3935 \r
3936 #define  FSMC_BTR4_ACCMOD                    ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
3937 #define  FSMC_BTR4_ACCMOD_0                  ((uint32_t)0x10000000)        /*!<Bit 0 */\r
3938 #define  FSMC_BTR4_ACCMOD_1                  ((uint32_t)0x20000000)        /*!<Bit 1 */\r
3939 \r
3940 /******************  Bit definition for FSMC_BWTR1 register  ******************/\r
3941 #define  FSMC_BWTR1_ADDSET                   ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
3942 #define  FSMC_BWTR1_ADDSET_0                 ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3943 #define  FSMC_BWTR1_ADDSET_1                 ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3944 #define  FSMC_BWTR1_ADDSET_2                 ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3945 #define  FSMC_BWTR1_ADDSET_3                 ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3946 \r
3947 #define  FSMC_BWTR1_ADDHLD                   ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
3948 #define  FSMC_BWTR1_ADDHLD_0                 ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3949 #define  FSMC_BWTR1_ADDHLD_1                 ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3950 #define  FSMC_BWTR1_ADDHLD_2                 ((uint32_t)0x00000040)        /*!<Bit 2 */\r
3951 #define  FSMC_BWTR1_ADDHLD_3                 ((uint32_t)0x00000080)        /*!<Bit 3 */\r
3952 \r
3953 #define  FSMC_BWTR1_DATAST                   ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
3954 #define  FSMC_BWTR1_DATAST_0                 ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3955 #define  FSMC_BWTR1_DATAST_1                 ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3956 #define  FSMC_BWTR1_DATAST_2                 ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3957 #define  FSMC_BWTR1_DATAST_3                 ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3958 \r
3959 #define  FSMC_BWTR1_CLKDIV                   ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
3960 #define  FSMC_BWTR1_CLKDIV_0                 ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3961 #define  FSMC_BWTR1_CLKDIV_1                 ((uint32_t)0x00200000)        /*!<Bit 1 */\r
3962 #define  FSMC_BWTR1_CLKDIV_2                 ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3963 #define  FSMC_BWTR1_CLKDIV_3                 ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3964 \r
3965 #define  FSMC_BWTR1_DATLAT                   ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
3966 #define  FSMC_BWTR1_DATLAT_0                 ((uint32_t)0x01000000)        /*!<Bit 0 */\r
3967 #define  FSMC_BWTR1_DATLAT_1                 ((uint32_t)0x02000000)        /*!<Bit 1 */\r
3968 #define  FSMC_BWTR1_DATLAT_2                 ((uint32_t)0x04000000)        /*!<Bit 2 */\r
3969 #define  FSMC_BWTR1_DATLAT_3                 ((uint32_t)0x08000000)        /*!<Bit 3 */\r
3970 \r
3971 #define  FSMC_BWTR1_ACCMOD                   ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
3972 #define  FSMC_BWTR1_ACCMOD_0                 ((uint32_t)0x10000000)        /*!<Bit 0 */\r
3973 #define  FSMC_BWTR1_ACCMOD_1                 ((uint32_t)0x20000000)        /*!<Bit 1 */\r
3974 \r
3975 /******************  Bit definition for FSMC_BWTR2 register  ******************/\r
3976 #define  FSMC_BWTR2_ADDSET                   ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
3977 #define  FSMC_BWTR2_ADDSET_0                 ((uint32_t)0x00000001)        /*!<Bit 0 */\r
3978 #define  FSMC_BWTR2_ADDSET_1                 ((uint32_t)0x00000002)        /*!<Bit 1 */\r
3979 #define  FSMC_BWTR2_ADDSET_2                 ((uint32_t)0x00000004)        /*!<Bit 2 */\r
3980 #define  FSMC_BWTR2_ADDSET_3                 ((uint32_t)0x00000008)        /*!<Bit 3 */\r
3981 \r
3982 #define  FSMC_BWTR2_ADDHLD                   ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
3983 #define  FSMC_BWTR2_ADDHLD_0                 ((uint32_t)0x00000010)        /*!<Bit 0 */\r
3984 #define  FSMC_BWTR2_ADDHLD_1                 ((uint32_t)0x00000020)        /*!<Bit 1 */\r
3985 #define  FSMC_BWTR2_ADDHLD_2                 ((uint32_t)0x00000040)        /*!<Bit 2 */\r
3986 #define  FSMC_BWTR2_ADDHLD_3                 ((uint32_t)0x00000080)        /*!<Bit 3 */\r
3987 \r
3988 #define  FSMC_BWTR2_DATAST                   ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
3989 #define  FSMC_BWTR2_DATAST_0                 ((uint32_t)0x00000100)        /*!<Bit 0 */\r
3990 #define  FSMC_BWTR2_DATAST_1                 ((uint32_t)0x00000200)        /*!<Bit 1 */\r
3991 #define  FSMC_BWTR2_DATAST_2                 ((uint32_t)0x00000400)        /*!<Bit 2 */\r
3992 #define  FSMC_BWTR2_DATAST_3                 ((uint32_t)0x00000800)        /*!<Bit 3 */\r
3993 \r
3994 #define  FSMC_BWTR2_CLKDIV                   ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
3995 #define  FSMC_BWTR2_CLKDIV_0                 ((uint32_t)0x00100000)        /*!<Bit 0 */\r
3996 #define  FSMC_BWTR2_CLKDIV_1                 ((uint32_t)0x00200000)        /*!<Bit 1*/\r
3997 #define  FSMC_BWTR2_CLKDIV_2                 ((uint32_t)0x00400000)        /*!<Bit 2 */\r
3998 #define  FSMC_BWTR2_CLKDIV_3                 ((uint32_t)0x00800000)        /*!<Bit 3 */\r
3999 \r
4000 #define  FSMC_BWTR2_DATLAT                   ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
4001 #define  FSMC_BWTR2_DATLAT_0                 ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4002 #define  FSMC_BWTR2_DATLAT_1                 ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4003 #define  FSMC_BWTR2_DATLAT_2                 ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4004 #define  FSMC_BWTR2_DATLAT_3                 ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4005 \r
4006 #define  FSMC_BWTR2_ACCMOD                   ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
4007 #define  FSMC_BWTR2_ACCMOD_0                 ((uint32_t)0x10000000)        /*!<Bit 0 */\r
4008 #define  FSMC_BWTR2_ACCMOD_1                 ((uint32_t)0x20000000)        /*!<Bit 1 */\r
4009 \r
4010 /******************  Bit definition for FSMC_BWTR3 register  ******************/\r
4011 #define  FSMC_BWTR3_ADDSET                   ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
4012 #define  FSMC_BWTR3_ADDSET_0                 ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4013 #define  FSMC_BWTR3_ADDSET_1                 ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4014 #define  FSMC_BWTR3_ADDSET_2                 ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4015 #define  FSMC_BWTR3_ADDSET_3                 ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4016 \r
4017 #define  FSMC_BWTR3_ADDHLD                   ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
4018 #define  FSMC_BWTR3_ADDHLD_0                 ((uint32_t)0x00000010)        /*!<Bit 0 */\r
4019 #define  FSMC_BWTR3_ADDHLD_1                 ((uint32_t)0x00000020)        /*!<Bit 1 */\r
4020 #define  FSMC_BWTR3_ADDHLD_2                 ((uint32_t)0x00000040)        /*!<Bit 2 */\r
4021 #define  FSMC_BWTR3_ADDHLD_3                 ((uint32_t)0x00000080)        /*!<Bit 3 */\r
4022 \r
4023 #define  FSMC_BWTR3_DATAST                   ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
4024 #define  FSMC_BWTR3_DATAST_0                 ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4025 #define  FSMC_BWTR3_DATAST_1                 ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4026 #define  FSMC_BWTR3_DATAST_2                 ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4027 #define  FSMC_BWTR3_DATAST_3                 ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4028 \r
4029 #define  FSMC_BWTR3_CLKDIV                   ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
4030 #define  FSMC_BWTR3_CLKDIV_0                 ((uint32_t)0x00100000)        /*!<Bit 0 */\r
4031 #define  FSMC_BWTR3_CLKDIV_1                 ((uint32_t)0x00200000)        /*!<Bit 1 */\r
4032 #define  FSMC_BWTR3_CLKDIV_2                 ((uint32_t)0x00400000)        /*!<Bit 2 */\r
4033 #define  FSMC_BWTR3_CLKDIV_3                 ((uint32_t)0x00800000)        /*!<Bit 3 */\r
4034 \r
4035 #define  FSMC_BWTR3_DATLAT                   ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
4036 #define  FSMC_BWTR3_DATLAT_0                 ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4037 #define  FSMC_BWTR3_DATLAT_1                 ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4038 #define  FSMC_BWTR3_DATLAT_2                 ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4039 #define  FSMC_BWTR3_DATLAT_3                 ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4040 \r
4041 #define  FSMC_BWTR3_ACCMOD                   ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
4042 #define  FSMC_BWTR3_ACCMOD_0                 ((uint32_t)0x10000000)        /*!<Bit 0 */\r
4043 #define  FSMC_BWTR3_ACCMOD_1                 ((uint32_t)0x20000000)        /*!<Bit 1 */\r
4044 \r
4045 /******************  Bit definition for FSMC_BWTR4 register  ******************/\r
4046 #define  FSMC_BWTR4_ADDSET                   ((uint32_t)0x0000000F)        /*!<ADDSET[3:0] bits (Address setup phase duration) */\r
4047 #define  FSMC_BWTR4_ADDSET_0                 ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4048 #define  FSMC_BWTR4_ADDSET_1                 ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4049 #define  FSMC_BWTR4_ADDSET_2                 ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4050 #define  FSMC_BWTR4_ADDSET_3                 ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4051 \r
4052 #define  FSMC_BWTR4_ADDHLD                   ((uint32_t)0x000000F0)        /*!<ADDHLD[3:0] bits (Address-hold phase duration) */\r
4053 #define  FSMC_BWTR4_ADDHLD_0                 ((uint32_t)0x00000010)        /*!<Bit 0 */\r
4054 #define  FSMC_BWTR4_ADDHLD_1                 ((uint32_t)0x00000020)        /*!<Bit 1 */\r
4055 #define  FSMC_BWTR4_ADDHLD_2                 ((uint32_t)0x00000040)        /*!<Bit 2 */\r
4056 #define  FSMC_BWTR4_ADDHLD_3                 ((uint32_t)0x00000080)        /*!<Bit 3 */\r
4057 \r
4058 #define  FSMC_BWTR4_DATAST                   ((uint32_t)0x0000FF00)        /*!<DATAST [3:0] bits (Data-phase duration) */\r
4059 #define  FSMC_BWTR4_DATAST_0                 ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4060 #define  FSMC_BWTR4_DATAST_1                 ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4061 #define  FSMC_BWTR4_DATAST_2                 ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4062 #define  FSMC_BWTR4_DATAST_3                 ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4063 \r
4064 #define  FSMC_BWTR4_CLKDIV                   ((uint32_t)0x00F00000)        /*!<CLKDIV[3:0] bits (Clock divide ratio) */\r
4065 #define  FSMC_BWTR4_CLKDIV_0                 ((uint32_t)0x00100000)        /*!<Bit 0 */\r
4066 #define  FSMC_BWTR4_CLKDIV_1                 ((uint32_t)0x00200000)        /*!<Bit 1 */\r
4067 #define  FSMC_BWTR4_CLKDIV_2                 ((uint32_t)0x00400000)        /*!<Bit 2 */\r
4068 #define  FSMC_BWTR4_CLKDIV_3                 ((uint32_t)0x00800000)        /*!<Bit 3 */\r
4069 \r
4070 #define  FSMC_BWTR4_DATLAT                   ((uint32_t)0x0F000000)        /*!<DATLA[3:0] bits (Data latency) */\r
4071 #define  FSMC_BWTR4_DATLAT_0                 ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4072 #define  FSMC_BWTR4_DATLAT_1                 ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4073 #define  FSMC_BWTR4_DATLAT_2                 ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4074 #define  FSMC_BWTR4_DATLAT_3                 ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4075 \r
4076 #define  FSMC_BWTR4_ACCMOD                   ((uint32_t)0x30000000)        /*!<ACCMOD[1:0] bits (Access mode) */\r
4077 #define  FSMC_BWTR4_ACCMOD_0                 ((uint32_t)0x10000000)        /*!<Bit 0 */\r
4078 #define  FSMC_BWTR4_ACCMOD_1                 ((uint32_t)0x20000000)        /*!<Bit 1 */\r
4079 \r
4080 /******************  Bit definition for FSMC_PCR2 register  *******************/\r
4081 #define  FSMC_PCR2_PWAITEN                   ((uint32_t)0x00000002)        /*!<Wait feature enable bit */\r
4082 #define  FSMC_PCR2_PBKEN                     ((uint32_t)0x00000004)        /*!<PC Card/NAND Flash memory bank enable bit */\r
4083 #define  FSMC_PCR2_PTYP                      ((uint32_t)0x00000008)        /*!<Memory type */\r
4084 \r
4085 #define  FSMC_PCR2_PWID                      ((uint32_t)0x00000030)        /*!<PWID[1:0] bits (NAND Flash databus width) */\r
4086 #define  FSMC_PCR2_PWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
4087 #define  FSMC_PCR2_PWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
4088 \r
4089 #define  FSMC_PCR2_ECCEN                     ((uint32_t)0x00000040)        /*!<ECC computation logic enable bit */\r
4090 \r
4091 #define  FSMC_PCR2_TCLR                      ((uint32_t)0x00001E00)        /*!<TCLR[3:0] bits (CLE to RE delay) */\r
4092 #define  FSMC_PCR2_TCLR_0                    ((uint32_t)0x00000200)        /*!<Bit 0 */\r
4093 #define  FSMC_PCR2_TCLR_1                    ((uint32_t)0x00000400)        /*!<Bit 1 */\r
4094 #define  FSMC_PCR2_TCLR_2                    ((uint32_t)0x00000800)        /*!<Bit 2 */\r
4095 #define  FSMC_PCR2_TCLR_3                    ((uint32_t)0x00001000)        /*!<Bit 3 */\r
4096 \r
4097 #define  FSMC_PCR2_TAR                       ((uint32_t)0x0001E000)        /*!<TAR[3:0] bits (ALE to RE delay) */\r
4098 #define  FSMC_PCR2_TAR_0                     ((uint32_t)0x00002000)        /*!<Bit 0 */\r
4099 #define  FSMC_PCR2_TAR_1                     ((uint32_t)0x00004000)        /*!<Bit 1 */\r
4100 #define  FSMC_PCR2_TAR_2                     ((uint32_t)0x00008000)        /*!<Bit 2 */\r
4101 #define  FSMC_PCR2_TAR_3                     ((uint32_t)0x00010000)        /*!<Bit 3 */\r
4102 \r
4103 #define  FSMC_PCR2_ECCPS                     ((uint32_t)0x000E0000)        /*!<ECCPS[1:0] bits (ECC page size) */\r
4104 #define  FSMC_PCR2_ECCPS_0                   ((uint32_t)0x00020000)        /*!<Bit 0 */\r
4105 #define  FSMC_PCR2_ECCPS_1                   ((uint32_t)0x00040000)        /*!<Bit 1 */\r
4106 #define  FSMC_PCR2_ECCPS_2                   ((uint32_t)0x00080000)        /*!<Bit 2 */\r
4107 \r
4108 /******************  Bit definition for FSMC_PCR3 register  *******************/\r
4109 #define  FSMC_PCR3_PWAITEN                   ((uint32_t)0x00000002)        /*!<Wait feature enable bit */\r
4110 #define  FSMC_PCR3_PBKEN                     ((uint32_t)0x00000004)        /*!<PC Card/NAND Flash memory bank enable bit */\r
4111 #define  FSMC_PCR3_PTYP                      ((uint32_t)0x00000008)        /*!<Memory type */\r
4112 \r
4113 #define  FSMC_PCR3_PWID                      ((uint32_t)0x00000030)        /*!<PWID[1:0] bits (NAND Flash databus width) */\r
4114 #define  FSMC_PCR3_PWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
4115 #define  FSMC_PCR3_PWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
4116 \r
4117 #define  FSMC_PCR3_ECCEN                     ((uint32_t)0x00000040)        /*!<ECC computation logic enable bit */\r
4118 \r
4119 #define  FSMC_PCR3_TCLR                      ((uint32_t)0x00001E00)        /*!<TCLR[3:0] bits (CLE to RE delay) */\r
4120 #define  FSMC_PCR3_TCLR_0                    ((uint32_t)0x00000200)        /*!<Bit 0 */\r
4121 #define  FSMC_PCR3_TCLR_1                    ((uint32_t)0x00000400)        /*!<Bit 1 */\r
4122 #define  FSMC_PCR3_TCLR_2                    ((uint32_t)0x00000800)        /*!<Bit 2 */\r
4123 #define  FSMC_PCR3_TCLR_3                    ((uint32_t)0x00001000)        /*!<Bit 3 */\r
4124 \r
4125 #define  FSMC_PCR3_TAR                       ((uint32_t)0x0001E000)        /*!<TAR[3:0] bits (ALE to RE delay) */\r
4126 #define  FSMC_PCR3_TAR_0                     ((uint32_t)0x00002000)        /*!<Bit 0 */\r
4127 #define  FSMC_PCR3_TAR_1                     ((uint32_t)0x00004000)        /*!<Bit 1 */\r
4128 #define  FSMC_PCR3_TAR_2                     ((uint32_t)0x00008000)        /*!<Bit 2 */\r
4129 #define  FSMC_PCR3_TAR_3                     ((uint32_t)0x00010000)        /*!<Bit 3 */\r
4130 \r
4131 #define  FSMC_PCR3_ECCPS                     ((uint32_t)0x000E0000)        /*!<ECCPS[2:0] bits (ECC page size) */\r
4132 #define  FSMC_PCR3_ECCPS_0                   ((uint32_t)0x00020000)        /*!<Bit 0 */\r
4133 #define  FSMC_PCR3_ECCPS_1                   ((uint32_t)0x00040000)        /*!<Bit 1 */\r
4134 #define  FSMC_PCR3_ECCPS_2                   ((uint32_t)0x00080000)        /*!<Bit 2 */\r
4135 \r
4136 /******************  Bit definition for FSMC_PCR4 register  *******************/\r
4137 #define  FSMC_PCR4_PWAITEN                   ((uint32_t)0x00000002)        /*!<Wait feature enable bit */\r
4138 #define  FSMC_PCR4_PBKEN                     ((uint32_t)0x00000004)        /*!<PC Card/NAND Flash memory bank enable bit */\r
4139 #define  FSMC_PCR4_PTYP                      ((uint32_t)0x00000008)        /*!<Memory type */\r
4140 \r
4141 #define  FSMC_PCR4_PWID                      ((uint32_t)0x00000030)        /*!<PWID[1:0] bits (NAND Flash databus width) */\r
4142 #define  FSMC_PCR4_PWID_0                    ((uint32_t)0x00000010)        /*!<Bit 0 */\r
4143 #define  FSMC_PCR4_PWID_1                    ((uint32_t)0x00000020)        /*!<Bit 1 */\r
4144 \r
4145 #define  FSMC_PCR4_ECCEN                     ((uint32_t)0x00000040)        /*!<ECC computation logic enable bit */\r
4146 \r
4147 #define  FSMC_PCR4_TCLR                      ((uint32_t)0x00001E00)        /*!<TCLR[3:0] bits (CLE to RE delay) */\r
4148 #define  FSMC_PCR4_TCLR_0                    ((uint32_t)0x00000200)        /*!<Bit 0 */\r
4149 #define  FSMC_PCR4_TCLR_1                    ((uint32_t)0x00000400)        /*!<Bit 1 */\r
4150 #define  FSMC_PCR4_TCLR_2                    ((uint32_t)0x00000800)        /*!<Bit 2 */\r
4151 #define  FSMC_PCR4_TCLR_3                    ((uint32_t)0x00001000)        /*!<Bit 3 */\r
4152 \r
4153 #define  FSMC_PCR4_TAR                       ((uint32_t)0x0001E000)        /*!<TAR[3:0] bits (ALE to RE delay) */\r
4154 #define  FSMC_PCR4_TAR_0                     ((uint32_t)0x00002000)        /*!<Bit 0 */\r
4155 #define  FSMC_PCR4_TAR_1                     ((uint32_t)0x00004000)        /*!<Bit 1 */\r
4156 #define  FSMC_PCR4_TAR_2                     ((uint32_t)0x00008000)        /*!<Bit 2 */\r
4157 #define  FSMC_PCR4_TAR_3                     ((uint32_t)0x00010000)        /*!<Bit 3 */\r
4158 \r
4159 #define  FSMC_PCR4_ECCPS                     ((uint32_t)0x000E0000)        /*!<ECCPS[2:0] bits (ECC page size) */\r
4160 #define  FSMC_PCR4_ECCPS_0                   ((uint32_t)0x00020000)        /*!<Bit 0 */\r
4161 #define  FSMC_PCR4_ECCPS_1                   ((uint32_t)0x00040000)        /*!<Bit 1 */\r
4162 #define  FSMC_PCR4_ECCPS_2                   ((uint32_t)0x00080000)        /*!<Bit 2 */\r
4163 \r
4164 /*******************  Bit definition for FSMC_SR2 register  *******************/\r
4165 #define  FSMC_SR2_IRS                        ((uint8_t)0x01)               /*!<Interrupt Rising Edge status */\r
4166 #define  FSMC_SR2_ILS                        ((uint8_t)0x02)               /*!<Interrupt Level status */\r
4167 #define  FSMC_SR2_IFS                        ((uint8_t)0x04)               /*!<Interrupt Falling Edge status */\r
4168 #define  FSMC_SR2_IREN                       ((uint8_t)0x08)               /*!<Interrupt Rising Edge detection Enable bit */\r
4169 #define  FSMC_SR2_ILEN                       ((uint8_t)0x10)               /*!<Interrupt Level detection Enable bit */\r
4170 #define  FSMC_SR2_IFEN                       ((uint8_t)0x20)               /*!<Interrupt Falling Edge detection Enable bit */\r
4171 #define  FSMC_SR2_FEMPT                      ((uint8_t)0x40)               /*!<FIFO empty */\r
4172 \r
4173 /*******************  Bit definition for FSMC_SR3 register  *******************/\r
4174 #define  FSMC_SR3_IRS                        ((uint8_t)0x01)               /*!<Interrupt Rising Edge status */\r
4175 #define  FSMC_SR3_ILS                        ((uint8_t)0x02)               /*!<Interrupt Level status */\r
4176 #define  FSMC_SR3_IFS                        ((uint8_t)0x04)               /*!<Interrupt Falling Edge status */\r
4177 #define  FSMC_SR3_IREN                       ((uint8_t)0x08)               /*!<Interrupt Rising Edge detection Enable bit */\r
4178 #define  FSMC_SR3_ILEN                       ((uint8_t)0x10)               /*!<Interrupt Level detection Enable bit */\r
4179 #define  FSMC_SR3_IFEN                       ((uint8_t)0x20)               /*!<Interrupt Falling Edge detection Enable bit */\r
4180 #define  FSMC_SR3_FEMPT                      ((uint8_t)0x40)               /*!<FIFO empty */\r
4181 \r
4182 /*******************  Bit definition for FSMC_SR4 register  *******************/\r
4183 #define  FSMC_SR4_IRS                        ((uint8_t)0x01)               /*!<Interrupt Rising Edge status */\r
4184 #define  FSMC_SR4_ILS                        ((uint8_t)0x02)               /*!<Interrupt Level status */\r
4185 #define  FSMC_SR4_IFS                        ((uint8_t)0x04)               /*!<Interrupt Falling Edge status */\r
4186 #define  FSMC_SR4_IREN                       ((uint8_t)0x08)               /*!<Interrupt Rising Edge detection Enable bit */\r
4187 #define  FSMC_SR4_ILEN                       ((uint8_t)0x10)               /*!<Interrupt Level detection Enable bit */\r
4188 #define  FSMC_SR4_IFEN                       ((uint8_t)0x20)               /*!<Interrupt Falling Edge detection Enable bit */\r
4189 #define  FSMC_SR4_FEMPT                      ((uint8_t)0x40)               /*!<FIFO empty */\r
4190 \r
4191 /******************  Bit definition for FSMC_PMEM2 register  ******************/\r
4192 #define  FSMC_PMEM2_MEMSET2                  ((uint32_t)0x000000FF)        /*!<MEMSET2[7:0] bits (Common memory 2 setup time) */\r
4193 #define  FSMC_PMEM2_MEMSET2_0                ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4194 #define  FSMC_PMEM2_MEMSET2_1                ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4195 #define  FSMC_PMEM2_MEMSET2_2                ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4196 #define  FSMC_PMEM2_MEMSET2_3                ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4197 #define  FSMC_PMEM2_MEMSET2_4                ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4198 #define  FSMC_PMEM2_MEMSET2_5                ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4199 #define  FSMC_PMEM2_MEMSET2_6                ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4200 #define  FSMC_PMEM2_MEMSET2_7                ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4201 \r
4202 #define  FSMC_PMEM2_MEMWAIT2                 ((uint32_t)0x0000FF00)        /*!<MEMWAIT2[7:0] bits (Common memory 2 wait time) */\r
4203 #define  FSMC_PMEM2_MEMWAIT2_0               ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4204 #define  FSMC_PMEM2_MEMWAIT2_1               ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4205 #define  FSMC_PMEM2_MEMWAIT2_2               ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4206 #define  FSMC_PMEM2_MEMWAIT2_3               ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4207 #define  FSMC_PMEM2_MEMWAIT2_4               ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4208 #define  FSMC_PMEM2_MEMWAIT2_5               ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4209 #define  FSMC_PMEM2_MEMWAIT2_6               ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4210 #define  FSMC_PMEM2_MEMWAIT2_7               ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4211 \r
4212 #define  FSMC_PMEM2_MEMHOLD2                 ((uint32_t)0x00FF0000)        /*!<MEMHOLD2[7:0] bits (Common memory 2 hold time) */\r
4213 #define  FSMC_PMEM2_MEMHOLD2_0               ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4214 #define  FSMC_PMEM2_MEMHOLD2_1               ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4215 #define  FSMC_PMEM2_MEMHOLD2_2               ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4216 #define  FSMC_PMEM2_MEMHOLD2_3               ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4217 #define  FSMC_PMEM2_MEMHOLD2_4               ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4218 #define  FSMC_PMEM2_MEMHOLD2_5               ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4219 #define  FSMC_PMEM2_MEMHOLD2_6               ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4220 #define  FSMC_PMEM2_MEMHOLD2_7               ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4221 \r
4222 #define  FSMC_PMEM2_MEMHIZ2                  ((uint32_t)0xFF000000)        /*!<MEMHIZ2[7:0] bits (Common memory 2 databus HiZ time) */\r
4223 #define  FSMC_PMEM2_MEMHIZ2_0                ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4224 #define  FSMC_PMEM2_MEMHIZ2_1                ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4225 #define  FSMC_PMEM2_MEMHIZ2_2                ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4226 #define  FSMC_PMEM2_MEMHIZ2_3                ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4227 #define  FSMC_PMEM2_MEMHIZ2_4                ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4228 #define  FSMC_PMEM2_MEMHIZ2_5                ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4229 #define  FSMC_PMEM2_MEMHIZ2_6                ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4230 #define  FSMC_PMEM2_MEMHIZ2_7                ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4231 \r
4232 /******************  Bit definition for FSMC_PMEM3 register  ******************/\r
4233 #define  FSMC_PMEM3_MEMSET3                  ((uint32_t)0x000000FF)        /*!<MEMSET3[7:0] bits (Common memory 3 setup time) */\r
4234 #define  FSMC_PMEM3_MEMSET3_0                ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4235 #define  FSMC_PMEM3_MEMSET3_1                ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4236 #define  FSMC_PMEM3_MEMSET3_2                ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4237 #define  FSMC_PMEM3_MEMSET3_3                ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4238 #define  FSMC_PMEM3_MEMSET3_4                ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4239 #define  FSMC_PMEM3_MEMSET3_5                ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4240 #define  FSMC_PMEM3_MEMSET3_6                ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4241 #define  FSMC_PMEM3_MEMSET3_7                ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4242 \r
4243 #define  FSMC_PMEM3_MEMWAIT3                 ((uint32_t)0x0000FF00)        /*!<MEMWAIT3[7:0] bits (Common memory 3 wait time) */\r
4244 #define  FSMC_PMEM3_MEMWAIT3_0               ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4245 #define  FSMC_PMEM3_MEMWAIT3_1               ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4246 #define  FSMC_PMEM3_MEMWAIT3_2               ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4247 #define  FSMC_PMEM3_MEMWAIT3_3               ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4248 #define  FSMC_PMEM3_MEMWAIT3_4               ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4249 #define  FSMC_PMEM3_MEMWAIT3_5               ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4250 #define  FSMC_PMEM3_MEMWAIT3_6               ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4251 #define  FSMC_PMEM3_MEMWAIT3_7               ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4252 \r
4253 #define  FSMC_PMEM3_MEMHOLD3                 ((uint32_t)0x00FF0000)        /*!<MEMHOLD3[7:0] bits (Common memory 3 hold time) */\r
4254 #define  FSMC_PMEM3_MEMHOLD3_0               ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4255 #define  FSMC_PMEM3_MEMHOLD3_1               ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4256 #define  FSMC_PMEM3_MEMHOLD3_2               ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4257 #define  FSMC_PMEM3_MEMHOLD3_3               ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4258 #define  FSMC_PMEM3_MEMHOLD3_4               ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4259 #define  FSMC_PMEM3_MEMHOLD3_5               ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4260 #define  FSMC_PMEM3_MEMHOLD3_6               ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4261 #define  FSMC_PMEM3_MEMHOLD3_7               ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4262 \r
4263 #define  FSMC_PMEM3_MEMHIZ3                  ((uint32_t)0xFF000000)        /*!<MEMHIZ3[7:0] bits (Common memory 3 databus HiZ time) */\r
4264 #define  FSMC_PMEM3_MEMHIZ3_0                ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4265 #define  FSMC_PMEM3_MEMHIZ3_1                ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4266 #define  FSMC_PMEM3_MEMHIZ3_2                ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4267 #define  FSMC_PMEM3_MEMHIZ3_3                ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4268 #define  FSMC_PMEM3_MEMHIZ3_4                ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4269 #define  FSMC_PMEM3_MEMHIZ3_5                ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4270 #define  FSMC_PMEM3_MEMHIZ3_6                ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4271 #define  FSMC_PMEM3_MEMHIZ3_7                ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4272 \r
4273 /******************  Bit definition for FSMC_PMEM4 register  ******************/\r
4274 #define  FSMC_PMEM4_MEMSET4                  ((uint32_t)0x000000FF)        /*!<MEMSET4[7:0] bits (Common memory 4 setup time) */\r
4275 #define  FSMC_PMEM4_MEMSET4_0                ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4276 #define  FSMC_PMEM4_MEMSET4_1                ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4277 #define  FSMC_PMEM4_MEMSET4_2                ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4278 #define  FSMC_PMEM4_MEMSET4_3                ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4279 #define  FSMC_PMEM4_MEMSET4_4                ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4280 #define  FSMC_PMEM4_MEMSET4_5                ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4281 #define  FSMC_PMEM4_MEMSET4_6                ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4282 #define  FSMC_PMEM4_MEMSET4_7                ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4283 \r
4284 #define  FSMC_PMEM4_MEMWAIT4                 ((uint32_t)0x0000FF00)        /*!<MEMWAIT4[7:0] bits (Common memory 4 wait time) */\r
4285 #define  FSMC_PMEM4_MEMWAIT4_0               ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4286 #define  FSMC_PMEM4_MEMWAIT4_1               ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4287 #define  FSMC_PMEM4_MEMWAIT4_2               ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4288 #define  FSMC_PMEM4_MEMWAIT4_3               ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4289 #define  FSMC_PMEM4_MEMWAIT4_4               ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4290 #define  FSMC_PMEM4_MEMWAIT4_5               ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4291 #define  FSMC_PMEM4_MEMWAIT4_6               ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4292 #define  FSMC_PMEM4_MEMWAIT4_7               ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4293 \r
4294 #define  FSMC_PMEM4_MEMHOLD4                 ((uint32_t)0x00FF0000)        /*!<MEMHOLD4[7:0] bits (Common memory 4 hold time) */\r
4295 #define  FSMC_PMEM4_MEMHOLD4_0               ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4296 #define  FSMC_PMEM4_MEMHOLD4_1               ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4297 #define  FSMC_PMEM4_MEMHOLD4_2               ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4298 #define  FSMC_PMEM4_MEMHOLD4_3               ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4299 #define  FSMC_PMEM4_MEMHOLD4_4               ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4300 #define  FSMC_PMEM4_MEMHOLD4_5               ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4301 #define  FSMC_PMEM4_MEMHOLD4_6               ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4302 #define  FSMC_PMEM4_MEMHOLD4_7               ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4303 \r
4304 #define  FSMC_PMEM4_MEMHIZ4                  ((uint32_t)0xFF000000)        /*!<MEMHIZ4[7:0] bits (Common memory 4 databus HiZ time) */\r
4305 #define  FSMC_PMEM4_MEMHIZ4_0                ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4306 #define  FSMC_PMEM4_MEMHIZ4_1                ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4307 #define  FSMC_PMEM4_MEMHIZ4_2                ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4308 #define  FSMC_PMEM4_MEMHIZ4_3                ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4309 #define  FSMC_PMEM4_MEMHIZ4_4                ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4310 #define  FSMC_PMEM4_MEMHIZ4_5                ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4311 #define  FSMC_PMEM4_MEMHIZ4_6                ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4312 #define  FSMC_PMEM4_MEMHIZ4_7                ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4313 \r
4314 /******************  Bit definition for FSMC_PATT2 register  ******************/\r
4315 #define  FSMC_PATT2_ATTSET2                  ((uint32_t)0x000000FF)        /*!<ATTSET2[7:0] bits (Attribute memory 2 setup time) */\r
4316 #define  FSMC_PATT2_ATTSET2_0                ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4317 #define  FSMC_PATT2_ATTSET2_1                ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4318 #define  FSMC_PATT2_ATTSET2_2                ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4319 #define  FSMC_PATT2_ATTSET2_3                ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4320 #define  FSMC_PATT2_ATTSET2_4                ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4321 #define  FSMC_PATT2_ATTSET2_5                ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4322 #define  FSMC_PATT2_ATTSET2_6                ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4323 #define  FSMC_PATT2_ATTSET2_7                ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4324 \r
4325 #define  FSMC_PATT2_ATTWAIT2                 ((uint32_t)0x0000FF00)        /*!<ATTWAIT2[7:0] bits (Attribute memory 2 wait time) */\r
4326 #define  FSMC_PATT2_ATTWAIT2_0               ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4327 #define  FSMC_PATT2_ATTWAIT2_1               ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4328 #define  FSMC_PATT2_ATTWAIT2_2               ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4329 #define  FSMC_PATT2_ATTWAIT2_3               ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4330 #define  FSMC_PATT2_ATTWAIT2_4               ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4331 #define  FSMC_PATT2_ATTWAIT2_5               ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4332 #define  FSMC_PATT2_ATTWAIT2_6               ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4333 #define  FSMC_PATT2_ATTWAIT2_7               ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4334 \r
4335 #define  FSMC_PATT2_ATTHOLD2                 ((uint32_t)0x00FF0000)        /*!<ATTHOLD2[7:0] bits (Attribute memory 2 hold time) */\r
4336 #define  FSMC_PATT2_ATTHOLD2_0               ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4337 #define  FSMC_PATT2_ATTHOLD2_1               ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4338 #define  FSMC_PATT2_ATTHOLD2_2               ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4339 #define  FSMC_PATT2_ATTHOLD2_3               ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4340 #define  FSMC_PATT2_ATTHOLD2_4               ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4341 #define  FSMC_PATT2_ATTHOLD2_5               ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4342 #define  FSMC_PATT2_ATTHOLD2_6               ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4343 #define  FSMC_PATT2_ATTHOLD2_7               ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4344 \r
4345 #define  FSMC_PATT2_ATTHIZ2                  ((uint32_t)0xFF000000)        /*!<ATTHIZ2[7:0] bits (Attribute memory 2 databus HiZ time) */\r
4346 #define  FSMC_PATT2_ATTHIZ2_0                ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4347 #define  FSMC_PATT2_ATTHIZ2_1                ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4348 #define  FSMC_PATT2_ATTHIZ2_2                ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4349 #define  FSMC_PATT2_ATTHIZ2_3                ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4350 #define  FSMC_PATT2_ATTHIZ2_4                ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4351 #define  FSMC_PATT2_ATTHIZ2_5                ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4352 #define  FSMC_PATT2_ATTHIZ2_6                ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4353 #define  FSMC_PATT2_ATTHIZ2_7                ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4354 \r
4355 /******************  Bit definition for FSMC_PATT3 register  ******************/\r
4356 #define  FSMC_PATT3_ATTSET3                  ((uint32_t)0x000000FF)        /*!<ATTSET3[7:0] bits (Attribute memory 3 setup time) */\r
4357 #define  FSMC_PATT3_ATTSET3_0                ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4358 #define  FSMC_PATT3_ATTSET3_1                ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4359 #define  FSMC_PATT3_ATTSET3_2                ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4360 #define  FSMC_PATT3_ATTSET3_3                ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4361 #define  FSMC_PATT3_ATTSET3_4                ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4362 #define  FSMC_PATT3_ATTSET3_5                ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4363 #define  FSMC_PATT3_ATTSET3_6                ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4364 #define  FSMC_PATT3_ATTSET3_7                ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4365 \r
4366 #define  FSMC_PATT3_ATTWAIT3                 ((uint32_t)0x0000FF00)        /*!<ATTWAIT3[7:0] bits (Attribute memory 3 wait time) */\r
4367 #define  FSMC_PATT3_ATTWAIT3_0               ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4368 #define  FSMC_PATT3_ATTWAIT3_1               ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4369 #define  FSMC_PATT3_ATTWAIT3_2               ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4370 #define  FSMC_PATT3_ATTWAIT3_3               ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4371 #define  FSMC_PATT3_ATTWAIT3_4               ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4372 #define  FSMC_PATT3_ATTWAIT3_5               ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4373 #define  FSMC_PATT3_ATTWAIT3_6               ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4374 #define  FSMC_PATT3_ATTWAIT3_7               ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4375 \r
4376 #define  FSMC_PATT3_ATTHOLD3                 ((uint32_t)0x00FF0000)        /*!<ATTHOLD3[7:0] bits (Attribute memory 3 hold time) */\r
4377 #define  FSMC_PATT3_ATTHOLD3_0               ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4378 #define  FSMC_PATT3_ATTHOLD3_1               ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4379 #define  FSMC_PATT3_ATTHOLD3_2               ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4380 #define  FSMC_PATT3_ATTHOLD3_3               ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4381 #define  FSMC_PATT3_ATTHOLD3_4               ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4382 #define  FSMC_PATT3_ATTHOLD3_5               ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4383 #define  FSMC_PATT3_ATTHOLD3_6               ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4384 #define  FSMC_PATT3_ATTHOLD3_7               ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4385 \r
4386 #define  FSMC_PATT3_ATTHIZ3                  ((uint32_t)0xFF000000)        /*!<ATTHIZ3[7:0] bits (Attribute memory 3 databus HiZ time) */\r
4387 #define  FSMC_PATT3_ATTHIZ3_0                ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4388 #define  FSMC_PATT3_ATTHIZ3_1                ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4389 #define  FSMC_PATT3_ATTHIZ3_2                ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4390 #define  FSMC_PATT3_ATTHIZ3_3                ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4391 #define  FSMC_PATT3_ATTHIZ3_4                ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4392 #define  FSMC_PATT3_ATTHIZ3_5                ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4393 #define  FSMC_PATT3_ATTHIZ3_6                ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4394 #define  FSMC_PATT3_ATTHIZ3_7                ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4395 \r
4396 /******************  Bit definition for FSMC_PATT4 register  ******************/\r
4397 #define  FSMC_PATT4_ATTSET4                  ((uint32_t)0x000000FF)        /*!<ATTSET4[7:0] bits (Attribute memory 4 setup time) */\r
4398 #define  FSMC_PATT4_ATTSET4_0                ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4399 #define  FSMC_PATT4_ATTSET4_1                ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4400 #define  FSMC_PATT4_ATTSET4_2                ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4401 #define  FSMC_PATT4_ATTSET4_3                ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4402 #define  FSMC_PATT4_ATTSET4_4                ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4403 #define  FSMC_PATT4_ATTSET4_5                ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4404 #define  FSMC_PATT4_ATTSET4_6                ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4405 #define  FSMC_PATT4_ATTSET4_7                ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4406 \r
4407 #define  FSMC_PATT4_ATTWAIT4                 ((uint32_t)0x0000FF00)        /*!<ATTWAIT4[7:0] bits (Attribute memory 4 wait time) */\r
4408 #define  FSMC_PATT4_ATTWAIT4_0               ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4409 #define  FSMC_PATT4_ATTWAIT4_1               ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4410 #define  FSMC_PATT4_ATTWAIT4_2               ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4411 #define  FSMC_PATT4_ATTWAIT4_3               ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4412 #define  FSMC_PATT4_ATTWAIT4_4               ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4413 #define  FSMC_PATT4_ATTWAIT4_5               ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4414 #define  FSMC_PATT4_ATTWAIT4_6               ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4415 #define  FSMC_PATT4_ATTWAIT4_7               ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4416 \r
4417 #define  FSMC_PATT4_ATTHOLD4                 ((uint32_t)0x00FF0000)        /*!<ATTHOLD4[7:0] bits (Attribute memory 4 hold time) */\r
4418 #define  FSMC_PATT4_ATTHOLD4_0               ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4419 #define  FSMC_PATT4_ATTHOLD4_1               ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4420 #define  FSMC_PATT4_ATTHOLD4_2               ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4421 #define  FSMC_PATT4_ATTHOLD4_3               ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4422 #define  FSMC_PATT4_ATTHOLD4_4               ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4423 #define  FSMC_PATT4_ATTHOLD4_5               ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4424 #define  FSMC_PATT4_ATTHOLD4_6               ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4425 #define  FSMC_PATT4_ATTHOLD4_7               ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4426 \r
4427 #define  FSMC_PATT4_ATTHIZ4                  ((uint32_t)0xFF000000)        /*!<ATTHIZ4[7:0] bits (Attribute memory 4 databus HiZ time) */\r
4428 #define  FSMC_PATT4_ATTHIZ4_0                ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4429 #define  FSMC_PATT4_ATTHIZ4_1                ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4430 #define  FSMC_PATT4_ATTHIZ4_2                ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4431 #define  FSMC_PATT4_ATTHIZ4_3                ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4432 #define  FSMC_PATT4_ATTHIZ4_4                ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4433 #define  FSMC_PATT4_ATTHIZ4_5                ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4434 #define  FSMC_PATT4_ATTHIZ4_6                ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4435 #define  FSMC_PATT4_ATTHIZ4_7                ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4436 \r
4437 /******************  Bit definition for FSMC_PIO4 register  *******************/\r
4438 #define  FSMC_PIO4_IOSET4                    ((uint32_t)0x000000FF)        /*!<IOSET4[7:0] bits (I/O 4 setup time) */\r
4439 #define  FSMC_PIO4_IOSET4_0                  ((uint32_t)0x00000001)        /*!<Bit 0 */\r
4440 #define  FSMC_PIO4_IOSET4_1                  ((uint32_t)0x00000002)        /*!<Bit 1 */\r
4441 #define  FSMC_PIO4_IOSET4_2                  ((uint32_t)0x00000004)        /*!<Bit 2 */\r
4442 #define  FSMC_PIO4_IOSET4_3                  ((uint32_t)0x00000008)        /*!<Bit 3 */\r
4443 #define  FSMC_PIO4_IOSET4_4                  ((uint32_t)0x00000010)        /*!<Bit 4 */\r
4444 #define  FSMC_PIO4_IOSET4_5                  ((uint32_t)0x00000020)        /*!<Bit 5 */\r
4445 #define  FSMC_PIO4_IOSET4_6                  ((uint32_t)0x00000040)        /*!<Bit 6 */\r
4446 #define  FSMC_PIO4_IOSET4_7                  ((uint32_t)0x00000080)        /*!<Bit 7 */\r
4447 \r
4448 #define  FSMC_PIO4_IOWAIT4                   ((uint32_t)0x0000FF00)        /*!<IOWAIT4[7:0] bits (I/O 4 wait time) */\r
4449 #define  FSMC_PIO4_IOWAIT4_0                 ((uint32_t)0x00000100)        /*!<Bit 0 */\r
4450 #define  FSMC_PIO4_IOWAIT4_1                 ((uint32_t)0x00000200)        /*!<Bit 1 */\r
4451 #define  FSMC_PIO4_IOWAIT4_2                 ((uint32_t)0x00000400)        /*!<Bit 2 */\r
4452 #define  FSMC_PIO4_IOWAIT4_3                 ((uint32_t)0x00000800)        /*!<Bit 3 */\r
4453 #define  FSMC_PIO4_IOWAIT4_4                 ((uint32_t)0x00001000)        /*!<Bit 4 */\r
4454 #define  FSMC_PIO4_IOWAIT4_5                 ((uint32_t)0x00002000)        /*!<Bit 5 */\r
4455 #define  FSMC_PIO4_IOWAIT4_6                 ((uint32_t)0x00004000)        /*!<Bit 6 */\r
4456 #define  FSMC_PIO4_IOWAIT4_7                 ((uint32_t)0x00008000)        /*!<Bit 7 */\r
4457 \r
4458 #define  FSMC_PIO4_IOHOLD4                   ((uint32_t)0x00FF0000)        /*!<IOHOLD4[7:0] bits (I/O 4 hold time) */\r
4459 #define  FSMC_PIO4_IOHOLD4_0                 ((uint32_t)0x00010000)        /*!<Bit 0 */\r
4460 #define  FSMC_PIO4_IOHOLD4_1                 ((uint32_t)0x00020000)        /*!<Bit 1 */\r
4461 #define  FSMC_PIO4_IOHOLD4_2                 ((uint32_t)0x00040000)        /*!<Bit 2 */\r
4462 #define  FSMC_PIO4_IOHOLD4_3                 ((uint32_t)0x00080000)        /*!<Bit 3 */\r
4463 #define  FSMC_PIO4_IOHOLD4_4                 ((uint32_t)0x00100000)        /*!<Bit 4 */\r
4464 #define  FSMC_PIO4_IOHOLD4_5                 ((uint32_t)0x00200000)        /*!<Bit 5 */\r
4465 #define  FSMC_PIO4_IOHOLD4_6                 ((uint32_t)0x00400000)        /*!<Bit 6 */\r
4466 #define  FSMC_PIO4_IOHOLD4_7                 ((uint32_t)0x00800000)        /*!<Bit 7 */\r
4467 \r
4468 #define  FSMC_PIO4_IOHIZ4                    ((uint32_t)0xFF000000)        /*!<IOHIZ4[7:0] bits (I/O 4 databus HiZ time) */\r
4469 #define  FSMC_PIO4_IOHIZ4_0                  ((uint32_t)0x01000000)        /*!<Bit 0 */\r
4470 #define  FSMC_PIO4_IOHIZ4_1                  ((uint32_t)0x02000000)        /*!<Bit 1 */\r
4471 #define  FSMC_PIO4_IOHIZ4_2                  ((uint32_t)0x04000000)        /*!<Bit 2 */\r
4472 #define  FSMC_PIO4_IOHIZ4_3                  ((uint32_t)0x08000000)        /*!<Bit 3 */\r
4473 #define  FSMC_PIO4_IOHIZ4_4                  ((uint32_t)0x10000000)        /*!<Bit 4 */\r
4474 #define  FSMC_PIO4_IOHIZ4_5                  ((uint32_t)0x20000000)        /*!<Bit 5 */\r
4475 #define  FSMC_PIO4_IOHIZ4_6                  ((uint32_t)0x40000000)        /*!<Bit 6 */\r
4476 #define  FSMC_PIO4_IOHIZ4_7                  ((uint32_t)0x80000000)        /*!<Bit 7 */\r
4477 \r
4478 /******************  Bit definition for FSMC_ECCR2 register  ******************/\r
4479 #define  FSMC_ECCR2_ECC2                     ((uint32_t)0xFFFFFFFF)        /*!<ECC result */\r
4480 \r
4481 /******************  Bit definition for FSMC_ECCR3 register  ******************/\r
4482 #define  FSMC_ECCR3_ECC3                     ((uint32_t)0xFFFFFFFF)        /*!<ECC result */\r
4483 \r
4484 /******************************************************************************/\r
4485 /*                                                                            */\r
4486 /*                          SD host Interface                                 */\r
4487 /*                                                                            */\r
4488 /******************************************************************************/\r
4489 \r
4490 /******************  Bit definition for SDIO_POWER register  ******************/\r
4491 #define  SDIO_POWER_PWRCTRL                  ((uint8_t)0x03)               /*!<PWRCTRL[1:0] bits (Power supply control bits) */\r
4492 #define  SDIO_POWER_PWRCTRL_0                ((uint8_t)0x01)               /*!<Bit 0 */\r
4493 #define  SDIO_POWER_PWRCTRL_1                ((uint8_t)0x02)               /*!<Bit 1 */\r
4494 \r
4495 /******************  Bit definition for SDIO_CLKCR register  ******************/\r
4496 #define  SDIO_CLKCR_CLKDIV                   ((uint16_t)0x00FF)            /*!<Clock divide factor */\r
4497 #define  SDIO_CLKCR_CLKEN                    ((uint16_t)0x0100)            /*!<Clock enable bit */\r
4498 #define  SDIO_CLKCR_PWRSAV                   ((uint16_t)0x0200)            /*!<Power saving configuration bit */\r
4499 #define  SDIO_CLKCR_BYPASS                   ((uint16_t)0x0400)            /*!<Clock divider bypass enable bit */\r
4500 \r
4501 #define  SDIO_CLKCR_WIDBUS                   ((uint16_t)0x1800)            /*!<WIDBUS[1:0] bits (Wide bus mode enable bit) */\r
4502 #define  SDIO_CLKCR_WIDBUS_0                 ((uint16_t)0x0800)            /*!<Bit 0 */\r
4503 #define  SDIO_CLKCR_WIDBUS_1                 ((uint16_t)0x1000)            /*!<Bit 1 */\r
4504 \r
4505 #define  SDIO_CLKCR_NEGEDGE                  ((uint16_t)0x2000)            /*!<SDIO_CK dephasing selection bit */\r
4506 #define  SDIO_CLKCR_HWFC_EN                  ((uint16_t)0x4000)            /*!<HW Flow Control enable */\r
4507 \r
4508 /*******************  Bit definition for SDIO_ARG register  *******************/\r
4509 #define  SDIO_ARG_CMDARG                     ((uint32_t)0xFFFFFFFF)            /*!<Command argument */\r
4510 \r
4511 /*******************  Bit definition for SDIO_CMD register  *******************/\r
4512 #define  SDIO_CMD_CMDINDEX                   ((uint16_t)0x003F)            /*!<Command Index */\r
4513 \r
4514 #define  SDIO_CMD_WAITRESP                   ((uint16_t)0x00C0)            /*!<WAITRESP[1:0] bits (Wait for response bits) */\r
4515 #define  SDIO_CMD_WAITRESP_0                 ((uint16_t)0x0040)            /*!< Bit 0 */\r
4516 #define  SDIO_CMD_WAITRESP_1                 ((uint16_t)0x0080)            /*!< Bit 1 */\r
4517 \r
4518 #define  SDIO_CMD_WAITINT                    ((uint16_t)0x0100)            /*!<CPSM Waits for Interrupt Request */\r
4519 #define  SDIO_CMD_WAITPEND                   ((uint16_t)0x0200)            /*!<CPSM Waits for ends of data transfer (CmdPend internal signal) */\r
4520 #define  SDIO_CMD_CPSMEN                     ((uint16_t)0x0400)            /*!<Command path state machine (CPSM) Enable bit */\r
4521 #define  SDIO_CMD_SDIOSUSPEND                ((uint16_t)0x0800)            /*!<SD I/O suspend command */\r
4522 #define  SDIO_CMD_ENCMDCOMPL                 ((uint16_t)0x1000)            /*!<Enable CMD completion */\r
4523 #define  SDIO_CMD_NIEN                       ((uint16_t)0x2000)            /*!<Not Interrupt Enable */\r
4524 #define  SDIO_CMD_CEATACMD                   ((uint16_t)0x4000)            /*!<CE-ATA command */\r
4525 \r
4526 /*****************  Bit definition for SDIO_RESPCMD register  *****************/\r
4527 #define  SDIO_RESPCMD_RESPCMD                ((uint8_t)0x3F)               /*!<Response command index */\r
4528 \r
4529 /******************  Bit definition for SDIO_RESP0 register  ******************/\r
4530 #define  SDIO_RESP0_CARDSTATUS0              ((uint32_t)0xFFFFFFFF)        /*!<Card Status */\r
4531 \r
4532 /******************  Bit definition for SDIO_RESP1 register  ******************/\r
4533 #define  SDIO_RESP1_CARDSTATUS1              ((uint32_t)0xFFFFFFFF)        /*!<Card Status */\r
4534 \r
4535 /******************  Bit definition for SDIO_RESP2 register  ******************/\r
4536 #define  SDIO_RESP2_CARDSTATUS2              ((uint32_t)0xFFFFFFFF)        /*!<Card Status */\r
4537 \r
4538 /******************  Bit definition for SDIO_RESP3 register  ******************/\r
4539 #define  SDIO_RESP3_CARDSTATUS3              ((uint32_t)0xFFFFFFFF)        /*!<Card Status */\r
4540 \r
4541 /******************  Bit definition for SDIO_RESP4 register  ******************/\r
4542 #define  SDIO_RESP4_CARDSTATUS4              ((uint32_t)0xFFFFFFFF)        /*!<Card Status */\r
4543 \r
4544 /******************  Bit definition for SDIO_DTIMER register  *****************/\r
4545 #define  SDIO_DTIMER_DATATIME                ((uint32_t)0xFFFFFFFF)        /*!<Data timeout period. */\r
4546 \r
4547 /******************  Bit definition for SDIO_DLEN register  *******************/\r
4548 #define  SDIO_DLEN_DATALENGTH                ((uint32_t)0x01FFFFFF)        /*!<Data length value */\r
4549 \r
4550 /******************  Bit definition for SDIO_DCTRL register  ******************/\r
4551 #define  SDIO_DCTRL_DTEN                     ((uint16_t)0x0001)            /*!<Data transfer enabled bit */\r
4552 #define  SDIO_DCTRL_DTDIR                    ((uint16_t)0x0002)            /*!<Data transfer direction selection */\r
4553 #define  SDIO_DCTRL_DTMODE                   ((uint16_t)0x0004)            /*!<Data transfer mode selection */\r
4554 #define  SDIO_DCTRL_DMAEN                    ((uint16_t)0x0008)            /*!<DMA enabled bit */\r
4555 \r
4556 #define  SDIO_DCTRL_DBLOCKSIZE               ((uint16_t)0x00F0)            /*!<DBLOCKSIZE[3:0] bits (Data block size) */\r
4557 #define  SDIO_DCTRL_DBLOCKSIZE_0             ((uint16_t)0x0010)            /*!<Bit 0 */\r
4558 #define  SDIO_DCTRL_DBLOCKSIZE_1             ((uint16_t)0x0020)            /*!<Bit 1 */\r
4559 #define  SDIO_DCTRL_DBLOCKSIZE_2             ((uint16_t)0x0040)            /*!<Bit 2 */\r
4560 #define  SDIO_DCTRL_DBLOCKSIZE_3             ((uint16_t)0x0080)            /*!<Bit 3 */\r
4561 \r
4562 #define  SDIO_DCTRL_RWSTART                  ((uint16_t)0x0100)            /*!<Read wait start */\r
4563 #define  SDIO_DCTRL_RWSTOP                   ((uint16_t)0x0200)            /*!<Read wait stop */\r
4564 #define  SDIO_DCTRL_RWMOD                    ((uint16_t)0x0400)            /*!<Read wait mode */\r
4565 #define  SDIO_DCTRL_SDIOEN                   ((uint16_t)0x0800)            /*!<SD I/O enable functions */\r
4566 \r
4567 /******************  Bit definition for SDIO_DCOUNT register  *****************/\r
4568 #define  SDIO_DCOUNT_DATACOUNT               ((uint32_t)0x01FFFFFF)        /*!<Data count value */\r
4569 \r
4570 /******************  Bit definition for SDIO_STA register  ********************/\r
4571 #define  SDIO_STA_CCRCFAIL                   ((uint32_t)0x00000001)        /*!<Command response received (CRC check failed) */\r
4572 #define  SDIO_STA_DCRCFAIL                   ((uint32_t)0x00000002)        /*!<Data block sent/received (CRC check failed) */\r
4573 #define  SDIO_STA_CTIMEOUT                   ((uint32_t)0x00000004)        /*!<Command response timeout */\r
4574 #define  SDIO_STA_DTIMEOUT                   ((uint32_t)0x00000008)        /*!<Data timeout */\r
4575 #define  SDIO_STA_TXUNDERR                   ((uint32_t)0x00000010)        /*!<Transmit FIFO underrun error */\r
4576 #define  SDIO_STA_RXOVERR                    ((uint32_t)0x00000020)        /*!<Received FIFO overrun error */\r
4577 #define  SDIO_STA_CMDREND                    ((uint32_t)0x00000040)        /*!<Command response received (CRC check passed) */\r
4578 #define  SDIO_STA_CMDSENT                    ((uint32_t)0x00000080)        /*!<Command sent (no response required) */\r
4579 #define  SDIO_STA_DATAEND                    ((uint32_t)0x00000100)        /*!<Data end (data counter, SDIDCOUNT, is zero) */\r
4580 #define  SDIO_STA_STBITERR                   ((uint32_t)0x00000200)        /*!<Start bit not detected on all data signals in wide bus mode */\r
4581 #define  SDIO_STA_DBCKEND                    ((uint32_t)0x00000400)        /*!<Data block sent/received (CRC check passed) */\r
4582 #define  SDIO_STA_CMDACT                     ((uint32_t)0x00000800)        /*!<Command transfer in progress */\r
4583 #define  SDIO_STA_TXACT                      ((uint32_t)0x00001000)        /*!<Data transmit in progress */\r
4584 #define  SDIO_STA_RXACT                      ((uint32_t)0x00002000)        /*!<Data receive in progress */\r
4585 #define  SDIO_STA_TXFIFOHE                   ((uint32_t)0x00004000)        /*!<Transmit FIFO Half Empty: at least 8 words can be written into the FIFO */\r
4586 #define  SDIO_STA_RXFIFOHF                   ((uint32_t)0x00008000)        /*!<Receive FIFO Half Full: there are at least 8 words in the FIFO */\r
4587 #define  SDIO_STA_TXFIFOF                    ((uint32_t)0x00010000)        /*!<Transmit FIFO full */\r
4588 #define  SDIO_STA_RXFIFOF                    ((uint32_t)0x00020000)        /*!<Receive FIFO full */\r
4589 #define  SDIO_STA_TXFIFOE                    ((uint32_t)0x00040000)        /*!<Transmit FIFO empty */\r
4590 #define  SDIO_STA_RXFIFOE                    ((uint32_t)0x00080000)        /*!<Receive FIFO empty */\r
4591 #define  SDIO_STA_TXDAVL                     ((uint32_t)0x00100000)        /*!<Data available in transmit FIFO */\r
4592 #define  SDIO_STA_RXDAVL                     ((uint32_t)0x00200000)        /*!<Data available in receive FIFO */\r
4593 #define  SDIO_STA_SDIOIT                     ((uint32_t)0x00400000)        /*!<SDIO interrupt received */\r
4594 #define  SDIO_STA_CEATAEND                   ((uint32_t)0x00800000)        /*!<CE-ATA command completion signal received for CMD61 */\r
4595 \r
4596 /*******************  Bit definition for SDIO_ICR register  *******************/\r
4597 #define  SDIO_ICR_CCRCFAILC                  ((uint32_t)0x00000001)        /*!<CCRCFAIL flag clear bit */\r
4598 #define  SDIO_ICR_DCRCFAILC                  ((uint32_t)0x00000002)        /*!<DCRCFAIL flag clear bit */\r
4599 #define  SDIO_ICR_CTIMEOUTC                  ((uint32_t)0x00000004)        /*!<CTIMEOUT flag clear bit */\r
4600 #define  SDIO_ICR_DTIMEOUTC                  ((uint32_t)0x00000008)        /*!<DTIMEOUT flag clear bit */\r
4601 #define  SDIO_ICR_TXUNDERRC                  ((uint32_t)0x00000010)        /*!<TXUNDERR flag clear bit */\r
4602 #define  SDIO_ICR_RXOVERRC                   ((uint32_t)0x00000020)        /*!<RXOVERR flag clear bit */\r
4603 #define  SDIO_ICR_CMDRENDC                   ((uint32_t)0x00000040)        /*!<CMDREND flag clear bit */\r
4604 #define  SDIO_ICR_CMDSENTC                   ((uint32_t)0x00000080)        /*!<CMDSENT flag clear bit */\r
4605 #define  SDIO_ICR_DATAENDC                   ((uint32_t)0x00000100)        /*!<DATAEND flag clear bit */\r
4606 #define  SDIO_ICR_STBITERRC                  ((uint32_t)0x00000200)        /*!<STBITERR flag clear bit */\r
4607 #define  SDIO_ICR_DBCKENDC                   ((uint32_t)0x00000400)        /*!<DBCKEND flag clear bit */\r
4608 #define  SDIO_ICR_SDIOITC                    ((uint32_t)0x00400000)        /*!<SDIOIT flag clear bit */\r
4609 #define  SDIO_ICR_CEATAENDC                  ((uint32_t)0x00800000)        /*!<CEATAEND flag clear bit */\r
4610 \r
4611 /******************  Bit definition for SDIO_MASK register  *******************/\r
4612 #define  SDIO_MASK_CCRCFAILIE                ((uint32_t)0x00000001)        /*!<Command CRC Fail Interrupt Enable */\r
4613 #define  SDIO_MASK_DCRCFAILIE                ((uint32_t)0x00000002)        /*!<Data CRC Fail Interrupt Enable */\r
4614 #define  SDIO_MASK_CTIMEOUTIE                ((uint32_t)0x00000004)        /*!<Command TimeOut Interrupt Enable */\r
4615 #define  SDIO_MASK_DTIMEOUTIE                ((uint32_t)0x00000008)        /*!<Data TimeOut Interrupt Enable */\r
4616 #define  SDIO_MASK_TXUNDERRIE                ((uint32_t)0x00000010)        /*!<Tx FIFO UnderRun Error Interrupt Enable */\r
4617 #define  SDIO_MASK_RXOVERRIE                 ((uint32_t)0x00000020)        /*!<Rx FIFO OverRun Error Interrupt Enable */\r
4618 #define  SDIO_MASK_CMDRENDIE                 ((uint32_t)0x00000040)        /*!<Command Response Received Interrupt Enable */\r
4619 #define  SDIO_MASK_CMDSENTIE                 ((uint32_t)0x00000080)        /*!<Command Sent Interrupt Enable */\r
4620 #define  SDIO_MASK_DATAENDIE                 ((uint32_t)0x00000100)        /*!<Data End Interrupt Enable */\r
4621 #define  SDIO_MASK_STBITERRIE                ((uint32_t)0x00000200)        /*!<Start Bit Error Interrupt Enable */\r
4622 #define  SDIO_MASK_DBCKENDIE                 ((uint32_t)0x00000400)        /*!<Data Block End Interrupt Enable */\r
4623 #define  SDIO_MASK_CMDACTIE                  ((uint32_t)0x00000800)        /*!<CCommand Acting Interrupt Enable */\r
4624 #define  SDIO_MASK_TXACTIE                   ((uint32_t)0x00001000)        /*!<Data Transmit Acting Interrupt Enable */\r
4625 #define  SDIO_MASK_RXACTIE                   ((uint32_t)0x00002000)        /*!<Data receive acting interrupt enabled */\r
4626 #define  SDIO_MASK_TXFIFOHEIE                ((uint32_t)0x00004000)        /*!<Tx FIFO Half Empty interrupt Enable */\r
4627 #define  SDIO_MASK_RXFIFOHFIE                ((uint32_t)0x00008000)        /*!<Rx FIFO Half Full interrupt Enable */\r
4628 #define  SDIO_MASK_TXFIFOFIE                 ((uint32_t)0x00010000)        /*!<Tx FIFO Full interrupt Enable */\r
4629 #define  SDIO_MASK_RXFIFOFIE                 ((uint32_t)0x00020000)        /*!<Rx FIFO Full interrupt Enable */\r
4630 #define  SDIO_MASK_TXFIFOEIE                 ((uint32_t)0x00040000)        /*!<Tx FIFO Empty interrupt Enable */\r
4631 #define  SDIO_MASK_RXFIFOEIE                 ((uint32_t)0x00080000)        /*!<Rx FIFO Empty interrupt Enable */\r
4632 #define  SDIO_MASK_TXDAVLIE                  ((uint32_t)0x00100000)        /*!<Data available in Tx FIFO interrupt Enable */\r
4633 #define  SDIO_MASK_RXDAVLIE                  ((uint32_t)0x00200000)        /*!<Data available in Rx FIFO interrupt Enable */\r
4634 #define  SDIO_MASK_SDIOITIE                  ((uint32_t)0x00400000)        /*!<SDIO Mode Interrupt Received interrupt Enable */\r
4635 #define  SDIO_MASK_CEATAENDIE                ((uint32_t)0x00800000)        /*!<CE-ATA command completion signal received Interrupt Enable */\r
4636 \r
4637 /*****************  Bit definition for SDIO_FIFOCNT register  *****************/\r
4638 #define  SDIO_FIFOCNT_FIFOCOUNT              ((uint32_t)0x00FFFFFF)        /*!<Remaining number of words to be written to or read from the FIFO */\r
4639 \r
4640 /******************  Bit definition for SDIO_FIFO register  *******************/\r
4641 #define  SDIO_FIFO_FIFODATA                  ((uint32_t)0xFFFFFFFF)        /*!<Receive and transmit FIFO data */\r
4642 \r
4643 /******************************************************************************/\r
4644 /*                                                                            */\r
4645 /*                                   USB                                      */\r
4646 /*                                                                            */\r
4647 /******************************************************************************/\r
4648 \r
4649 /*!<Endpoint-specific registers */\r
4650 /*******************  Bit definition for USB_EP0R register  *******************/\r
4651 #define  USB_EP0R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4652 \r
4653 #define  USB_EP0R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4654 #define  USB_EP0R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4655 #define  USB_EP0R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4656 \r
4657 #define  USB_EP0R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4658 #define  USB_EP0R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4659 #define  USB_EP0R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4660 \r
4661 #define  USB_EP0R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4662 #define  USB_EP0R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4663 #define  USB_EP0R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4664 \r
4665 #define  USB_EP0R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4666 \r
4667 #define  USB_EP0R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4668 #define  USB_EP0R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4669 #define  USB_EP0R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4670 \r
4671 #define  USB_EP0R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4672 #define  USB_EP0R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4673 \r
4674 /*******************  Bit definition for USB_EP1R register  *******************/\r
4675 #define  USB_EP1R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4676 \r
4677 #define  USB_EP1R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4678 #define  USB_EP1R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4679 #define  USB_EP1R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4680 \r
4681 #define  USB_EP1R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4682 #define  USB_EP1R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4683 #define  USB_EP1R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4684 \r
4685 #define  USB_EP1R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4686 #define  USB_EP1R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4687 #define  USB_EP1R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4688 \r
4689 #define  USB_EP1R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4690 \r
4691 #define  USB_EP1R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4692 #define  USB_EP1R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4693 #define  USB_EP1R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4694 \r
4695 #define  USB_EP1R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4696 #define  USB_EP1R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4697 \r
4698 /*******************  Bit definition for USB_EP2R register  *******************/\r
4699 #define  USB_EP2R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4700 \r
4701 #define  USB_EP2R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4702 #define  USB_EP2R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4703 #define  USB_EP2R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4704 \r
4705 #define  USB_EP2R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4706 #define  USB_EP2R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4707 #define  USB_EP2R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4708 \r
4709 #define  USB_EP2R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4710 #define  USB_EP2R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4711 #define  USB_EP2R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4712 \r
4713 #define  USB_EP2R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4714 \r
4715 #define  USB_EP2R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4716 #define  USB_EP2R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4717 #define  USB_EP2R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4718 \r
4719 #define  USB_EP2R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4720 #define  USB_EP2R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4721 \r
4722 /*******************  Bit definition for USB_EP3R register  *******************/\r
4723 #define  USB_EP3R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4724 \r
4725 #define  USB_EP3R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4726 #define  USB_EP3R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4727 #define  USB_EP3R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4728 \r
4729 #define  USB_EP3R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4730 #define  USB_EP3R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4731 #define  USB_EP3R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4732 \r
4733 #define  USB_EP3R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4734 #define  USB_EP3R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4735 #define  USB_EP3R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4736 \r
4737 #define  USB_EP3R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4738 \r
4739 #define  USB_EP3R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4740 #define  USB_EP3R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4741 #define  USB_EP3R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4742 \r
4743 #define  USB_EP3R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4744 #define  USB_EP3R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4745 \r
4746 /*******************  Bit definition for USB_EP4R register  *******************/\r
4747 #define  USB_EP4R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4748 \r
4749 #define  USB_EP4R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4750 #define  USB_EP4R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4751 #define  USB_EP4R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4752 \r
4753 #define  USB_EP4R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4754 #define  USB_EP4R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4755 #define  USB_EP4R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4756 \r
4757 #define  USB_EP4R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4758 #define  USB_EP4R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4759 #define  USB_EP4R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4760 \r
4761 #define  USB_EP4R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4762 \r
4763 #define  USB_EP4R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4764 #define  USB_EP4R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4765 #define  USB_EP4R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4766 \r
4767 #define  USB_EP4R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4768 #define  USB_EP4R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4769 \r
4770 /*******************  Bit definition for USB_EP5R register  *******************/\r
4771 #define  USB_EP5R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4772 \r
4773 #define  USB_EP5R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4774 #define  USB_EP5R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4775 #define  USB_EP5R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4776 \r
4777 #define  USB_EP5R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4778 #define  USB_EP5R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4779 #define  USB_EP5R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4780 \r
4781 #define  USB_EP5R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4782 #define  USB_EP5R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4783 #define  USB_EP5R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4784 \r
4785 #define  USB_EP5R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4786 \r
4787 #define  USB_EP5R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4788 #define  USB_EP5R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4789 #define  USB_EP5R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4790 \r
4791 #define  USB_EP5R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4792 #define  USB_EP5R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4793 \r
4794 /*******************  Bit definition for USB_EP6R register  *******************/\r
4795 #define  USB_EP6R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4796 \r
4797 #define  USB_EP6R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4798 #define  USB_EP6R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4799 #define  USB_EP6R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4800 \r
4801 #define  USB_EP6R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4802 #define  USB_EP6R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4803 #define  USB_EP6R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4804 \r
4805 #define  USB_EP6R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4806 #define  USB_EP6R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4807 #define  USB_EP6R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4808 \r
4809 #define  USB_EP6R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4810 \r
4811 #define  USB_EP6R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4812 #define  USB_EP6R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4813 #define  USB_EP6R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4814 \r
4815 #define  USB_EP6R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4816 #define  USB_EP6R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4817 \r
4818 /*******************  Bit definition for USB_EP7R register  *******************/\r
4819 #define  USB_EP7R_EA                         ((uint16_t)0x000F)            /*!<Endpoint Address */\r
4820 \r
4821 #define  USB_EP7R_STAT_TX                    ((uint16_t)0x0030)            /*!<STAT_TX[1:0] bits (Status bits, for transmission transfers) */\r
4822 #define  USB_EP7R_STAT_TX_0                  ((uint16_t)0x0010)            /*!<Bit 0 */\r
4823 #define  USB_EP7R_STAT_TX_1                  ((uint16_t)0x0020)            /*!<Bit 1 */\r
4824 \r
4825 #define  USB_EP7R_DTOG_TX                    ((uint16_t)0x0040)            /*!<Data Toggle, for transmission transfers */\r
4826 #define  USB_EP7R_CTR_TX                     ((uint16_t)0x0080)            /*!<Correct Transfer for transmission */\r
4827 #define  USB_EP7R_EP_KIND                    ((uint16_t)0x0100)            /*!<Endpoint Kind */\r
4828 \r
4829 #define  USB_EP7R_EP_TYPE                    ((uint16_t)0x0600)            /*!<EP_TYPE[1:0] bits (Endpoint type) */\r
4830 #define  USB_EP7R_EP_TYPE_0                  ((uint16_t)0x0200)            /*!<Bit 0 */\r
4831 #define  USB_EP7R_EP_TYPE_1                  ((uint16_t)0x0400)            /*!<Bit 1 */\r
4832 \r
4833 #define  USB_EP7R_SETUP                      ((uint16_t)0x0800)            /*!<Setup transaction completed */\r
4834 \r
4835 #define  USB_EP7R_STAT_RX                    ((uint16_t)0x3000)            /*!<STAT_RX[1:0] bits (Status bits, for reception transfers) */\r
4836 #define  USB_EP7R_STAT_RX_0                  ((uint16_t)0x1000)            /*!<Bit 0 */\r
4837 #define  USB_EP7R_STAT_RX_1                  ((uint16_t)0x2000)            /*!<Bit 1 */\r
4838 \r
4839 #define  USB_EP7R_DTOG_RX                    ((uint16_t)0x4000)            /*!<Data Toggle, for reception transfers */\r
4840 #define  USB_EP7R_CTR_RX                     ((uint16_t)0x8000)            /*!<Correct Transfer for reception */\r
4841 \r
4842 /*!<Common registers */\r
4843 /*******************  Bit definition for USB_CNTR register  *******************/\r
4844 #define  USB_CNTR_FRES                       ((uint16_t)0x0001)            /*!<Force USB Reset */\r
4845 #define  USB_CNTR_PDWN                       ((uint16_t)0x0002)            /*!<Power down */\r
4846 #define  USB_CNTR_LP_MODE                    ((uint16_t)0x0004)            /*!<Low-power mode */\r
4847 #define  USB_CNTR_FSUSP                      ((uint16_t)0x0008)            /*!<Force suspend */\r
4848 #define  USB_CNTR_RESUME                     ((uint16_t)0x0010)            /*!<Resume request */\r
4849 #define  USB_CNTR_ESOFM                      ((uint16_t)0x0100)            /*!<Expected Start Of Frame Interrupt Mask */\r
4850 #define  USB_CNTR_SOFM                       ((uint16_t)0x0200)            /*!<Start Of Frame Interrupt Mask */\r
4851 #define  USB_CNTR_RESETM                     ((uint16_t)0x0400)            /*!<RESET Interrupt Mask */\r
4852 #define  USB_CNTR_SUSPM                      ((uint16_t)0x0800)            /*!<Suspend mode Interrupt Mask */\r
4853 #define  USB_CNTR_WKUPM                      ((uint16_t)0x1000)            /*!<Wakeup Interrupt Mask */\r
4854 #define  USB_CNTR_ERRM                       ((uint16_t)0x2000)            /*!<Error Interrupt Mask */\r
4855 #define  USB_CNTR_PMAOVRM                    ((uint16_t)0x4000)            /*!<Packet Memory Area Over / Underrun Interrupt Mask */\r
4856 #define  USB_CNTR_CTRM                       ((uint16_t)0x8000)            /*!<Correct Transfer Interrupt Mask */\r
4857 \r
4858 /*******************  Bit definition for USB_ISTR register  *******************/\r
4859 #define  USB_ISTR_EP_ID                      ((uint16_t)0x000F)            /*!<Endpoint Identifier */\r
4860 #define  USB_ISTR_DIR                        ((uint16_t)0x0010)            /*!<Direction of transaction */\r
4861 #define  USB_ISTR_ESOF                       ((uint16_t)0x0100)            /*!<Expected Start Of Frame */\r
4862 #define  USB_ISTR_SOF                        ((uint16_t)0x0200)            /*!<Start Of Frame */\r
4863 #define  USB_ISTR_RESET                      ((uint16_t)0x0400)            /*!<USB RESET request */\r
4864 #define  USB_ISTR_SUSP                       ((uint16_t)0x0800)            /*!<Suspend mode request */\r
4865 #define  USB_ISTR_WKUP                       ((uint16_t)0x1000)            /*!<Wake up */\r
4866 #define  USB_ISTR_ERR                        ((uint16_t)0x2000)            /*!<Error */\r
4867 #define  USB_ISTR_PMAOVR                     ((uint16_t)0x4000)            /*!<Packet Memory Area Over / Underrun */\r
4868 #define  USB_ISTR_CTR                        ((uint16_t)0x8000)            /*!<Correct Transfer */\r
4869 \r
4870 /*******************  Bit definition for USB_FNR register  ********************/\r
4871 #define  USB_FNR_FN                          ((uint16_t)0x07FF)            /*!<Frame Number */\r
4872 #define  USB_FNR_LSOF                        ((uint16_t)0x1800)            /*!<Lost SOF */\r
4873 #define  USB_FNR_LCK                         ((uint16_t)0x2000)            /*!<Locked */\r
4874 #define  USB_FNR_RXDM                        ((uint16_t)0x4000)            /*!<Receive Data - Line Status */\r
4875 #define  USB_FNR_RXDP                        ((uint16_t)0x8000)            /*!<Receive Data + Line Status */\r
4876 \r
4877 /******************  Bit definition for USB_DADDR register  *******************/\r
4878 #define  USB_DADDR_ADD                       ((uint8_t)0x7F)               /*!<ADD[6:0] bits (Device Address) */\r
4879 #define  USB_DADDR_ADD0                      ((uint8_t)0x01)               /*!<Bit 0 */\r
4880 #define  USB_DADDR_ADD1                      ((uint8_t)0x02)               /*!<Bit 1 */\r
4881 #define  USB_DADDR_ADD2                      ((uint8_t)0x04)               /*!<Bit 2 */\r
4882 #define  USB_DADDR_ADD3                      ((uint8_t)0x08)               /*!<Bit 3 */\r
4883 #define  USB_DADDR_ADD4                      ((uint8_t)0x10)               /*!<Bit 4 */\r
4884 #define  USB_DADDR_ADD5                      ((uint8_t)0x20)               /*!<Bit 5 */\r
4885 #define  USB_DADDR_ADD6                      ((uint8_t)0x40)               /*!<Bit 6 */\r
4886 \r
4887 #define  USB_DADDR_EF                        ((uint8_t)0x80)               /*!<Enable Function */\r
4888 \r
4889 /******************  Bit definition for USB_BTABLE register  ******************/\r
4890 #define  USB_BTABLE_BTABLE                   ((uint16_t)0xFFF8)            /*!<Buffer Table */\r
4891 \r
4892 /*!<Buffer descriptor table */\r
4893 /*****************  Bit definition for USB_ADDR0_TX register  *****************/\r
4894 #define  USB_ADDR0_TX_ADDR0_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 0 */\r
4895 \r
4896 /*****************  Bit definition for USB_ADDR1_TX register  *****************/\r
4897 #define  USB_ADDR1_TX_ADDR1_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 1 */\r
4898 \r
4899 /*****************  Bit definition for USB_ADDR2_TX register  *****************/\r
4900 #define  USB_ADDR2_TX_ADDR2_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 2 */\r
4901 \r
4902 /*****************  Bit definition for USB_ADDR3_TX register  *****************/\r
4903 #define  USB_ADDR3_TX_ADDR3_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 3 */\r
4904 \r
4905 /*****************  Bit definition for USB_ADDR4_TX register  *****************/\r
4906 #define  USB_ADDR4_TX_ADDR4_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 4 */\r
4907 \r
4908 /*****************  Bit definition for USB_ADDR5_TX register  *****************/\r
4909 #define  USB_ADDR5_TX_ADDR5_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 5 */\r
4910 \r
4911 /*****************  Bit definition for USB_ADDR6_TX register  *****************/\r
4912 #define  USB_ADDR6_TX_ADDR6_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 6 */\r
4913 \r
4914 /*****************  Bit definition for USB_ADDR7_TX register  *****************/\r
4915 #define  USB_ADDR7_TX_ADDR7_TX               ((uint16_t)0xFFFE)            /*!<Transmission Buffer Address 7 */\r
4916 \r
4917 /*----------------------------------------------------------------------------*/\r
4918 \r
4919 /*****************  Bit definition for USB_COUNT0_TX register  ****************/\r
4920 #define  USB_COUNT0_TX_COUNT0_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 0 */\r
4921 \r
4922 /*****************  Bit definition for USB_COUNT1_TX register  ****************/\r
4923 #define  USB_COUNT1_TX_COUNT1_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 1 */\r
4924 \r
4925 /*****************  Bit definition for USB_COUNT2_TX register  ****************/\r
4926 #define  USB_COUNT2_TX_COUNT2_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 2 */\r
4927 \r
4928 /*****************  Bit definition for USB_COUNT3_TX register  ****************/\r
4929 #define  USB_COUNT3_TX_COUNT3_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 3 */\r
4930 \r
4931 /*****************  Bit definition for USB_COUNT4_TX register  ****************/\r
4932 #define  USB_COUNT4_TX_COUNT4_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 4 */\r
4933 \r
4934 /*****************  Bit definition for USB_COUNT5_TX register  ****************/\r
4935 #define  USB_COUNT5_TX_COUNT5_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 5 */\r
4936 \r
4937 /*****************  Bit definition for USB_COUNT6_TX register  ****************/\r
4938 #define  USB_COUNT6_TX_COUNT6_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 6 */\r
4939 \r
4940 /*****************  Bit definition for USB_COUNT7_TX register  ****************/\r
4941 #define  USB_COUNT7_TX_COUNT7_TX             ((uint16_t)0x03FF)            /*!<Transmission Byte Count 7 */\r
4942 \r
4943 /*----------------------------------------------------------------------------*/\r
4944 \r
4945 /****************  Bit definition for USB_COUNT0_TX_0 register  ***************/\r
4946 #define  USB_COUNT0_TX_0_COUNT0_TX_0         ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 0 (low) */\r
4947 \r
4948 /****************  Bit definition for USB_COUNT0_TX_1 register  ***************/\r
4949 #define  USB_COUNT0_TX_1_COUNT0_TX_1         ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 0 (high) */\r
4950 \r
4951 /****************  Bit definition for USB_COUNT1_TX_0 register  ***************/\r
4952 #define  USB_COUNT1_TX_0_COUNT1_TX_0          ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 1 (low) */\r
4953 \r
4954 /****************  Bit definition for USB_COUNT1_TX_1 register  ***************/\r
4955 #define  USB_COUNT1_TX_1_COUNT1_TX_1          ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 1 (high) */\r
4956 \r
4957 /****************  Bit definition for USB_COUNT2_TX_0 register  ***************/\r
4958 #define  USB_COUNT2_TX_0_COUNT2_TX_0         ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 2 (low) */\r
4959 \r
4960 /****************  Bit definition for USB_COUNT2_TX_1 register  ***************/\r
4961 #define  USB_COUNT2_TX_1_COUNT2_TX_1         ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 2 (high) */\r
4962 \r
4963 /****************  Bit definition for USB_COUNT3_TX_0 register  ***************/\r
4964 #define  USB_COUNT3_TX_0_COUNT3_TX_0         ((uint16_t)0x000003FF)        /*!<Transmission Byte Count 3 (low) */\r
4965 \r
4966 /****************  Bit definition for USB_COUNT3_TX_1 register  ***************/\r
4967 #define  USB_COUNT3_TX_1_COUNT3_TX_1         ((uint16_t)0x03FF0000)        /*!<Transmission Byte Count 3 (high) */\r
4968 \r
4969 /****************  Bit definition for USB_COUNT4_TX_0 register  ***************/\r
4970 #define  USB_COUNT4_TX_0_COUNT4_TX_0         ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 4 (low) */\r
4971 \r
4972 /****************  Bit definition for USB_COUNT4_TX_1 register  ***************/\r
4973 #define  USB_COUNT4_TX_1_COUNT4_TX_1         ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 4 (high) */\r
4974 \r
4975 /****************  Bit definition for USB_COUNT5_TX_0 register  ***************/\r
4976 #define  USB_COUNT5_TX_0_COUNT5_TX_0         ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 5 (low) */\r
4977 \r
4978 /****************  Bit definition for USB_COUNT5_TX_1 register  ***************/\r
4979 #define  USB_COUNT5_TX_1_COUNT5_TX_1         ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 5 (high) */\r
4980 \r
4981 /****************  Bit definition for USB_COUNT6_TX_0 register  ***************/\r
4982 #define  USB_COUNT6_TX_0_COUNT6_TX_0         ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 6 (low) */\r
4983 \r
4984 /****************  Bit definition for USB_COUNT6_TX_1 register  ***************/\r
4985 #define  USB_COUNT6_TX_1_COUNT6_TX_1         ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 6 (high) */\r
4986 \r
4987 /****************  Bit definition for USB_COUNT7_TX_0 register  ***************/\r
4988 #define  USB_COUNT7_TX_0_COUNT7_TX_0         ((uint32_t)0x000003FF)        /*!<Transmission Byte Count 7 (low) */\r
4989 \r
4990 /****************  Bit definition for USB_COUNT7_TX_1 register  ***************/\r
4991 #define  USB_COUNT7_TX_1_COUNT7_TX_1         ((uint32_t)0x03FF0000)        /*!<Transmission Byte Count 7 (high) */\r
4992 \r
4993 /*----------------------------------------------------------------------------*/\r
4994 \r
4995 /*****************  Bit definition for USB_ADDR0_RX register  *****************/\r
4996 #define  USB_ADDR0_RX_ADDR0_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 0 */\r
4997 \r
4998 /*****************  Bit definition for USB_ADDR1_RX register  *****************/\r
4999 #define  USB_ADDR1_RX_ADDR1_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 1 */\r
5000 \r
5001 /*****************  Bit definition for USB_ADDR2_RX register  *****************/\r
5002 #define  USB_ADDR2_RX_ADDR2_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 2 */\r
5003 \r
5004 /*****************  Bit definition for USB_ADDR3_RX register  *****************/\r
5005 #define  USB_ADDR3_RX_ADDR3_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 3 */\r
5006 \r
5007 /*****************  Bit definition for USB_ADDR4_RX register  *****************/\r
5008 #define  USB_ADDR4_RX_ADDR4_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 4 */\r
5009 \r
5010 /*****************  Bit definition for USB_ADDR5_RX register  *****************/\r
5011 #define  USB_ADDR5_RX_ADDR5_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 5 */\r
5012 \r
5013 /*****************  Bit definition for USB_ADDR6_RX register  *****************/\r
5014 #define  USB_ADDR6_RX_ADDR6_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 6 */\r
5015 \r
5016 /*****************  Bit definition for USB_ADDR7_RX register  *****************/\r
5017 #define  USB_ADDR7_RX_ADDR7_RX               ((uint16_t)0xFFFE)            /*!<Reception Buffer Address 7 */\r
5018 \r
5019 /*----------------------------------------------------------------------------*/\r
5020 \r
5021 /*****************  Bit definition for USB_COUNT0_RX register  ****************/\r
5022 #define  USB_COUNT0_RX_COUNT0_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5023 \r
5024 #define  USB_COUNT0_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5025 #define  USB_COUNT0_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5026 #define  USB_COUNT0_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5027 #define  USB_COUNT0_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5028 #define  USB_COUNT0_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5029 #define  USB_COUNT0_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5030 \r
5031 #define  USB_COUNT0_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5032 \r
5033 /*****************  Bit definition for USB_COUNT1_RX register  ****************/\r
5034 #define  USB_COUNT1_RX_COUNT1_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5035 \r
5036 #define  USB_COUNT1_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5037 #define  USB_COUNT1_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5038 #define  USB_COUNT1_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5039 #define  USB_COUNT1_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5040 #define  USB_COUNT1_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5041 #define  USB_COUNT1_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5042 \r
5043 #define  USB_COUNT1_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5044 \r
5045 /*****************  Bit definition for USB_COUNT2_RX register  ****************/\r
5046 #define  USB_COUNT2_RX_COUNT2_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5047 \r
5048 #define  USB_COUNT2_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5049 #define  USB_COUNT2_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5050 #define  USB_COUNT2_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5051 #define  USB_COUNT2_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5052 #define  USB_COUNT2_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5053 #define  USB_COUNT2_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5054 \r
5055 #define  USB_COUNT2_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5056 \r
5057 /*****************  Bit definition for USB_COUNT3_RX register  ****************/\r
5058 #define  USB_COUNT3_RX_COUNT3_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5059 \r
5060 #define  USB_COUNT3_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5061 #define  USB_COUNT3_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5062 #define  USB_COUNT3_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5063 #define  USB_COUNT3_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5064 #define  USB_COUNT3_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5065 #define  USB_COUNT3_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5066 \r
5067 #define  USB_COUNT3_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5068 \r
5069 /*****************  Bit definition for USB_COUNT4_RX register  ****************/\r
5070 #define  USB_COUNT4_RX_COUNT4_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5071 \r
5072 #define  USB_COUNT4_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5073 #define  USB_COUNT4_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5074 #define  USB_COUNT4_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5075 #define  USB_COUNT4_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5076 #define  USB_COUNT4_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5077 #define  USB_COUNT4_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5078 \r
5079 #define  USB_COUNT4_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5080 \r
5081 /*****************  Bit definition for USB_COUNT5_RX register  ****************/\r
5082 #define  USB_COUNT5_RX_COUNT5_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5083 \r
5084 #define  USB_COUNT5_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5085 #define  USB_COUNT5_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5086 #define  USB_COUNT5_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5087 #define  USB_COUNT5_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5088 #define  USB_COUNT5_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5089 #define  USB_COUNT5_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5090 \r
5091 #define  USB_COUNT5_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5092 \r
5093 /*****************  Bit definition for USB_COUNT6_RX register  ****************/\r
5094 #define  USB_COUNT6_RX_COUNT6_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5095 \r
5096 #define  USB_COUNT6_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5097 #define  USB_COUNT6_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5098 #define  USB_COUNT6_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5099 #define  USB_COUNT6_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5100 #define  USB_COUNT6_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5101 #define  USB_COUNT6_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5102 \r
5103 #define  USB_COUNT6_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5104 \r
5105 /*****************  Bit definition for USB_COUNT7_RX register  ****************/\r
5106 #define  USB_COUNT7_RX_COUNT7_RX             ((uint16_t)0x03FF)            /*!<Reception Byte Count */\r
5107 \r
5108 #define  USB_COUNT7_RX_NUM_BLOCK             ((uint16_t)0x7C00)            /*!<NUM_BLOCK[4:0] bits (Number of blocks) */\r
5109 #define  USB_COUNT7_RX_NUM_BLOCK_0           ((uint16_t)0x0400)            /*!<Bit 0 */\r
5110 #define  USB_COUNT7_RX_NUM_BLOCK_1           ((uint16_t)0x0800)            /*!<Bit 1 */\r
5111 #define  USB_COUNT7_RX_NUM_BLOCK_2           ((uint16_t)0x1000)            /*!<Bit 2 */\r
5112 #define  USB_COUNT7_RX_NUM_BLOCK_3           ((uint16_t)0x2000)            /*!<Bit 3 */\r
5113 #define  USB_COUNT7_RX_NUM_BLOCK_4           ((uint16_t)0x4000)            /*!<Bit 4 */\r
5114 \r
5115 #define  USB_COUNT7_RX_BLSIZE                ((uint16_t)0x8000)            /*!<BLock SIZE */\r
5116 \r
5117 /*----------------------------------------------------------------------------*/\r
5118 \r
5119 /****************  Bit definition for USB_COUNT0_RX_0 register  ***************/\r
5120 #define  USB_COUNT0_RX_0_COUNT0_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5121 \r
5122 #define  USB_COUNT0_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5123 #define  USB_COUNT0_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5124 #define  USB_COUNT0_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5125 #define  USB_COUNT0_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5126 #define  USB_COUNT0_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5127 #define  USB_COUNT0_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5128 \r
5129 #define  USB_COUNT0_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5130 \r
5131 /****************  Bit definition for USB_COUNT0_RX_1 register  ***************/\r
5132 #define  USB_COUNT0_RX_1_COUNT0_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5133 \r
5134 #define  USB_COUNT0_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5135 #define  USB_COUNT0_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 1 */\r
5136 #define  USB_COUNT0_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5137 #define  USB_COUNT0_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5138 #define  USB_COUNT0_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5139 #define  USB_COUNT0_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5140 \r
5141 #define  USB_COUNT0_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5142 \r
5143 /****************  Bit definition for USB_COUNT1_RX_0 register  ***************/\r
5144 #define  USB_COUNT1_RX_0_COUNT1_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5145 \r
5146 #define  USB_COUNT1_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5147 #define  USB_COUNT1_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5148 #define  USB_COUNT1_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5149 #define  USB_COUNT1_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5150 #define  USB_COUNT1_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5151 #define  USB_COUNT1_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5152 \r
5153 #define  USB_COUNT1_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5154 \r
5155 /****************  Bit definition for USB_COUNT1_RX_1 register  ***************/\r
5156 #define  USB_COUNT1_RX_1_COUNT1_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5157 \r
5158 #define  USB_COUNT1_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5159 #define  USB_COUNT1_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5160 #define  USB_COUNT1_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5161 #define  USB_COUNT1_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5162 #define  USB_COUNT1_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5163 #define  USB_COUNT1_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5164 \r
5165 #define  USB_COUNT1_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5166 \r
5167 /****************  Bit definition for USB_COUNT2_RX_0 register  ***************/\r
5168 #define  USB_COUNT2_RX_0_COUNT2_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5169 \r
5170 #define  USB_COUNT2_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5171 #define  USB_COUNT2_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5172 #define  USB_COUNT2_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5173 #define  USB_COUNT2_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5174 #define  USB_COUNT2_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5175 #define  USB_COUNT2_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5176 \r
5177 #define  USB_COUNT2_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5178 \r
5179 /****************  Bit definition for USB_COUNT2_RX_1 register  ***************/\r
5180 #define  USB_COUNT2_RX_1_COUNT2_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5181 \r
5182 #define  USB_COUNT2_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5183 #define  USB_COUNT2_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5184 #define  USB_COUNT2_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5185 #define  USB_COUNT2_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5186 #define  USB_COUNT2_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5187 #define  USB_COUNT2_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5188 \r
5189 #define  USB_COUNT2_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5190 \r
5191 /****************  Bit definition for USB_COUNT3_RX_0 register  ***************/\r
5192 #define  USB_COUNT3_RX_0_COUNT3_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5193 \r
5194 #define  USB_COUNT3_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5195 #define  USB_COUNT3_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5196 #define  USB_COUNT3_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5197 #define  USB_COUNT3_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5198 #define  USB_COUNT3_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5199 #define  USB_COUNT3_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5200 \r
5201 #define  USB_COUNT3_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5202 \r
5203 /****************  Bit definition for USB_COUNT3_RX_1 register  ***************/\r
5204 #define  USB_COUNT3_RX_1_COUNT3_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5205 \r
5206 #define  USB_COUNT3_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5207 #define  USB_COUNT3_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5208 #define  USB_COUNT3_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5209 #define  USB_COUNT3_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5210 #define  USB_COUNT3_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5211 #define  USB_COUNT3_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5212 \r
5213 #define  USB_COUNT3_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5214 \r
5215 /****************  Bit definition for USB_COUNT4_RX_0 register  ***************/\r
5216 #define  USB_COUNT4_RX_0_COUNT4_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5217 \r
5218 #define  USB_COUNT4_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5219 #define  USB_COUNT4_RX_0_NUM_BLOCK_0_0      ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5220 #define  USB_COUNT4_RX_0_NUM_BLOCK_0_1      ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5221 #define  USB_COUNT4_RX_0_NUM_BLOCK_0_2      ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5222 #define  USB_COUNT4_RX_0_NUM_BLOCK_0_3      ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5223 #define  USB_COUNT4_RX_0_NUM_BLOCK_0_4      ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5224 \r
5225 #define  USB_COUNT4_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5226 \r
5227 /****************  Bit definition for USB_COUNT4_RX_1 register  ***************/\r
5228 #define  USB_COUNT4_RX_1_COUNT4_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5229 \r
5230 #define  USB_COUNT4_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5231 #define  USB_COUNT4_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5232 #define  USB_COUNT4_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5233 #define  USB_COUNT4_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5234 #define  USB_COUNT4_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5235 #define  USB_COUNT4_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5236 \r
5237 #define  USB_COUNT4_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5238 \r
5239 /****************  Bit definition for USB_COUNT5_RX_0 register  ***************/\r
5240 #define  USB_COUNT5_RX_0_COUNT5_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5241 \r
5242 #define  USB_COUNT5_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5243 #define  USB_COUNT5_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5244 #define  USB_COUNT5_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5245 #define  USB_COUNT5_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5246 #define  USB_COUNT5_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5247 #define  USB_COUNT5_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5248 \r
5249 #define  USB_COUNT5_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5250 \r
5251 /****************  Bit definition for USB_COUNT5_RX_1 register  ***************/\r
5252 #define  USB_COUNT5_RX_1_COUNT5_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5253 \r
5254 #define  USB_COUNT5_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5255 #define  USB_COUNT5_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5256 #define  USB_COUNT5_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5257 #define  USB_COUNT5_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5258 #define  USB_COUNT5_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5259 #define  USB_COUNT5_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5260 \r
5261 #define  USB_COUNT5_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5262 \r
5263 /***************  Bit definition for USB_COUNT6_RX_0  register  ***************/\r
5264 #define  USB_COUNT6_RX_0_COUNT6_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5265 \r
5266 #define  USB_COUNT6_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5267 #define  USB_COUNT6_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5268 #define  USB_COUNT6_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5269 #define  USB_COUNT6_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5270 #define  USB_COUNT6_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5271 #define  USB_COUNT6_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5272 \r
5273 #define  USB_COUNT6_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5274 \r
5275 /****************  Bit definition for USB_COUNT6_RX_1 register  ***************/\r
5276 #define  USB_COUNT6_RX_1_COUNT6_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5277 \r
5278 #define  USB_COUNT6_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5279 #define  USB_COUNT6_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5280 #define  USB_COUNT6_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5281 #define  USB_COUNT6_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5282 #define  USB_COUNT6_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5283 #define  USB_COUNT6_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5284 \r
5285 #define  USB_COUNT6_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5286 \r
5287 /***************  Bit definition for USB_COUNT7_RX_0 register  ****************/\r
5288 #define  USB_COUNT7_RX_0_COUNT7_RX_0         ((uint32_t)0x000003FF)        /*!<Reception Byte Count (low) */\r
5289 \r
5290 #define  USB_COUNT7_RX_0_NUM_BLOCK_0         ((uint32_t)0x00007C00)        /*!<NUM_BLOCK_0[4:0] bits (Number of blocks) (low) */\r
5291 #define  USB_COUNT7_RX_0_NUM_BLOCK_0_0       ((uint32_t)0x00000400)        /*!<Bit 0 */\r
5292 #define  USB_COUNT7_RX_0_NUM_BLOCK_0_1       ((uint32_t)0x00000800)        /*!<Bit 1 */\r
5293 #define  USB_COUNT7_RX_0_NUM_BLOCK_0_2       ((uint32_t)0x00001000)        /*!<Bit 2 */\r
5294 #define  USB_COUNT7_RX_0_NUM_BLOCK_0_3       ((uint32_t)0x00002000)        /*!<Bit 3 */\r
5295 #define  USB_COUNT7_RX_0_NUM_BLOCK_0_4       ((uint32_t)0x00004000)        /*!<Bit 4 */\r
5296 \r
5297 #define  USB_COUNT7_RX_0_BLSIZE_0            ((uint32_t)0x00008000)        /*!<BLock SIZE (low) */\r
5298 \r
5299 /***************  Bit definition for USB_COUNT7_RX_1 register  ****************/\r
5300 #define  USB_COUNT7_RX_1_COUNT7_RX_1         ((uint32_t)0x03FF0000)        /*!<Reception Byte Count (high) */\r
5301 \r
5302 #define  USB_COUNT7_RX_1_NUM_BLOCK_1         ((uint32_t)0x7C000000)        /*!<NUM_BLOCK_1[4:0] bits (Number of blocks) (high) */\r
5303 #define  USB_COUNT7_RX_1_NUM_BLOCK_1_0       ((uint32_t)0x04000000)        /*!<Bit 0 */\r
5304 #define  USB_COUNT7_RX_1_NUM_BLOCK_1_1       ((uint32_t)0x08000000)        /*!<Bit 1 */\r
5305 #define  USB_COUNT7_RX_1_NUM_BLOCK_1_2       ((uint32_t)0x10000000)        /*!<Bit 2 */\r
5306 #define  USB_COUNT7_RX_1_NUM_BLOCK_1_3       ((uint32_t)0x20000000)        /*!<Bit 3 */\r
5307 #define  USB_COUNT7_RX_1_NUM_BLOCK_1_4       ((uint32_t)0x40000000)        /*!<Bit 4 */\r
5308 \r
5309 #define  USB_COUNT7_RX_1_BLSIZE_1            ((uint32_t)0x80000000)        /*!<BLock SIZE (high) */\r
5310 \r
5311 /******************************************************************************/\r
5312 /*                                                                            */\r
5313 /*                         Controller Area Network                            */\r
5314 /*                                                                            */\r
5315 /******************************************************************************/\r
5316 \r
5317 /*!<CAN control and status registers */\r
5318 /*******************  Bit definition for CAN_MCR register  ********************/\r
5319 #define  CAN_MCR_INRQ                        ((uint16_t)0x0001)            /*!<Initialization Request */\r
5320 #define  CAN_MCR_SLEEP                       ((uint16_t)0x0002)            /*!<Sleep Mode Request */\r
5321 #define  CAN_MCR_TXFP                        ((uint16_t)0x0004)            /*!<Transmit FIFO Priority */\r
5322 #define  CAN_MCR_RFLM                        ((uint16_t)0x0008)            /*!<Receive FIFO Locked Mode */\r
5323 #define  CAN_MCR_NART                        ((uint16_t)0x0010)            /*!<No Automatic Retransmission */\r
5324 #define  CAN_MCR_AWUM                        ((uint16_t)0x0020)            /*!<Automatic Wakeup Mode */\r
5325 #define  CAN_MCR_ABOM                        ((uint16_t)0x0040)            /*!<Automatic Bus-Off Management */\r
5326 #define  CAN_MCR_TTCM                        ((uint16_t)0x0080)            /*!<Time Triggered Communication Mode */\r
5327 #define  CAN_MCR_RESET                       ((uint16_t)0x8000)            /*!<bxCAN software master reset */\r
5328 \r
5329 /*******************  Bit definition for CAN_MSR register  ********************/\r
5330 #define  CAN_MSR_INAK                        ((uint16_t)0x0001)            /*!<Initialization Acknowledge */\r
5331 #define  CAN_MSR_SLAK                        ((uint16_t)0x0002)            /*!<Sleep Acknowledge */\r
5332 #define  CAN_MSR_ERRI                        ((uint16_t)0x0004)            /*!<Error Interrupt */\r
5333 #define  CAN_MSR_WKUI                        ((uint16_t)0x0008)            /*!<Wakeup Interrupt */\r
5334 #define  CAN_MSR_SLAKI                       ((uint16_t)0x0010)            /*!<Sleep Acknowledge Interrupt */\r
5335 #define  CAN_MSR_TXM                         ((uint16_t)0x0100)            /*!<Transmit Mode */\r
5336 #define  CAN_MSR_RXM                         ((uint16_t)0x0200)            /*!<Receive Mode */\r
5337 #define  CAN_MSR_SAMP                        ((uint16_t)0x0400)            /*!<Last Sample Point */\r
5338 #define  CAN_MSR_RX                          ((uint16_t)0x0800)            /*!<CAN Rx Signal */\r
5339 \r
5340 /*******************  Bit definition for CAN_TSR register  ********************/\r
5341 #define  CAN_TSR_RQCP0                       ((uint32_t)0x00000001)        /*!<Request Completed Mailbox0 */\r
5342 #define  CAN_TSR_TXOK0                       ((uint32_t)0x00000002)        /*!<Transmission OK of Mailbox0 */\r
5343 #define  CAN_TSR_ALST0                       ((uint32_t)0x00000004)        /*!<Arbitration Lost for Mailbox0 */\r
5344 #define  CAN_TSR_TERR0                       ((uint32_t)0x00000008)        /*!<Transmission Error of Mailbox0 */\r
5345 #define  CAN_TSR_ABRQ0                       ((uint32_t)0x00000080)        /*!<Abort Request for Mailbox0 */\r
5346 #define  CAN_TSR_RQCP1                       ((uint32_t)0x00000100)        /*!<Request Completed Mailbox1 */\r
5347 #define  CAN_TSR_TXOK1                       ((uint32_t)0x00000200)        /*!<Transmission OK of Mailbox1 */\r
5348 #define  CAN_TSR_ALST1                       ((uint32_t)0x00000400)        /*!<Arbitration Lost for Mailbox1 */\r
5349 #define  CAN_TSR_TERR1                       ((uint32_t)0x00000800)        /*!<Transmission Error of Mailbox1 */\r
5350 #define  CAN_TSR_ABRQ1                       ((uint32_t)0x00008000)        /*!<Abort Request for Mailbox 1 */\r
5351 #define  CAN_TSR_RQCP2                       ((uint32_t)0x00010000)        /*!<Request Completed Mailbox2 */\r
5352 #define  CAN_TSR_TXOK2                       ((uint32_t)0x00020000)        /*!<Transmission OK of Mailbox 2 */\r
5353 #define  CAN_TSR_ALST2                       ((uint32_t)0x00040000)        /*!<Arbitration Lost for mailbox 2 */\r
5354 #define  CAN_TSR_TERR2                       ((uint32_t)0x00080000)        /*!<Transmission Error of Mailbox 2 */\r
5355 #define  CAN_TSR_ABRQ2                       ((uint32_t)0x00800000)        /*!<Abort Request for Mailbox 2 */\r
5356 #define  CAN_TSR_CODE                        ((uint32_t)0x03000000)        /*!<Mailbox Code */\r
5357 \r
5358 #define  CAN_TSR_TME                         ((uint32_t)0x1C000000)        /*!<TME[2:0] bits */\r
5359 #define  CAN_TSR_TME0                        ((uint32_t)0x04000000)        /*!<Transmit Mailbox 0 Empty */\r
5360 #define  CAN_TSR_TME1                        ((uint32_t)0x08000000)        /*!<Transmit Mailbox 1 Empty */\r
5361 #define  CAN_TSR_TME2                        ((uint32_t)0x10000000)        /*!<Transmit Mailbox 2 Empty */\r
5362 \r
5363 #define  CAN_TSR_LOW                         ((uint32_t)0xE0000000)        /*!<LOW[2:0] bits */\r
5364 #define  CAN_TSR_LOW0                        ((uint32_t)0x20000000)        /*!<Lowest Priority Flag for Mailbox 0 */\r
5365 #define  CAN_TSR_LOW1                        ((uint32_t)0x40000000)        /*!<Lowest Priority Flag for Mailbox 1 */\r
5366 #define  CAN_TSR_LOW2                        ((uint32_t)0x80000000)        /*!<Lowest Priority Flag for Mailbox 2 */\r
5367 \r
5368 /*******************  Bit definition for CAN_RF0R register  *******************/\r
5369 #define  CAN_RF0R_FMP0                       ((uint8_t)0x03)               /*!<FIFO 0 Message Pending */\r
5370 #define  CAN_RF0R_FULL0                      ((uint8_t)0x08)               /*!<FIFO 0 Full */\r
5371 #define  CAN_RF0R_FOVR0                      ((uint8_t)0x10)               /*!<FIFO 0 Overrun */\r
5372 #define  CAN_RF0R_RFOM0                      ((uint8_t)0x20)               /*!<Release FIFO 0 Output Mailbox */\r
5373 \r
5374 /*******************  Bit definition for CAN_RF1R register  *******************/\r
5375 #define  CAN_RF1R_FMP1                       ((uint8_t)0x03)               /*!<FIFO 1 Message Pending */\r
5376 #define  CAN_RF1R_FULL1                      ((uint8_t)0x08)               /*!<FIFO 1 Full */\r
5377 #define  CAN_RF1R_FOVR1                      ((uint8_t)0x10)               /*!<FIFO 1 Overrun */\r
5378 #define  CAN_RF1R_RFOM1                      ((uint8_t)0x20)               /*!<Release FIFO 1 Output Mailbox */\r
5379 \r
5380 /********************  Bit definition for CAN_IER register  *******************/\r
5381 #define  CAN_IER_TMEIE                       ((uint32_t)0x00000001)        /*!<Transmit Mailbox Empty Interrupt Enable */\r
5382 #define  CAN_IER_FMPIE0                      ((uint32_t)0x00000002)        /*!<FIFO Message Pending Interrupt Enable */\r
5383 #define  CAN_IER_FFIE0                       ((uint32_t)0x00000004)        /*!<FIFO Full Interrupt Enable */\r
5384 #define  CAN_IER_FOVIE0                      ((uint32_t)0x00000008)        /*!<FIFO Overrun Interrupt Enable */\r
5385 #define  CAN_IER_FMPIE1                      ((uint32_t)0x00000010)        /*!<FIFO Message Pending Interrupt Enable */\r
5386 #define  CAN_IER_FFIE1                       ((uint32_t)0x00000020)        /*!<FIFO Full Interrupt Enable */\r
5387 #define  CAN_IER_FOVIE1                      ((uint32_t)0x00000040)        /*!<FIFO Overrun Interrupt Enable */\r
5388 #define  CAN_IER_EWGIE                       ((uint32_t)0x00000100)        /*!<Error Warning Interrupt Enable */\r
5389 #define  CAN_IER_EPVIE                       ((uint32_t)0x00000200)        /*!<Error Passive Interrupt Enable */\r
5390 #define  CAN_IER_BOFIE                       ((uint32_t)0x00000400)        /*!<Bus-Off Interrupt Enable */\r
5391 #define  CAN_IER_LECIE                       ((uint32_t)0x00000800)        /*!<Last Error Code Interrupt Enable */\r
5392 #define  CAN_IER_ERRIE                       ((uint32_t)0x00008000)        /*!<Error Interrupt Enable */\r
5393 #define  CAN_IER_WKUIE                       ((uint32_t)0x00010000)        /*!<Wakeup Interrupt Enable */\r
5394 #define  CAN_IER_SLKIE                       ((uint32_t)0x00020000)        /*!<Sleep Interrupt Enable */\r
5395 \r
5396 /********************  Bit definition for CAN_ESR register  *******************/\r
5397 #define  CAN_ESR_EWGF                        ((uint32_t)0x00000001)        /*!<Error Warning Flag */\r
5398 #define  CAN_ESR_EPVF                        ((uint32_t)0x00000002)        /*!<Error Passive Flag */\r
5399 #define  CAN_ESR_BOFF                        ((uint32_t)0x00000004)        /*!<Bus-Off Flag */\r
5400 \r
5401 #define  CAN_ESR_LEC                         ((uint32_t)0x00000070)        /*!<LEC[2:0] bits (Last Error Code) */\r
5402 #define  CAN_ESR_LEC_0                       ((uint32_t)0x00000010)        /*!<Bit 0 */\r
5403 #define  CAN_ESR_LEC_1                       ((uint32_t)0x00000020)        /*!<Bit 1 */\r
5404 #define  CAN_ESR_LEC_2                       ((uint32_t)0x00000040)        /*!<Bit 2 */\r
5405 \r
5406 #define  CAN_ESR_TEC                         ((uint32_t)0x00FF0000)        /*!<Least significant byte of the 9-bit Transmit Error Counter */\r
5407 #define  CAN_ESR_REC                         ((uint32_t)0xFF000000)        /*!<Receive Error Counter */\r
5408 \r
5409 /*******************  Bit definition for CAN_BTR register  ********************/\r
5410 #define  CAN_BTR_BRP                         ((uint32_t)0x000003FF)        /*!<Baud Rate Prescaler */\r
5411 #define  CAN_BTR_TS1                         ((uint32_t)0x000F0000)        /*!<Time Segment 1 */\r
5412 #define  CAN_BTR_TS2                         ((uint32_t)0x00700000)        /*!<Time Segment 2 */\r
5413 #define  CAN_BTR_SJW                         ((uint32_t)0x03000000)        /*!<Resynchronization Jump Width */\r
5414 #define  CAN_BTR_LBKM                        ((uint32_t)0x40000000)        /*!<Loop Back Mode (Debug) */\r
5415 #define  CAN_BTR_SILM                        ((uint32_t)0x80000000)        /*!<Silent Mode */\r
5416 \r
5417 /*!<Mailbox registers */\r
5418 /******************  Bit definition for CAN_TI0R register  ********************/\r
5419 #define  CAN_TI0R_TXRQ                       ((uint32_t)0x00000001)        /*!<Transmit Mailbox Request */\r
5420 #define  CAN_TI0R_RTR                        ((uint32_t)0x00000002)        /*!<Remote Transmission Request */\r
5421 #define  CAN_TI0R_IDE                        ((uint32_t)0x00000004)        /*!<Identifier Extension */\r
5422 #define  CAN_TI0R_EXID                       ((uint32_t)0x001FFFF8)        /*!<Extended Identifier */\r
5423 #define  CAN_TI0R_STID                       ((uint32_t)0xFFE00000)        /*!<Standard Identifier or Extended Identifier */\r
5424 \r
5425 /******************  Bit definition for CAN_TDT0R register  *******************/\r
5426 #define  CAN_TDT0R_DLC                       ((uint32_t)0x0000000F)        /*!<Data Length Code */\r
5427 #define  CAN_TDT0R_TGT                       ((uint32_t)0x00000100)        /*!<Transmit Global Time */\r
5428 #define  CAN_TDT0R_TIME                      ((uint32_t)0xFFFF0000)        /*!<Message Time Stamp */\r
5429 \r
5430 /******************  Bit definition for CAN_TDL0R register  *******************/\r
5431 #define  CAN_TDL0R_DATA0                     ((uint32_t)0x000000FF)        /*!<Data byte 0 */\r
5432 #define  CAN_TDL0R_DATA1                     ((uint32_t)0x0000FF00)        /*!<Data byte 1 */\r
5433 #define  CAN_TDL0R_DATA2                     ((uint32_t)0x00FF0000)        /*!<Data byte 2 */\r
5434 #define  CAN_TDL0R_DATA3                     ((uint32_t)0xFF000000)        /*!<Data byte 3 */\r
5435 \r
5436 /******************  Bit definition for CAN_TDH0R register  *******************/\r
5437 #define  CAN_TDH0R_DATA4                     ((uint32_t)0x000000FF)        /*!<Data byte 4 */\r
5438 #define  CAN_TDH0R_DATA5                     ((uint32_t)0x0000FF00)        /*!<Data byte 5 */\r
5439 #define  CAN_TDH0R_DATA6                     ((uint32_t)0x00FF0000)        /*!<Data byte 6 */\r
5440 #define  CAN_TDH0R_DATA7                     ((uint32_t)0xFF000000)        /*!<Data byte 7 */\r
5441 \r
5442 /*******************  Bit definition for CAN_TI1R register  *******************/\r
5443 #define  CAN_TI1R_TXRQ                       ((uint32_t)0x00000001)        /*!<Transmit Mailbox Request */\r
5444 #define  CAN_TI1R_RTR                        ((uint32_t)0x00000002)        /*!<Remote Transmission Request */\r
5445 #define  CAN_TI1R_IDE                        ((uint32_t)0x00000004)        /*!<Identifier Extension */\r
5446 #define  CAN_TI1R_EXID                       ((uint32_t)0x001FFFF8)        /*!<Extended Identifier */\r
5447 #define  CAN_TI1R_STID                       ((uint32_t)0xFFE00000)        /*!<Standard Identifier or Extended Identifier */\r
5448 \r
5449 /*******************  Bit definition for CAN_TDT1R register  ******************/\r
5450 #define  CAN_TDT1R_DLC                       ((uint32_t)0x0000000F)        /*!<Data Length Code */\r
5451 #define  CAN_TDT1R_TGT                       ((uint32_t)0x00000100)        /*!<Transmit Global Time */\r
5452 #define  CAN_TDT1R_TIME                      ((uint32_t)0xFFFF0000)        /*!<Message Time Stamp */\r
5453 \r
5454 /*******************  Bit definition for CAN_TDL1R register  ******************/\r
5455 #define  CAN_TDL1R_DATA0                     ((uint32_t)0x000000FF)        /*!<Data byte 0 */\r
5456 #define  CAN_TDL1R_DATA1                     ((uint32_t)0x0000FF00)        /*!<Data byte 1 */\r
5457 #define  CAN_TDL1R_DATA2                     ((uint32_t)0x00FF0000)        /*!<Data byte 2 */\r
5458 #define  CAN_TDL1R_DATA3                     ((uint32_t)0xFF000000)        /*!<Data byte 3 */\r
5459 \r
5460 /*******************  Bit definition for CAN_TDH1R register  ******************/\r
5461 #define  CAN_TDH1R_DATA4                     ((uint32_t)0x000000FF)        /*!<Data byte 4 */\r
5462 #define  CAN_TDH1R_DATA5                     ((uint32_t)0x0000FF00)        /*!<Data byte 5 */\r
5463 #define  CAN_TDH1R_DATA6                     ((uint32_t)0x00FF0000)        /*!<Data byte 6 */\r
5464 #define  CAN_TDH1R_DATA7                     ((uint32_t)0xFF000000)        /*!<Data byte 7 */\r
5465 \r
5466 /*******************  Bit definition for CAN_TI2R register  *******************/\r
5467 #define  CAN_TI2R_TXRQ                       ((uint32_t)0x00000001)        /*!<Transmit Mailbox Request */\r
5468 #define  CAN_TI2R_RTR                        ((uint32_t)0x00000002)        /*!<Remote Transmission Request */\r
5469 #define  CAN_TI2R_IDE                        ((uint32_t)0x00000004)        /*!<Identifier Extension */\r
5470 #define  CAN_TI2R_EXID                       ((uint32_t)0x001FFFF8)        /*!<Extended identifier */\r
5471 #define  CAN_TI2R_STID                       ((uint32_t)0xFFE00000)        /*!<Standard Identifier or Extended Identifier */\r
5472 \r
5473 /*******************  Bit definition for CAN_TDT2R register  ******************/\r
5474 #define  CAN_TDT2R_DLC                       ((uint32_t)0x0000000F)        /*!<Data Length Code */\r
5475 #define  CAN_TDT2R_TGT                       ((uint32_t)0x00000100)        /*!<Transmit Global Time */\r
5476 #define  CAN_TDT2R_TIME                      ((uint32_t)0xFFFF0000)        /*!<Message Time Stamp */\r
5477 \r
5478 /*******************  Bit definition for CAN_TDL2R register  ******************/\r
5479 #define  CAN_TDL2R_DATA0                     ((uint32_t)0x000000FF)        /*!<Data byte 0 */\r
5480 #define  CAN_TDL2R_DATA1                     ((uint32_t)0x0000FF00)        /*!<Data byte 1 */\r
5481 #define  CAN_TDL2R_DATA2                     ((uint32_t)0x00FF0000)        /*!<Data byte 2 */\r
5482 #define  CAN_TDL2R_DATA3                     ((uint32_t)0xFF000000)        /*!<Data byte 3 */\r
5483 \r
5484 /*******************  Bit definition for CAN_TDH2R register  ******************/\r
5485 #define  CAN_TDH2R_DATA4                     ((uint32_t)0x000000FF)        /*!<Data byte 4 */\r
5486 #define  CAN_TDH2R_DATA5                     ((uint32_t)0x0000FF00)        /*!<Data byte 5 */\r
5487 #define  CAN_TDH2R_DATA6                     ((uint32_t)0x00FF0000)        /*!<Data byte 6 */\r
5488 #define  CAN_TDH2R_DATA7                     ((uint32_t)0xFF000000)        /*!<Data byte 7 */\r
5489 \r
5490 /*******************  Bit definition for CAN_RI0R register  *******************/\r
5491 #define  CAN_RI0R_RTR                        ((uint32_t)0x00000002)        /*!<Remote Transmission Request */\r
5492 #define  CAN_RI0R_IDE                        ((uint32_t)0x00000004)        /*!<Identifier Extension */\r
5493 #define  CAN_RI0R_EXID                       ((uint32_t)0x001FFFF8)        /*!<Extended Identifier */\r
5494 #define  CAN_RI0R_STID                       ((uint32_t)0xFFE00000)        /*!<Standard Identifier or Extended Identifier */\r
5495 \r
5496 /*******************  Bit definition for CAN_RDT0R register  ******************/\r
5497 #define  CAN_RDT0R_DLC                       ((uint32_t)0x0000000F)        /*!<Data Length Code */\r
5498 #define  CAN_RDT0R_FMI                       ((uint32_t)0x0000FF00)        /*!<Filter Match Index */\r
5499 #define  CAN_RDT0R_TIME                      ((uint32_t)0xFFFF0000)        /*!<Message Time Stamp */\r
5500 \r
5501 /*******************  Bit definition for CAN_RDL0R register  ******************/\r
5502 #define  CAN_RDL0R_DATA0                     ((uint32_t)0x000000FF)        /*!<Data byte 0 */\r
5503 #define  CAN_RDL0R_DATA1                     ((uint32_t)0x0000FF00)        /*!<Data byte 1 */\r
5504 #define  CAN_RDL0R_DATA2                     ((uint32_t)0x00FF0000)        /*!<Data byte 2 */\r
5505 #define  CAN_RDL0R_DATA3                     ((uint32_t)0xFF000000)        /*!<Data byte 3 */\r
5506 \r
5507 /*******************  Bit definition for CAN_RDH0R register  ******************/\r
5508 #define  CAN_RDH0R_DATA4                     ((uint32_t)0x000000FF)        /*!<Data byte 4 */\r
5509 #define  CAN_RDH0R_DATA5                     ((uint32_t)0x0000FF00)        /*!<Data byte 5 */\r
5510 #define  CAN_RDH0R_DATA6                     ((uint32_t)0x00FF0000)        /*!<Data byte 6 */\r
5511 #define  CAN_RDH0R_DATA7                     ((uint32_t)0xFF000000)        /*!<Data byte 7 */\r
5512 \r
5513 /*******************  Bit definition for CAN_RI1R register  *******************/\r
5514 #define  CAN_RI1R_RTR                        ((uint32_t)0x00000002)        /*!<Remote Transmission Request */\r
5515 #define  CAN_RI1R_IDE                        ((uint32_t)0x00000004)        /*!<Identifier Extension */\r
5516 #define  CAN_RI1R_EXID                       ((uint32_t)0x001FFFF8)        /*!<Extended identifier */\r
5517 #define  CAN_RI1R_STID                       ((uint32_t)0xFFE00000)        /*!<Standard Identifier or Extended Identifier */\r
5518 \r
5519 /*******************  Bit definition for CAN_RDT1R register  ******************/\r
5520 #define  CAN_RDT1R_DLC                       ((uint32_t)0x0000000F)        /*!<Data Length Code */\r
5521 #define  CAN_RDT1R_FMI                       ((uint32_t)0x0000FF00)        /*!<Filter Match Index */\r
5522 #define  CAN_RDT1R_TIME                      ((uint32_t)0xFFFF0000)        /*!<Message Time Stamp */\r
5523 \r
5524 /*******************  Bit definition for CAN_RDL1R register  ******************/\r
5525 #define  CAN_RDL1R_DATA0                     ((uint32_t)0x000000FF)        /*!<Data byte 0 */\r
5526 #define  CAN_RDL1R_DATA1                     ((uint32_t)0x0000FF00)        /*!<Data byte 1 */\r
5527 #define  CAN_RDL1R_DATA2                     ((uint32_t)0x00FF0000)        /*!<Data byte 2 */\r
5528 #define  CAN_RDL1R_DATA3                     ((uint32_t)0xFF000000)        /*!<Data byte 3 */\r
5529 \r
5530 /*******************  Bit definition for CAN_RDH1R register  ******************/\r
5531 #define  CAN_RDH1R_DATA4                     ((uint32_t)0x000000FF)        /*!<Data byte 4 */\r
5532 #define  CAN_RDH1R_DATA5                     ((uint32_t)0x0000FF00)        /*!<Data byte 5 */\r
5533 #define  CAN_RDH1R_DATA6                     ((uint32_t)0x00FF0000)        /*!<Data byte 6 */\r
5534 #define  CAN_RDH1R_DATA7                     ((uint32_t)0xFF000000)        /*!<Data byte 7 */\r
5535 \r
5536 /*!<CAN filter registers */\r
5537 /*******************  Bit definition for CAN_FMR register  ********************/\r
5538 #define  CAN_FMR_FINIT                       ((uint8_t)0x01)               /*!<Filter Init Mode */\r
5539 \r
5540 /*******************  Bit definition for CAN_FM1R register  *******************/\r
5541 #define  CAN_FM1R_FBM                        ((uint16_t)0x3FFF)            /*!<Filter Mode */\r
5542 #define  CAN_FM1R_FBM0                       ((uint16_t)0x0001)            /*!<Filter Init Mode bit 0 */\r
5543 #define  CAN_FM1R_FBM1                       ((uint16_t)0x0002)            /*!<Filter Init Mode bit 1 */\r
5544 #define  CAN_FM1R_FBM2                       ((uint16_t)0x0004)            /*!<Filter Init Mode bit 2 */\r
5545 #define  CAN_FM1R_FBM3                       ((uint16_t)0x0008)            /*!<Filter Init Mode bit 3 */\r
5546 #define  CAN_FM1R_FBM4                       ((uint16_t)0x0010)            /*!<Filter Init Mode bit 4 */\r
5547 #define  CAN_FM1R_FBM5                       ((uint16_t)0x0020)            /*!<Filter Init Mode bit 5 */\r
5548 #define  CAN_FM1R_FBM6                       ((uint16_t)0x0040)            /*!<Filter Init Mode bit 6 */\r
5549 #define  CAN_FM1R_FBM7                       ((uint16_t)0x0080)            /*!<Filter Init Mode bit 7 */\r
5550 #define  CAN_FM1R_FBM8                       ((uint16_t)0x0100)            /*!<Filter Init Mode bit 8 */\r
5551 #define  CAN_FM1R_FBM9                       ((uint16_t)0x0200)            /*!<Filter Init Mode bit 9 */\r
5552 #define  CAN_FM1R_FBM10                      ((uint16_t)0x0400)            /*!<Filter Init Mode bit 10 */\r
5553 #define  CAN_FM1R_FBM11                      ((uint16_t)0x0800)            /*!<Filter Init Mode bit 11 */\r
5554 #define  CAN_FM1R_FBM12                      ((uint16_t)0x1000)            /*!<Filter Init Mode bit 12 */\r
5555 #define  CAN_FM1R_FBM13                      ((uint16_t)0x2000)            /*!<Filter Init Mode bit 13 */\r
5556 \r
5557 /*******************  Bit definition for CAN_FS1R register  *******************/\r
5558 #define  CAN_FS1R_FSC                        ((uint16_t)0x3FFF)            /*!<Filter Scale Configuration */\r
5559 #define  CAN_FS1R_FSC0                       ((uint16_t)0x0001)            /*!<Filter Scale Configuration bit 0 */\r
5560 #define  CAN_FS1R_FSC1                       ((uint16_t)0x0002)            /*!<Filter Scale Configuration bit 1 */\r
5561 #define  CAN_FS1R_FSC2                       ((uint16_t)0x0004)            /*!<Filter Scale Configuration bit 2 */\r
5562 #define  CAN_FS1R_FSC3                       ((uint16_t)0x0008)            /*!<Filter Scale Configuration bit 3 */\r
5563 #define  CAN_FS1R_FSC4                       ((uint16_t)0x0010)            /*!<Filter Scale Configuration bit 4 */\r
5564 #define  CAN_FS1R_FSC5                       ((uint16_t)0x0020)            /*!<Filter Scale Configuration bit 5 */\r
5565 #define  CAN_FS1R_FSC6                       ((uint16_t)0x0040)            /*!<Filter Scale Configuration bit 6 */\r
5566 #define  CAN_FS1R_FSC7                       ((uint16_t)0x0080)            /*!<Filter Scale Configuration bit 7 */\r
5567 #define  CAN_FS1R_FSC8                       ((uint16_t)0x0100)            /*!<Filter Scale Configuration bit 8 */\r
5568 #define  CAN_FS1R_FSC9                       ((uint16_t)0x0200)            /*!<Filter Scale Configuration bit 9 */\r
5569 #define  CAN_FS1R_FSC10                      ((uint16_t)0x0400)            /*!<Filter Scale Configuration bit 10 */\r
5570 #define  CAN_FS1R_FSC11                      ((uint16_t)0x0800)            /*!<Filter Scale Configuration bit 11 */\r
5571 #define  CAN_FS1R_FSC12                      ((uint16_t)0x1000)            /*!<Filter Scale Configuration bit 12 */\r
5572 #define  CAN_FS1R_FSC13                      ((uint16_t)0x2000)            /*!<Filter Scale Configuration bit 13 */\r
5573 \r
5574 /******************  Bit definition for CAN_FFA1R register  *******************/\r
5575 #define  CAN_FFA1R_FFA                       ((uint16_t)0x3FFF)            /*!<Filter FIFO Assignment */\r
5576 #define  CAN_FFA1R_FFA0                      ((uint16_t)0x0001)            /*!<Filter FIFO Assignment for Filter 0 */\r
5577 #define  CAN_FFA1R_FFA1                      ((uint16_t)0x0002)            /*!<Filter FIFO Assignment for Filter 1 */\r
5578 #define  CAN_FFA1R_FFA2                      ((uint16_t)0x0004)            /*!<Filter FIFO Assignment for Filter 2 */\r
5579 #define  CAN_FFA1R_FFA3                      ((uint16_t)0x0008)            /*!<Filter FIFO Assignment for Filter 3 */\r
5580 #define  CAN_FFA1R_FFA4                      ((uint16_t)0x0010)            /*!<Filter FIFO Assignment for Filter 4 */\r
5581 #define  CAN_FFA1R_FFA5                      ((uint16_t)0x0020)            /*!<Filter FIFO Assignment for Filter 5 */\r
5582 #define  CAN_FFA1R_FFA6                      ((uint16_t)0x0040)            /*!<Filter FIFO Assignment for Filter 6 */\r
5583 #define  CAN_FFA1R_FFA7                      ((uint16_t)0x0080)            /*!<Filter FIFO Assignment for Filter 7 */\r
5584 #define  CAN_FFA1R_FFA8                      ((uint16_t)0x0100)            /*!<Filter FIFO Assignment for Filter 8 */\r
5585 #define  CAN_FFA1R_FFA9                      ((uint16_t)0x0200)            /*!<Filter FIFO Assignment for Filter 9 */\r
5586 #define  CAN_FFA1R_FFA10                     ((uint16_t)0x0400)            /*!<Filter FIFO Assignment for Filter 10 */\r
5587 #define  CAN_FFA1R_FFA11                     ((uint16_t)0x0800)            /*!<Filter FIFO Assignment for Filter 11 */\r
5588 #define  CAN_FFA1R_FFA12                     ((uint16_t)0x1000)            /*!<Filter FIFO Assignment for Filter 12 */\r
5589 #define  CAN_FFA1R_FFA13                     ((uint16_t)0x2000)            /*!<Filter FIFO Assignment for Filter 13 */\r
5590 \r
5591 /*******************  Bit definition for CAN_FA1R register  *******************/\r
5592 #define  CAN_FA1R_FACT                       ((uint16_t)0x3FFF)            /*!<Filter Active */\r
5593 #define  CAN_FA1R_FACT0                      ((uint16_t)0x0001)            /*!<Filter 0 Active */\r
5594 #define  CAN_FA1R_FACT1                      ((uint16_t)0x0002)            /*!<Filter 1 Active */\r
5595 #define  CAN_FA1R_FACT2                      ((uint16_t)0x0004)            /*!<Filter 2 Active */\r
5596 #define  CAN_FA1R_FACT3                      ((uint16_t)0x0008)            /*!<Filter 3 Active */\r
5597 #define  CAN_FA1R_FACT4                      ((uint16_t)0x0010)            /*!<Filter 4 Active */\r
5598 #define  CAN_FA1R_FACT5                      ((uint16_t)0x0020)            /*!<Filter 5 Active */\r
5599 #define  CAN_FA1R_FACT6                      ((uint16_t)0x0040)            /*!<Filter 6 Active */\r
5600 #define  CAN_FA1R_FACT7                      ((uint16_t)0x0080)            /*!<Filter 7 Active */\r
5601 #define  CAN_FA1R_FACT8                      ((uint16_t)0x0100)            /*!<Filter 8 Active */\r
5602 #define  CAN_FA1R_FACT9                      ((uint16_t)0x0200)            /*!<Filter 9 Active */\r
5603 #define  CAN_FA1R_FACT10                     ((uint16_t)0x0400)            /*!<Filter 10 Active */\r
5604 #define  CAN_FA1R_FACT11                     ((uint16_t)0x0800)            /*!<Filter 11 Active */\r
5605 #define  CAN_FA1R_FACT12                     ((uint16_t)0x1000)            /*!<Filter 12 Active */\r
5606 #define  CAN_FA1R_FACT13                     ((uint16_t)0x2000)            /*!<Filter 13 Active */\r
5607 \r
5608 /*******************  Bit definition for CAN_F0R1 register  *******************/\r
5609 #define  CAN_F0R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5610 #define  CAN_F0R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5611 #define  CAN_F0R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5612 #define  CAN_F0R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5613 #define  CAN_F0R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5614 #define  CAN_F0R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5615 #define  CAN_F0R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5616 #define  CAN_F0R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5617 #define  CAN_F0R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5618 #define  CAN_F0R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5619 #define  CAN_F0R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5620 #define  CAN_F0R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5621 #define  CAN_F0R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5622 #define  CAN_F0R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5623 #define  CAN_F0R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5624 #define  CAN_F0R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5625 #define  CAN_F0R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5626 #define  CAN_F0R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5627 #define  CAN_F0R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5628 #define  CAN_F0R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5629 #define  CAN_F0R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5630 #define  CAN_F0R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5631 #define  CAN_F0R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5632 #define  CAN_F0R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5633 #define  CAN_F0R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5634 #define  CAN_F0R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5635 #define  CAN_F0R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5636 #define  CAN_F0R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5637 #define  CAN_F0R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5638 #define  CAN_F0R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5639 #define  CAN_F0R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5640 #define  CAN_F0R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5641 \r
5642 /*******************  Bit definition for CAN_F1R1 register  *******************/\r
5643 #define  CAN_F1R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5644 #define  CAN_F1R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5645 #define  CAN_F1R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5646 #define  CAN_F1R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5647 #define  CAN_F1R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5648 #define  CAN_F1R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5649 #define  CAN_F1R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5650 #define  CAN_F1R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5651 #define  CAN_F1R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5652 #define  CAN_F1R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5653 #define  CAN_F1R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5654 #define  CAN_F1R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5655 #define  CAN_F1R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5656 #define  CAN_F1R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5657 #define  CAN_F1R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5658 #define  CAN_F1R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5659 #define  CAN_F1R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5660 #define  CAN_F1R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5661 #define  CAN_F1R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5662 #define  CAN_F1R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5663 #define  CAN_F1R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5664 #define  CAN_F1R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5665 #define  CAN_F1R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5666 #define  CAN_F1R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5667 #define  CAN_F1R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5668 #define  CAN_F1R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5669 #define  CAN_F1R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5670 #define  CAN_F1R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5671 #define  CAN_F1R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5672 #define  CAN_F1R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5673 #define  CAN_F1R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5674 #define  CAN_F1R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5675 \r
5676 /*******************  Bit definition for CAN_F2R1 register  *******************/\r
5677 #define  CAN_F2R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5678 #define  CAN_F2R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5679 #define  CAN_F2R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5680 #define  CAN_F2R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5681 #define  CAN_F2R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5682 #define  CAN_F2R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5683 #define  CAN_F2R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5684 #define  CAN_F2R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5685 #define  CAN_F2R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5686 #define  CAN_F2R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5687 #define  CAN_F2R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5688 #define  CAN_F2R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5689 #define  CAN_F2R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5690 #define  CAN_F2R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5691 #define  CAN_F2R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5692 #define  CAN_F2R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5693 #define  CAN_F2R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5694 #define  CAN_F2R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5695 #define  CAN_F2R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5696 #define  CAN_F2R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5697 #define  CAN_F2R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5698 #define  CAN_F2R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5699 #define  CAN_F2R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5700 #define  CAN_F2R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5701 #define  CAN_F2R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5702 #define  CAN_F2R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5703 #define  CAN_F2R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5704 #define  CAN_F2R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5705 #define  CAN_F2R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5706 #define  CAN_F2R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5707 #define  CAN_F2R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5708 #define  CAN_F2R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5709 \r
5710 /*******************  Bit definition for CAN_F3R1 register  *******************/\r
5711 #define  CAN_F3R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5712 #define  CAN_F3R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5713 #define  CAN_F3R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5714 #define  CAN_F3R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5715 #define  CAN_F3R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5716 #define  CAN_F3R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5717 #define  CAN_F3R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5718 #define  CAN_F3R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5719 #define  CAN_F3R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5720 #define  CAN_F3R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5721 #define  CAN_F3R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5722 #define  CAN_F3R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5723 #define  CAN_F3R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5724 #define  CAN_F3R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5725 #define  CAN_F3R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5726 #define  CAN_F3R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5727 #define  CAN_F3R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5728 #define  CAN_F3R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5729 #define  CAN_F3R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5730 #define  CAN_F3R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5731 #define  CAN_F3R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5732 #define  CAN_F3R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5733 #define  CAN_F3R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5734 #define  CAN_F3R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5735 #define  CAN_F3R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5736 #define  CAN_F3R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5737 #define  CAN_F3R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5738 #define  CAN_F3R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5739 #define  CAN_F3R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5740 #define  CAN_F3R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5741 #define  CAN_F3R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5742 #define  CAN_F3R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5743 \r
5744 /*******************  Bit definition for CAN_F4R1 register  *******************/\r
5745 #define  CAN_F4R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5746 #define  CAN_F4R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5747 #define  CAN_F4R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5748 #define  CAN_F4R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5749 #define  CAN_F4R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5750 #define  CAN_F4R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5751 #define  CAN_F4R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5752 #define  CAN_F4R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5753 #define  CAN_F4R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5754 #define  CAN_F4R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5755 #define  CAN_F4R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5756 #define  CAN_F4R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5757 #define  CAN_F4R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5758 #define  CAN_F4R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5759 #define  CAN_F4R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5760 #define  CAN_F4R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5761 #define  CAN_F4R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5762 #define  CAN_F4R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5763 #define  CAN_F4R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5764 #define  CAN_F4R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5765 #define  CAN_F4R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5766 #define  CAN_F4R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5767 #define  CAN_F4R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5768 #define  CAN_F4R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5769 #define  CAN_F4R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5770 #define  CAN_F4R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5771 #define  CAN_F4R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5772 #define  CAN_F4R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5773 #define  CAN_F4R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5774 #define  CAN_F4R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5775 #define  CAN_F4R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5776 #define  CAN_F4R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5777 \r
5778 /*******************  Bit definition for CAN_F5R1 register  *******************/\r
5779 #define  CAN_F5R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5780 #define  CAN_F5R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5781 #define  CAN_F5R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5782 #define  CAN_F5R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5783 #define  CAN_F5R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5784 #define  CAN_F5R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5785 #define  CAN_F5R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5786 #define  CAN_F5R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5787 #define  CAN_F5R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5788 #define  CAN_F5R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5789 #define  CAN_F5R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5790 #define  CAN_F5R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5791 #define  CAN_F5R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5792 #define  CAN_F5R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5793 #define  CAN_F5R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5794 #define  CAN_F5R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5795 #define  CAN_F5R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5796 #define  CAN_F5R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5797 #define  CAN_F5R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5798 #define  CAN_F5R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5799 #define  CAN_F5R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5800 #define  CAN_F5R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5801 #define  CAN_F5R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5802 #define  CAN_F5R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5803 #define  CAN_F5R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5804 #define  CAN_F5R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5805 #define  CAN_F5R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5806 #define  CAN_F5R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5807 #define  CAN_F5R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5808 #define  CAN_F5R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5809 #define  CAN_F5R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5810 #define  CAN_F5R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5811 \r
5812 /*******************  Bit definition for CAN_F6R1 register  *******************/\r
5813 #define  CAN_F6R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5814 #define  CAN_F6R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5815 #define  CAN_F6R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5816 #define  CAN_F6R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5817 #define  CAN_F6R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5818 #define  CAN_F6R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5819 #define  CAN_F6R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5820 #define  CAN_F6R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5821 #define  CAN_F6R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5822 #define  CAN_F6R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5823 #define  CAN_F6R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5824 #define  CAN_F6R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5825 #define  CAN_F6R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5826 #define  CAN_F6R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5827 #define  CAN_F6R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5828 #define  CAN_F6R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5829 #define  CAN_F6R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5830 #define  CAN_F6R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5831 #define  CAN_F6R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5832 #define  CAN_F6R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5833 #define  CAN_F6R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5834 #define  CAN_F6R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5835 #define  CAN_F6R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5836 #define  CAN_F6R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5837 #define  CAN_F6R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5838 #define  CAN_F6R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5839 #define  CAN_F6R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5840 #define  CAN_F6R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5841 #define  CAN_F6R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5842 #define  CAN_F6R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5843 #define  CAN_F6R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5844 #define  CAN_F6R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5845 \r
5846 /*******************  Bit definition for CAN_F7R1 register  *******************/\r
5847 #define  CAN_F7R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5848 #define  CAN_F7R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5849 #define  CAN_F7R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5850 #define  CAN_F7R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5851 #define  CAN_F7R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5852 #define  CAN_F7R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5853 #define  CAN_F7R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5854 #define  CAN_F7R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5855 #define  CAN_F7R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5856 #define  CAN_F7R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5857 #define  CAN_F7R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5858 #define  CAN_F7R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5859 #define  CAN_F7R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5860 #define  CAN_F7R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5861 #define  CAN_F7R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5862 #define  CAN_F7R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5863 #define  CAN_F7R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5864 #define  CAN_F7R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5865 #define  CAN_F7R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5866 #define  CAN_F7R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5867 #define  CAN_F7R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5868 #define  CAN_F7R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5869 #define  CAN_F7R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5870 #define  CAN_F7R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5871 #define  CAN_F7R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5872 #define  CAN_F7R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5873 #define  CAN_F7R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5874 #define  CAN_F7R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5875 #define  CAN_F7R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5876 #define  CAN_F7R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5877 #define  CAN_F7R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5878 #define  CAN_F7R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5879 \r
5880 /*******************  Bit definition for CAN_F8R1 register  *******************/\r
5881 #define  CAN_F8R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5882 #define  CAN_F8R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5883 #define  CAN_F8R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5884 #define  CAN_F8R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5885 #define  CAN_F8R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5886 #define  CAN_F8R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5887 #define  CAN_F8R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5888 #define  CAN_F8R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5889 #define  CAN_F8R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5890 #define  CAN_F8R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5891 #define  CAN_F8R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5892 #define  CAN_F8R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5893 #define  CAN_F8R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5894 #define  CAN_F8R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5895 #define  CAN_F8R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5896 #define  CAN_F8R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5897 #define  CAN_F8R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5898 #define  CAN_F8R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5899 #define  CAN_F8R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5900 #define  CAN_F8R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5901 #define  CAN_F8R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5902 #define  CAN_F8R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5903 #define  CAN_F8R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5904 #define  CAN_F8R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5905 #define  CAN_F8R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5906 #define  CAN_F8R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5907 #define  CAN_F8R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5908 #define  CAN_F8R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5909 #define  CAN_F8R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5910 #define  CAN_F8R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5911 #define  CAN_F8R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5912 #define  CAN_F8R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5913 \r
5914 /*******************  Bit definition for CAN_F9R1 register  *******************/\r
5915 #define  CAN_F9R1_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5916 #define  CAN_F9R1_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5917 #define  CAN_F9R1_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5918 #define  CAN_F9R1_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5919 #define  CAN_F9R1_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5920 #define  CAN_F9R1_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5921 #define  CAN_F9R1_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5922 #define  CAN_F9R1_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5923 #define  CAN_F9R1_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5924 #define  CAN_F9R1_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5925 #define  CAN_F9R1_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5926 #define  CAN_F9R1_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5927 #define  CAN_F9R1_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5928 #define  CAN_F9R1_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5929 #define  CAN_F9R1_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5930 #define  CAN_F9R1_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5931 #define  CAN_F9R1_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5932 #define  CAN_F9R1_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5933 #define  CAN_F9R1_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5934 #define  CAN_F9R1_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5935 #define  CAN_F9R1_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5936 #define  CAN_F9R1_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5937 #define  CAN_F9R1_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5938 #define  CAN_F9R1_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5939 #define  CAN_F9R1_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5940 #define  CAN_F9R1_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5941 #define  CAN_F9R1_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5942 #define  CAN_F9R1_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5943 #define  CAN_F9R1_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5944 #define  CAN_F9R1_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5945 #define  CAN_F9R1_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5946 #define  CAN_F9R1_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5947 \r
5948 /*******************  Bit definition for CAN_F10R1 register  ******************/\r
5949 #define  CAN_F10R1_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5950 #define  CAN_F10R1_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5951 #define  CAN_F10R1_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5952 #define  CAN_F10R1_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5953 #define  CAN_F10R1_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5954 #define  CAN_F10R1_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5955 #define  CAN_F10R1_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5956 #define  CAN_F10R1_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5957 #define  CAN_F10R1_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5958 #define  CAN_F10R1_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5959 #define  CAN_F10R1_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5960 #define  CAN_F10R1_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5961 #define  CAN_F10R1_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5962 #define  CAN_F10R1_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5963 #define  CAN_F10R1_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5964 #define  CAN_F10R1_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5965 #define  CAN_F10R1_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
5966 #define  CAN_F10R1_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
5967 #define  CAN_F10R1_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
5968 #define  CAN_F10R1_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
5969 #define  CAN_F10R1_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
5970 #define  CAN_F10R1_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
5971 #define  CAN_F10R1_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
5972 #define  CAN_F10R1_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
5973 #define  CAN_F10R1_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
5974 #define  CAN_F10R1_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
5975 #define  CAN_F10R1_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
5976 #define  CAN_F10R1_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
5977 #define  CAN_F10R1_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
5978 #define  CAN_F10R1_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
5979 #define  CAN_F10R1_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
5980 #define  CAN_F10R1_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
5981 \r
5982 /*******************  Bit definition for CAN_F11R1 register  ******************/\r
5983 #define  CAN_F11R1_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
5984 #define  CAN_F11R1_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
5985 #define  CAN_F11R1_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
5986 #define  CAN_F11R1_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
5987 #define  CAN_F11R1_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
5988 #define  CAN_F11R1_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
5989 #define  CAN_F11R1_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
5990 #define  CAN_F11R1_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
5991 #define  CAN_F11R1_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
5992 #define  CAN_F11R1_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
5993 #define  CAN_F11R1_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
5994 #define  CAN_F11R1_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
5995 #define  CAN_F11R1_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
5996 #define  CAN_F11R1_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
5997 #define  CAN_F11R1_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
5998 #define  CAN_F11R1_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
5999 #define  CAN_F11R1_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6000 #define  CAN_F11R1_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6001 #define  CAN_F11R1_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6002 #define  CAN_F11R1_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6003 #define  CAN_F11R1_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6004 #define  CAN_F11R1_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6005 #define  CAN_F11R1_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6006 #define  CAN_F11R1_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6007 #define  CAN_F11R1_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6008 #define  CAN_F11R1_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6009 #define  CAN_F11R1_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6010 #define  CAN_F11R1_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6011 #define  CAN_F11R1_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6012 #define  CAN_F11R1_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6013 #define  CAN_F11R1_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6014 #define  CAN_F11R1_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6015 \r
6016 /*******************  Bit definition for CAN_F12R1 register  ******************/\r
6017 #define  CAN_F12R1_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6018 #define  CAN_F12R1_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6019 #define  CAN_F12R1_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6020 #define  CAN_F12R1_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6021 #define  CAN_F12R1_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6022 #define  CAN_F12R1_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6023 #define  CAN_F12R1_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6024 #define  CAN_F12R1_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6025 #define  CAN_F12R1_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6026 #define  CAN_F12R1_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6027 #define  CAN_F12R1_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6028 #define  CAN_F12R1_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6029 #define  CAN_F12R1_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6030 #define  CAN_F12R1_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6031 #define  CAN_F12R1_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6032 #define  CAN_F12R1_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6033 #define  CAN_F12R1_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6034 #define  CAN_F12R1_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6035 #define  CAN_F12R1_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6036 #define  CAN_F12R1_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6037 #define  CAN_F12R1_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6038 #define  CAN_F12R1_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6039 #define  CAN_F12R1_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6040 #define  CAN_F12R1_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6041 #define  CAN_F12R1_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6042 #define  CAN_F12R1_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6043 #define  CAN_F12R1_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6044 #define  CAN_F12R1_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6045 #define  CAN_F12R1_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6046 #define  CAN_F12R1_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6047 #define  CAN_F12R1_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6048 #define  CAN_F12R1_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6049 \r
6050 /*******************  Bit definition for CAN_F13R1 register  ******************/\r
6051 #define  CAN_F13R1_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6052 #define  CAN_F13R1_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6053 #define  CAN_F13R1_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6054 #define  CAN_F13R1_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6055 #define  CAN_F13R1_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6056 #define  CAN_F13R1_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6057 #define  CAN_F13R1_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6058 #define  CAN_F13R1_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6059 #define  CAN_F13R1_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6060 #define  CAN_F13R1_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6061 #define  CAN_F13R1_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6062 #define  CAN_F13R1_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6063 #define  CAN_F13R1_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6064 #define  CAN_F13R1_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6065 #define  CAN_F13R1_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6066 #define  CAN_F13R1_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6067 #define  CAN_F13R1_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6068 #define  CAN_F13R1_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6069 #define  CAN_F13R1_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6070 #define  CAN_F13R1_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6071 #define  CAN_F13R1_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6072 #define  CAN_F13R1_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6073 #define  CAN_F13R1_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6074 #define  CAN_F13R1_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6075 #define  CAN_F13R1_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6076 #define  CAN_F13R1_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6077 #define  CAN_F13R1_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6078 #define  CAN_F13R1_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6079 #define  CAN_F13R1_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6080 #define  CAN_F13R1_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6081 #define  CAN_F13R1_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6082 #define  CAN_F13R1_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6083 \r
6084 /*******************  Bit definition for CAN_F0R2 register  *******************/\r
6085 #define  CAN_F0R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6086 #define  CAN_F0R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6087 #define  CAN_F0R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6088 #define  CAN_F0R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6089 #define  CAN_F0R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6090 #define  CAN_F0R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6091 #define  CAN_F0R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6092 #define  CAN_F0R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6093 #define  CAN_F0R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6094 #define  CAN_F0R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6095 #define  CAN_F0R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6096 #define  CAN_F0R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6097 #define  CAN_F0R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6098 #define  CAN_F0R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6099 #define  CAN_F0R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6100 #define  CAN_F0R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6101 #define  CAN_F0R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6102 #define  CAN_F0R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6103 #define  CAN_F0R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6104 #define  CAN_F0R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6105 #define  CAN_F0R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6106 #define  CAN_F0R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6107 #define  CAN_F0R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6108 #define  CAN_F0R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6109 #define  CAN_F0R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6110 #define  CAN_F0R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6111 #define  CAN_F0R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6112 #define  CAN_F0R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6113 #define  CAN_F0R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6114 #define  CAN_F0R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6115 #define  CAN_F0R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6116 #define  CAN_F0R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6117 \r
6118 /*******************  Bit definition for CAN_F1R2 register  *******************/\r
6119 #define  CAN_F1R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6120 #define  CAN_F1R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6121 #define  CAN_F1R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6122 #define  CAN_F1R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6123 #define  CAN_F1R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6124 #define  CAN_F1R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6125 #define  CAN_F1R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6126 #define  CAN_F1R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6127 #define  CAN_F1R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6128 #define  CAN_F1R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6129 #define  CAN_F1R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6130 #define  CAN_F1R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6131 #define  CAN_F1R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6132 #define  CAN_F1R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6133 #define  CAN_F1R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6134 #define  CAN_F1R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6135 #define  CAN_F1R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6136 #define  CAN_F1R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6137 #define  CAN_F1R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6138 #define  CAN_F1R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6139 #define  CAN_F1R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6140 #define  CAN_F1R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6141 #define  CAN_F1R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6142 #define  CAN_F1R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6143 #define  CAN_F1R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6144 #define  CAN_F1R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6145 #define  CAN_F1R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6146 #define  CAN_F1R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6147 #define  CAN_F1R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6148 #define  CAN_F1R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6149 #define  CAN_F1R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6150 #define  CAN_F1R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6151 \r
6152 /*******************  Bit definition for CAN_F2R2 register  *******************/\r
6153 #define  CAN_F2R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6154 #define  CAN_F2R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6155 #define  CAN_F2R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6156 #define  CAN_F2R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6157 #define  CAN_F2R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6158 #define  CAN_F2R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6159 #define  CAN_F2R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6160 #define  CAN_F2R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6161 #define  CAN_F2R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6162 #define  CAN_F2R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6163 #define  CAN_F2R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6164 #define  CAN_F2R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6165 #define  CAN_F2R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6166 #define  CAN_F2R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6167 #define  CAN_F2R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6168 #define  CAN_F2R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6169 #define  CAN_F2R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6170 #define  CAN_F2R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6171 #define  CAN_F2R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6172 #define  CAN_F2R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6173 #define  CAN_F2R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6174 #define  CAN_F2R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6175 #define  CAN_F2R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6176 #define  CAN_F2R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6177 #define  CAN_F2R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6178 #define  CAN_F2R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6179 #define  CAN_F2R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6180 #define  CAN_F2R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6181 #define  CAN_F2R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6182 #define  CAN_F2R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6183 #define  CAN_F2R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6184 #define  CAN_F2R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6185 \r
6186 /*******************  Bit definition for CAN_F3R2 register  *******************/\r
6187 #define  CAN_F3R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6188 #define  CAN_F3R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6189 #define  CAN_F3R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6190 #define  CAN_F3R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6191 #define  CAN_F3R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6192 #define  CAN_F3R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6193 #define  CAN_F3R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6194 #define  CAN_F3R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6195 #define  CAN_F3R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6196 #define  CAN_F3R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6197 #define  CAN_F3R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6198 #define  CAN_F3R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6199 #define  CAN_F3R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6200 #define  CAN_F3R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6201 #define  CAN_F3R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6202 #define  CAN_F3R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6203 #define  CAN_F3R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6204 #define  CAN_F3R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6205 #define  CAN_F3R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6206 #define  CAN_F3R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6207 #define  CAN_F3R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6208 #define  CAN_F3R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6209 #define  CAN_F3R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6210 #define  CAN_F3R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6211 #define  CAN_F3R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6212 #define  CAN_F3R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6213 #define  CAN_F3R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6214 #define  CAN_F3R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6215 #define  CAN_F3R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6216 #define  CAN_F3R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6217 #define  CAN_F3R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6218 #define  CAN_F3R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6219 \r
6220 /*******************  Bit definition for CAN_F4R2 register  *******************/\r
6221 #define  CAN_F4R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6222 #define  CAN_F4R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6223 #define  CAN_F4R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6224 #define  CAN_F4R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6225 #define  CAN_F4R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6226 #define  CAN_F4R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6227 #define  CAN_F4R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6228 #define  CAN_F4R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6229 #define  CAN_F4R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6230 #define  CAN_F4R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6231 #define  CAN_F4R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6232 #define  CAN_F4R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6233 #define  CAN_F4R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6234 #define  CAN_F4R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6235 #define  CAN_F4R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6236 #define  CAN_F4R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6237 #define  CAN_F4R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6238 #define  CAN_F4R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6239 #define  CAN_F4R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6240 #define  CAN_F4R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6241 #define  CAN_F4R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6242 #define  CAN_F4R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6243 #define  CAN_F4R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6244 #define  CAN_F4R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6245 #define  CAN_F4R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6246 #define  CAN_F4R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6247 #define  CAN_F4R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6248 #define  CAN_F4R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6249 #define  CAN_F4R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6250 #define  CAN_F4R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6251 #define  CAN_F4R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6252 #define  CAN_F4R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6253 \r
6254 /*******************  Bit definition for CAN_F5R2 register  *******************/\r
6255 #define  CAN_F5R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6256 #define  CAN_F5R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6257 #define  CAN_F5R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6258 #define  CAN_F5R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6259 #define  CAN_F5R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6260 #define  CAN_F5R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6261 #define  CAN_F5R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6262 #define  CAN_F5R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6263 #define  CAN_F5R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6264 #define  CAN_F5R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6265 #define  CAN_F5R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6266 #define  CAN_F5R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6267 #define  CAN_F5R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6268 #define  CAN_F5R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6269 #define  CAN_F5R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6270 #define  CAN_F5R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6271 #define  CAN_F5R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6272 #define  CAN_F5R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6273 #define  CAN_F5R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6274 #define  CAN_F5R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6275 #define  CAN_F5R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6276 #define  CAN_F5R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6277 #define  CAN_F5R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6278 #define  CAN_F5R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6279 #define  CAN_F5R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6280 #define  CAN_F5R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6281 #define  CAN_F5R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6282 #define  CAN_F5R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6283 #define  CAN_F5R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6284 #define  CAN_F5R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6285 #define  CAN_F5R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6286 #define  CAN_F5R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6287 \r
6288 /*******************  Bit definition for CAN_F6R2 register  *******************/\r
6289 #define  CAN_F6R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6290 #define  CAN_F6R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6291 #define  CAN_F6R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6292 #define  CAN_F6R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6293 #define  CAN_F6R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6294 #define  CAN_F6R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6295 #define  CAN_F6R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6296 #define  CAN_F6R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6297 #define  CAN_F6R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6298 #define  CAN_F6R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6299 #define  CAN_F6R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6300 #define  CAN_F6R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6301 #define  CAN_F6R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6302 #define  CAN_F6R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6303 #define  CAN_F6R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6304 #define  CAN_F6R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6305 #define  CAN_F6R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6306 #define  CAN_F6R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6307 #define  CAN_F6R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6308 #define  CAN_F6R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6309 #define  CAN_F6R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6310 #define  CAN_F6R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6311 #define  CAN_F6R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6312 #define  CAN_F6R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6313 #define  CAN_F6R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6314 #define  CAN_F6R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6315 #define  CAN_F6R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6316 #define  CAN_F6R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6317 #define  CAN_F6R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6318 #define  CAN_F6R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6319 #define  CAN_F6R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6320 #define  CAN_F6R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6321 \r
6322 /*******************  Bit definition for CAN_F7R2 register  *******************/\r
6323 #define  CAN_F7R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6324 #define  CAN_F7R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6325 #define  CAN_F7R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6326 #define  CAN_F7R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6327 #define  CAN_F7R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6328 #define  CAN_F7R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6329 #define  CAN_F7R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6330 #define  CAN_F7R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6331 #define  CAN_F7R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6332 #define  CAN_F7R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6333 #define  CAN_F7R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6334 #define  CAN_F7R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6335 #define  CAN_F7R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6336 #define  CAN_F7R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6337 #define  CAN_F7R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6338 #define  CAN_F7R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6339 #define  CAN_F7R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6340 #define  CAN_F7R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6341 #define  CAN_F7R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6342 #define  CAN_F7R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6343 #define  CAN_F7R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6344 #define  CAN_F7R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6345 #define  CAN_F7R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6346 #define  CAN_F7R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6347 #define  CAN_F7R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6348 #define  CAN_F7R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6349 #define  CAN_F7R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6350 #define  CAN_F7R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6351 #define  CAN_F7R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6352 #define  CAN_F7R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6353 #define  CAN_F7R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6354 #define  CAN_F7R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6355 \r
6356 /*******************  Bit definition for CAN_F8R2 register  *******************/\r
6357 #define  CAN_F8R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6358 #define  CAN_F8R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6359 #define  CAN_F8R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6360 #define  CAN_F8R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6361 #define  CAN_F8R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6362 #define  CAN_F8R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6363 #define  CAN_F8R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6364 #define  CAN_F8R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6365 #define  CAN_F8R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6366 #define  CAN_F8R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6367 #define  CAN_F8R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6368 #define  CAN_F8R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6369 #define  CAN_F8R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6370 #define  CAN_F8R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6371 #define  CAN_F8R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6372 #define  CAN_F8R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6373 #define  CAN_F8R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6374 #define  CAN_F8R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6375 #define  CAN_F8R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6376 #define  CAN_F8R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6377 #define  CAN_F8R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6378 #define  CAN_F8R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6379 #define  CAN_F8R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6380 #define  CAN_F8R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6381 #define  CAN_F8R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6382 #define  CAN_F8R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6383 #define  CAN_F8R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6384 #define  CAN_F8R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6385 #define  CAN_F8R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6386 #define  CAN_F8R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6387 #define  CAN_F8R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6388 #define  CAN_F8R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6389 \r
6390 /*******************  Bit definition for CAN_F9R2 register  *******************/\r
6391 #define  CAN_F9R2_FB0                        ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6392 #define  CAN_F9R2_FB1                        ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6393 #define  CAN_F9R2_FB2                        ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6394 #define  CAN_F9R2_FB3                        ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6395 #define  CAN_F9R2_FB4                        ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6396 #define  CAN_F9R2_FB5                        ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6397 #define  CAN_F9R2_FB6                        ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6398 #define  CAN_F9R2_FB7                        ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6399 #define  CAN_F9R2_FB8                        ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6400 #define  CAN_F9R2_FB9                        ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6401 #define  CAN_F9R2_FB10                       ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6402 #define  CAN_F9R2_FB11                       ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6403 #define  CAN_F9R2_FB12                       ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6404 #define  CAN_F9R2_FB13                       ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6405 #define  CAN_F9R2_FB14                       ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6406 #define  CAN_F9R2_FB15                       ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6407 #define  CAN_F9R2_FB16                       ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6408 #define  CAN_F9R2_FB17                       ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6409 #define  CAN_F9R2_FB18                       ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6410 #define  CAN_F9R2_FB19                       ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6411 #define  CAN_F9R2_FB20                       ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6412 #define  CAN_F9R2_FB21                       ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6413 #define  CAN_F9R2_FB22                       ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6414 #define  CAN_F9R2_FB23                       ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6415 #define  CAN_F9R2_FB24                       ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6416 #define  CAN_F9R2_FB25                       ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6417 #define  CAN_F9R2_FB26                       ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6418 #define  CAN_F9R2_FB27                       ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6419 #define  CAN_F9R2_FB28                       ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6420 #define  CAN_F9R2_FB29                       ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6421 #define  CAN_F9R2_FB30                       ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6422 #define  CAN_F9R2_FB31                       ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6423 \r
6424 /*******************  Bit definition for CAN_F10R2 register  ******************/\r
6425 #define  CAN_F10R2_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6426 #define  CAN_F10R2_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6427 #define  CAN_F10R2_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6428 #define  CAN_F10R2_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6429 #define  CAN_F10R2_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6430 #define  CAN_F10R2_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6431 #define  CAN_F10R2_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6432 #define  CAN_F10R2_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6433 #define  CAN_F10R2_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6434 #define  CAN_F10R2_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6435 #define  CAN_F10R2_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6436 #define  CAN_F10R2_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6437 #define  CAN_F10R2_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6438 #define  CAN_F10R2_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6439 #define  CAN_F10R2_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6440 #define  CAN_F10R2_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6441 #define  CAN_F10R2_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6442 #define  CAN_F10R2_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6443 #define  CAN_F10R2_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6444 #define  CAN_F10R2_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6445 #define  CAN_F10R2_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6446 #define  CAN_F10R2_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6447 #define  CAN_F10R2_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6448 #define  CAN_F10R2_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6449 #define  CAN_F10R2_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6450 #define  CAN_F10R2_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6451 #define  CAN_F10R2_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6452 #define  CAN_F10R2_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6453 #define  CAN_F10R2_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6454 #define  CAN_F10R2_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6455 #define  CAN_F10R2_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6456 #define  CAN_F10R2_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6457 \r
6458 /*******************  Bit definition for CAN_F11R2 register  ******************/\r
6459 #define  CAN_F11R2_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6460 #define  CAN_F11R2_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6461 #define  CAN_F11R2_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6462 #define  CAN_F11R2_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6463 #define  CAN_F11R2_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6464 #define  CAN_F11R2_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6465 #define  CAN_F11R2_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6466 #define  CAN_F11R2_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6467 #define  CAN_F11R2_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6468 #define  CAN_F11R2_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6469 #define  CAN_F11R2_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6470 #define  CAN_F11R2_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6471 #define  CAN_F11R2_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6472 #define  CAN_F11R2_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6473 #define  CAN_F11R2_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6474 #define  CAN_F11R2_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6475 #define  CAN_F11R2_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6476 #define  CAN_F11R2_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6477 #define  CAN_F11R2_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6478 #define  CAN_F11R2_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6479 #define  CAN_F11R2_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6480 #define  CAN_F11R2_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6481 #define  CAN_F11R2_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6482 #define  CAN_F11R2_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6483 #define  CAN_F11R2_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6484 #define  CAN_F11R2_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6485 #define  CAN_F11R2_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6486 #define  CAN_F11R2_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6487 #define  CAN_F11R2_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6488 #define  CAN_F11R2_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6489 #define  CAN_F11R2_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6490 #define  CAN_F11R2_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6491 \r
6492 /*******************  Bit definition for CAN_F12R2 register  ******************/\r
6493 #define  CAN_F12R2_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6494 #define  CAN_F12R2_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6495 #define  CAN_F12R2_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6496 #define  CAN_F12R2_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6497 #define  CAN_F12R2_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6498 #define  CAN_F12R2_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6499 #define  CAN_F12R2_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6500 #define  CAN_F12R2_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6501 #define  CAN_F12R2_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6502 #define  CAN_F12R2_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6503 #define  CAN_F12R2_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6504 #define  CAN_F12R2_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6505 #define  CAN_F12R2_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6506 #define  CAN_F12R2_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6507 #define  CAN_F12R2_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6508 #define  CAN_F12R2_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6509 #define  CAN_F12R2_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6510 #define  CAN_F12R2_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6511 #define  CAN_F12R2_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6512 #define  CAN_F12R2_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6513 #define  CAN_F12R2_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6514 #define  CAN_F12R2_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6515 #define  CAN_F12R2_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6516 #define  CAN_F12R2_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6517 #define  CAN_F12R2_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6518 #define  CAN_F12R2_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6519 #define  CAN_F12R2_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6520 #define  CAN_F12R2_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6521 #define  CAN_F12R2_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6522 #define  CAN_F12R2_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6523 #define  CAN_F12R2_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6524 #define  CAN_F12R2_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6525 \r
6526 /*******************  Bit definition for CAN_F13R2 register  ******************/\r
6527 #define  CAN_F13R2_FB0                       ((uint32_t)0x00000001)        /*!<Filter bit 0 */\r
6528 #define  CAN_F13R2_FB1                       ((uint32_t)0x00000002)        /*!<Filter bit 1 */\r
6529 #define  CAN_F13R2_FB2                       ((uint32_t)0x00000004)        /*!<Filter bit 2 */\r
6530 #define  CAN_F13R2_FB3                       ((uint32_t)0x00000008)        /*!<Filter bit 3 */\r
6531 #define  CAN_F13R2_FB4                       ((uint32_t)0x00000010)        /*!<Filter bit 4 */\r
6532 #define  CAN_F13R2_FB5                       ((uint32_t)0x00000020)        /*!<Filter bit 5 */\r
6533 #define  CAN_F13R2_FB6                       ((uint32_t)0x00000040)        /*!<Filter bit 6 */\r
6534 #define  CAN_F13R2_FB7                       ((uint32_t)0x00000080)        /*!<Filter bit 7 */\r
6535 #define  CAN_F13R2_FB8                       ((uint32_t)0x00000100)        /*!<Filter bit 8 */\r
6536 #define  CAN_F13R2_FB9                       ((uint32_t)0x00000200)        /*!<Filter bit 9 */\r
6537 #define  CAN_F13R2_FB10                      ((uint32_t)0x00000400)        /*!<Filter bit 10 */\r
6538 #define  CAN_F13R2_FB11                      ((uint32_t)0x00000800)        /*!<Filter bit 11 */\r
6539 #define  CAN_F13R2_FB12                      ((uint32_t)0x00001000)        /*!<Filter bit 12 */\r
6540 #define  CAN_F13R2_FB13                      ((uint32_t)0x00002000)        /*!<Filter bit 13 */\r
6541 #define  CAN_F13R2_FB14                      ((uint32_t)0x00004000)        /*!<Filter bit 14 */\r
6542 #define  CAN_F13R2_FB15                      ((uint32_t)0x00008000)        /*!<Filter bit 15 */\r
6543 #define  CAN_F13R2_FB16                      ((uint32_t)0x00010000)        /*!<Filter bit 16 */\r
6544 #define  CAN_F13R2_FB17                      ((uint32_t)0x00020000)        /*!<Filter bit 17 */\r
6545 #define  CAN_F13R2_FB18                      ((uint32_t)0x00040000)        /*!<Filter bit 18 */\r
6546 #define  CAN_F13R2_FB19                      ((uint32_t)0x00080000)        /*!<Filter bit 19 */\r
6547 #define  CAN_F13R2_FB20                      ((uint32_t)0x00100000)        /*!<Filter bit 20 */\r
6548 #define  CAN_F13R2_FB21                      ((uint32_t)0x00200000)        /*!<Filter bit 21 */\r
6549 #define  CAN_F13R2_FB22                      ((uint32_t)0x00400000)        /*!<Filter bit 22 */\r
6550 #define  CAN_F13R2_FB23                      ((uint32_t)0x00800000)        /*!<Filter bit 23 */\r
6551 #define  CAN_F13R2_FB24                      ((uint32_t)0x01000000)        /*!<Filter bit 24 */\r
6552 #define  CAN_F13R2_FB25                      ((uint32_t)0x02000000)        /*!<Filter bit 25 */\r
6553 #define  CAN_F13R2_FB26                      ((uint32_t)0x04000000)        /*!<Filter bit 26 */\r
6554 #define  CAN_F13R2_FB27                      ((uint32_t)0x08000000)        /*!<Filter bit 27 */\r
6555 #define  CAN_F13R2_FB28                      ((uint32_t)0x10000000)        /*!<Filter bit 28 */\r
6556 #define  CAN_F13R2_FB29                      ((uint32_t)0x20000000)        /*!<Filter bit 29 */\r
6557 #define  CAN_F13R2_FB30                      ((uint32_t)0x40000000)        /*!<Filter bit 30 */\r
6558 #define  CAN_F13R2_FB31                      ((uint32_t)0x80000000)        /*!<Filter bit 31 */\r
6559 \r
6560 /******************************************************************************/\r
6561 /*                                                                            */\r
6562 /*                        Serial Peripheral Interface                         */\r
6563 /*                                                                            */\r
6564 /******************************************************************************/\r
6565 \r
6566 /*******************  Bit definition for SPI_CR1 register  ********************/\r
6567 #define  SPI_CR1_CPHA                        ((uint16_t)0x0001)            /*!<Clock Phase */\r
6568 #define  SPI_CR1_CPOL                        ((uint16_t)0x0002)            /*!<Clock Polarity */\r
6569 #define  SPI_CR1_MSTR                        ((uint16_t)0x0004)            /*!<Master Selection */\r
6570 \r
6571 #define  SPI_CR1_BR                          ((uint16_t)0x0038)            /*!<BR[2:0] bits (Baud Rate Control) */\r
6572 #define  SPI_CR1_BR_0                        ((uint16_t)0x0008)            /*!<Bit 0 */\r
6573 #define  SPI_CR1_BR_1                        ((uint16_t)0x0010)            /*!<Bit 1 */\r
6574 #define  SPI_CR1_BR_2                        ((uint16_t)0x0020)            /*!<Bit 2 */\r
6575 \r
6576 #define  SPI_CR1_SPE                         ((uint16_t)0x0040)            /*!<SPI Enable */\r
6577 #define  SPI_CR1_LSBFIRST                    ((uint16_t)0x0080)            /*!<Frame Format */\r
6578 #define  SPI_CR1_SSI                         ((uint16_t)0x0100)            /*!<Internal slave select */\r
6579 #define  SPI_CR1_SSM                         ((uint16_t)0x0200)            /*!<Software slave management */\r
6580 #define  SPI_CR1_RXONLY                      ((uint16_t)0x0400)            /*!<Receive only */\r
6581 #define  SPI_CR1_DFF                         ((uint16_t)0x0800)            /*!<Data Frame Format */\r
6582 #define  SPI_CR1_CRCNEXT                     ((uint16_t)0x1000)            /*!<Transmit CRC next */\r
6583 #define  SPI_CR1_CRCEN                       ((uint16_t)0x2000)            /*!<Hardware CRC calculation enable */\r
6584 #define  SPI_CR1_BIDIOE                      ((uint16_t)0x4000)            /*!<Output enable in bidirectional mode */\r
6585 #define  SPI_CR1_BIDIMODE                    ((uint16_t)0x8000)            /*!<Bidirectional data mode enable */\r
6586 \r
6587 /*******************  Bit definition for SPI_CR2 register  ********************/\r
6588 #define  SPI_CR2_RXDMAEN                     ((uint8_t)0x01)               /*!<Rx Buffer DMA Enable */\r
6589 #define  SPI_CR2_TXDMAEN                     ((uint8_t)0x02)               /*!<Tx Buffer DMA Enable */\r
6590 #define  SPI_CR2_SSOE                        ((uint8_t)0x04)               /*!<SS Output Enable */\r
6591 #define  SPI_CR2_ERRIE                       ((uint8_t)0x20)               /*!<Error Interrupt Enable */\r
6592 #define  SPI_CR2_RXNEIE                      ((uint8_t)0x40)               /*!<RX buffer Not Empty Interrupt Enable */\r
6593 #define  SPI_CR2_TXEIE                       ((uint8_t)0x80)               /*!<Tx buffer Empty Interrupt Enable */\r
6594 \r
6595 /********************  Bit definition for SPI_SR register  ********************/\r
6596 #define  SPI_SR_RXNE                         ((uint8_t)0x01)               /*!<Receive buffer Not Empty */\r
6597 #define  SPI_SR_TXE                          ((uint8_t)0x02)               /*!<Transmit buffer Empty */\r
6598 #define  SPI_SR_CHSIDE                       ((uint8_t)0x04)               /*!<Channel side */\r
6599 #define  SPI_SR_UDR                          ((uint8_t)0x08)               /*!<Underrun flag */\r
6600 #define  SPI_SR_CRCERR                       ((uint8_t)0x10)               /*!<CRC Error flag */\r
6601 #define  SPI_SR_MODF                         ((uint8_t)0x20)               /*!<Mode fault */\r
6602 #define  SPI_SR_OVR                          ((uint8_t)0x40)               /*!<Overrun flag */\r
6603 #define  SPI_SR_BSY                          ((uint8_t)0x80)               /*!<Busy flag */\r
6604 \r
6605 /********************  Bit definition for SPI_DR register  ********************/\r
6606 #define  SPI_DR_DR                           ((uint16_t)0xFFFF)            /*!<Data Register */\r
6607 \r
6608 /*******************  Bit definition for SPI_CRCPR register  ******************/\r
6609 #define  SPI_CRCPR_CRCPOLY                   ((uint16_t)0xFFFF)            /*!<CRC polynomial register */\r
6610 \r
6611 /******************  Bit definition for SPI_RXCRCR register  ******************/\r
6612 #define  SPI_RXCRCR_RXCRC                    ((uint16_t)0xFFFF)            /*!<Rx CRC Register */\r
6613 \r
6614 /******************  Bit definition for SPI_TXCRCR register  ******************/\r
6615 #define  SPI_TXCRCR_TXCRC                    ((uint16_t)0xFFFF)            /*!<Tx CRC Register */\r
6616 \r
6617 /******************  Bit definition for SPI_I2SCFGR register  *****************/\r
6618 #define  SPI_I2SCFGR_CHLEN                   ((uint16_t)0x0001)            /*!<Channel length (number of bits per audio channel) */\r
6619 \r
6620 #define  SPI_I2SCFGR_DATLEN                  ((uint16_t)0x0006)            /*!<DATLEN[1:0] bits (Data length to be transferred) */\r
6621 #define  SPI_I2SCFGR_DATLEN_0                ((uint16_t)0x0002)            /*!<Bit 0 */\r
6622 #define  SPI_I2SCFGR_DATLEN_1                ((uint16_t)0x0004)            /*!<Bit 1 */\r
6623 \r
6624 #define  SPI_I2SCFGR_CKPOL                   ((uint16_t)0x0008)            /*!<steady state clock polarity */\r
6625 \r
6626 #define  SPI_I2SCFGR_I2SSTD                  ((uint16_t)0x0030)            /*!<I2SSTD[1:0] bits (I2S standard selection) */\r
6627 #define  SPI_I2SCFGR_I2SSTD_0                ((uint16_t)0x0010)            /*!<Bit 0 */\r
6628 #define  SPI_I2SCFGR_I2SSTD_1                ((uint16_t)0x0020)            /*!<Bit 1 */\r
6629 \r
6630 #define  SPI_I2SCFGR_PCMSYNC                 ((uint16_t)0x0080)            /*!<PCM frame synchronization */\r
6631 \r
6632 #define  SPI_I2SCFGR_I2SCFG                  ((uint16_t)0x0300)            /*!<I2SCFG[1:0] bits (I2S configuration mode) */\r
6633 #define  SPI_I2SCFGR_I2SCFG_0                ((uint16_t)0x0100)            /*!<Bit 0 */\r
6634 #define  SPI_I2SCFGR_I2SCFG_1                ((uint16_t)0x0200)            /*!<Bit 1 */\r
6635 \r
6636 #define  SPI_I2SCFGR_I2SE                    ((uint16_t)0x0400)            /*!<I2S Enable */\r
6637 #define  SPI_I2SCFGR_I2SMOD                  ((uint16_t)0x0800)            /*!<I2S mode selection */\r
6638 \r
6639 /******************  Bit definition for SPI_I2SPR register  *******************/\r
6640 #define  SPI_I2SPR_I2SDIV                    ((uint16_t)0x00FF)            /*!<I2S Linear prescaler */\r
6641 #define  SPI_I2SPR_ODD                       ((uint16_t)0x0100)            /*!<Odd factor for the prescaler */\r
6642 #define  SPI_I2SPR_MCKOE                     ((uint16_t)0x0200)            /*!<Master Clock Output Enable */\r
6643 \r
6644 /******************************************************************************/\r
6645 /*                                                                            */\r
6646 /*                      Inter-integrated Circuit Interface                    */\r
6647 /*                                                                            */\r
6648 /******************************************************************************/\r
6649 \r
6650 /*******************  Bit definition for I2C_CR1 register  ********************/\r
6651 #define  I2C_CR1_PE                          ((uint16_t)0x0001)            /*!<Peripheral Enable */\r
6652 #define  I2C_CR1_SMBUS                       ((uint16_t)0x0002)            /*!<SMBus Mode */\r
6653 #define  I2C_CR1_SMBTYPE                     ((uint16_t)0x0008)            /*!<SMBus Type */\r
6654 #define  I2C_CR1_ENARP                       ((uint16_t)0x0010)            /*!<ARP Enable */\r
6655 #define  I2C_CR1_ENPEC                       ((uint16_t)0x0020)            /*!<PEC Enable */\r
6656 #define  I2C_CR1_ENGC                        ((uint16_t)0x0040)            /*!<General Call Enable */\r
6657 #define  I2C_CR1_NOSTRETCH                   ((uint16_t)0x0080)            /*!<Clock Stretching Disable (Slave mode) */\r
6658 #define  I2C_CR1_START                       ((uint16_t)0x0100)            /*!<Start Generation */\r
6659 #define  I2C_CR1_STOP                        ((uint16_t)0x0200)            /*!<Stop Generation */\r
6660 #define  I2C_CR1_ACK                         ((uint16_t)0x0400)            /*!<Acknowledge Enable */\r
6661 #define  I2C_CR1_POS                         ((uint16_t)0x0800)            /*!<Acknowledge/PEC Position (for data reception) */\r
6662 #define  I2C_CR1_PEC                         ((uint16_t)0x1000)            /*!<Packet Error Checking */\r
6663 #define  I2C_CR1_ALERT                       ((uint16_t)0x2000)            /*!<SMBus Alert */\r
6664 #define  I2C_CR1_SWRST                       ((uint16_t)0x8000)            /*!<Software Reset */\r
6665 \r
6666 /*******************  Bit definition for I2C_CR2 register  ********************/\r
6667 #define  I2C_CR2_FREQ                        ((uint16_t)0x003F)            /*!<FREQ[5:0] bits (Peripheral Clock Frequency) */\r
6668 #define  I2C_CR2_FREQ_0                      ((uint16_t)0x0001)            /*!<Bit 0 */\r
6669 #define  I2C_CR2_FREQ_1                      ((uint16_t)0x0002)            /*!<Bit 1 */\r
6670 #define  I2C_CR2_FREQ_2                      ((uint16_t)0x0004)            /*!<Bit 2 */\r
6671 #define  I2C_CR2_FREQ_3                      ((uint16_t)0x0008)            /*!<Bit 3 */\r
6672 #define  I2C_CR2_FREQ_4                      ((uint16_t)0x0010)            /*!<Bit 4 */\r
6673 #define  I2C_CR2_FREQ_5                      ((uint16_t)0x0020)            /*!<Bit 5 */\r
6674 \r
6675 #define  I2C_CR2_ITERREN                     ((uint16_t)0x0100)            /*!<Error Interrupt Enable */\r
6676 #define  I2C_CR2_ITEVTEN                     ((uint16_t)0x0200)            /*!<Event Interrupt Enable */\r
6677 #define  I2C_CR2_ITBUFEN                     ((uint16_t)0x0400)            /*!<Buffer Interrupt Enable */\r
6678 #define  I2C_CR2_DMAEN                       ((uint16_t)0x0800)            /*!<DMA Requests Enable */\r
6679 #define  I2C_CR2_LAST                        ((uint16_t)0x1000)            /*!<DMA Last Transfer */\r
6680 \r
6681 /*******************  Bit definition for I2C_OAR1 register  *******************/\r
6682 #define  I2C_OAR1_ADD1_7                     ((uint16_t)0x00FE)            /*!<Interface Address */\r
6683 #define  I2C_OAR1_ADD8_9                     ((uint16_t)0x0300)            /*!<Interface Address */\r
6684 \r
6685 #define  I2C_OAR1_ADD0                       ((uint16_t)0x0001)            /*!<Bit 0 */\r
6686 #define  I2C_OAR1_ADD1                       ((uint16_t)0x0002)            /*!<Bit 1 */\r
6687 #define  I2C_OAR1_ADD2                       ((uint16_t)0x0004)            /*!<Bit 2 */\r
6688 #define  I2C_OAR1_ADD3                       ((uint16_t)0x0008)            /*!<Bit 3 */\r
6689 #define  I2C_OAR1_ADD4                       ((uint16_t)0x0010)            /*!<Bit 4 */\r
6690 #define  I2C_OAR1_ADD5                       ((uint16_t)0x0020)            /*!<Bit 5 */\r
6691 #define  I2C_OAR1_ADD6                       ((uint16_t)0x0040)            /*!<Bit 6 */\r
6692 #define  I2C_OAR1_ADD7                       ((uint16_t)0x0080)            /*!<Bit 7 */\r
6693 #define  I2C_OAR1_ADD8                       ((uint16_t)0x0100)            /*!<Bit 8 */\r
6694 #define  I2C_OAR1_ADD9                       ((uint16_t)0x0200)            /*!<Bit 9 */\r
6695 \r
6696 #define  I2C_OAR1_ADDMODE                    ((uint16_t)0x8000)            /*!<Addressing Mode (Slave mode) */\r
6697 \r
6698 /*******************  Bit definition for I2C_OAR2 register  *******************/\r
6699 #define  I2C_OAR2_ENDUAL                     ((uint8_t)0x01)               /*!<Dual addressing mode enable */\r
6700 #define  I2C_OAR2_ADD2                       ((uint8_t)0xFE)               /*!<Interface address */\r
6701 \r
6702 /********************  Bit definition for I2C_DR register  ********************/\r
6703 #define  I2C_DR_DR                           ((uint8_t)0xFF)               /*!<8-bit Data Register */\r
6704 \r
6705 /*******************  Bit definition for I2C_SR1 register  ********************/\r
6706 #define  I2C_SR1_SB                          ((uint16_t)0x0001)            /*!<Start Bit (Master mode) */\r
6707 #define  I2C_SR1_ADDR                        ((uint16_t)0x0002)            /*!<Address sent (master mode)/matched (slave mode) */\r
6708 #define  I2C_SR1_BTF                         ((uint16_t)0x0004)            /*!<Byte Transfer Finished */\r
6709 #define  I2C_SR1_ADD10                       ((uint16_t)0x0008)            /*!<10-bit header sent (Master mode) */\r
6710 #define  I2C_SR1_STOPF                       ((uint16_t)0x0010)            /*!<Stop detection (Slave mode) */\r
6711 #define  I2C_SR1_RXNE                        ((uint16_t)0x0040)            /*!<Data Register not Empty (receivers) */\r
6712 #define  I2C_SR1_TXE                         ((uint16_t)0x0080)            /*!<Data Register Empty (transmitters) */\r
6713 #define  I2C_SR1_BERR                        ((uint16_t)0x0100)            /*!<Bus Error */\r
6714 #define  I2C_SR1_ARLO                        ((uint16_t)0x0200)            /*!<Arbitration Lost (master mode) */\r
6715 #define  I2C_SR1_AF                          ((uint16_t)0x0400)            /*!<Acknowledge Failure */\r
6716 #define  I2C_SR1_OVR                         ((uint16_t)0x0800)            /*!<Overrun/Underrun */\r
6717 #define  I2C_SR1_PECERR                      ((uint16_t)0x1000)            /*!<PEC Error in reception */\r
6718 #define  I2C_SR1_TIMEOUT                     ((uint16_t)0x4000)            /*!<Timeout or Tlow Error */\r
6719 #define  I2C_SR1_SMBALERT                    ((uint16_t)0x8000)            /*!<SMBus Alert */\r
6720 \r
6721 /*******************  Bit definition for I2C_SR2 register  ********************/\r
6722 #define  I2C_SR2_MSL                         ((uint16_t)0x0001)            /*!<Master/Slave */\r
6723 #define  I2C_SR2_BUSY                        ((uint16_t)0x0002)            /*!<Bus Busy */\r
6724 #define  I2C_SR2_TRA                         ((uint16_t)0x0004)            /*!<Transmitter/Receiver */\r
6725 #define  I2C_SR2_GENCALL                     ((uint16_t)0x0010)            /*!<General Call Address (Slave mode) */\r
6726 #define  I2C_SR2_SMBDEFAULT                  ((uint16_t)0x0020)            /*!<SMBus Device Default Address (Slave mode) */\r
6727 #define  I2C_SR2_SMBHOST                     ((uint16_t)0x0040)            /*!<SMBus Host Header (Slave mode) */\r
6728 #define  I2C_SR2_DUALF                       ((uint16_t)0x0080)            /*!<Dual Flag (Slave mode) */\r
6729 #define  I2C_SR2_PEC                         ((uint16_t)0xFF00)            /*!<Packet Error Checking Register */\r
6730 \r
6731 /*******************  Bit definition for I2C_CCR register  ********************/\r
6732 #define  I2C_CCR_CCR                         ((uint16_t)0x0FFF)            /*!<Clock Control Register in Fast/Standard mode (Master mode) */\r
6733 #define  I2C_CCR_DUTY                        ((uint16_t)0x4000)            /*!<Fast Mode Duty Cycle */\r
6734 #define  I2C_CCR_FS                          ((uint16_t)0x8000)            /*!<I2C Master Mode Selection */\r
6735 \r
6736 /******************  Bit definition for I2C_TRISE register  *******************/\r
6737 #define  I2C_TRISE_TRISE                     ((uint8_t)0x3F)               /*!<Maximum Rise Time in Fast/Standard mode (Master mode) */\r
6738 \r
6739 /******************************************************************************/\r
6740 /*                                                                            */\r
6741 /*         Universal Synchronous Asynchronous Receiver Transmitter            */\r
6742 /*                                                                            */\r
6743 /******************************************************************************/\r
6744 \r
6745 /*******************  Bit definition for USART_SR register  *******************/\r
6746 #define  USART_SR_PE                         ((uint16_t)0x0001)            /*!<Parity Error */\r
6747 #define  USART_SR_FE                         ((uint16_t)0x0002)            /*!<Framing Error */\r
6748 #define  USART_SR_NE                         ((uint16_t)0x0004)            /*!<Noise Error Flag */\r
6749 #define  USART_SR_ORE                        ((uint16_t)0x0008)            /*!<OverRun Error */\r
6750 #define  USART_SR_IDLE                       ((uint16_t)0x0010)            /*!<IDLE line detected */\r
6751 #define  USART_SR_RXNE                       ((uint16_t)0x0020)            /*!<Read Data Register Not Empty */\r
6752 #define  USART_SR_TC                         ((uint16_t)0x0040)            /*!<Transmission Complete */\r
6753 #define  USART_SR_TXE                        ((uint16_t)0x0080)            /*!<Transmit Data Register Empty */\r
6754 #define  USART_SR_LBD                        ((uint16_t)0x0100)            /*!<LIN Break Detection Flag */\r
6755 #define  USART_SR_CTS                        ((uint16_t)0x0200)            /*!<CTS Flag */\r
6756 \r
6757 /*******************  Bit definition for USART_DR register  *******************/\r
6758 #define  USART_DR_DR                         ((uint16_t)0x01FF)            /*!<Data value */\r
6759 \r
6760 /******************  Bit definition for USART_BRR register  *******************/\r
6761 #define  USART_BRR_DIV_Fraction              ((uint16_t)0x000F)            /*!<Fraction of USARTDIV */\r
6762 #define  USART_BRR_DIV_Mantissa              ((uint16_t)0xFFF0)            /*!<Mantissa of USARTDIV */\r
6763 \r
6764 /******************  Bit definition for USART_CR1 register  *******************/\r
6765 #define  USART_CR1_SBK                       ((uint16_t)0x0001)            /*!<Send Break */\r
6766 #define  USART_CR1_RWU                       ((uint16_t)0x0002)            /*!<Receiver wakeup */\r
6767 #define  USART_CR1_RE                        ((uint16_t)0x0004)            /*!<Receiver Enable */\r
6768 #define  USART_CR1_TE                        ((uint16_t)0x0008)            /*!<Transmitter Enable */\r
6769 #define  USART_CR1_IDLEIE                    ((uint16_t)0x0010)            /*!<IDLE Interrupt Enable */\r
6770 #define  USART_CR1_RXNEIE                    ((uint16_t)0x0020)            /*!<RXNE Interrupt Enable */\r
6771 #define  USART_CR1_TCIE                      ((uint16_t)0x0040)            /*!<Transmission Complete Interrupt Enable */\r
6772 #define  USART_CR1_TXEIE                     ((uint16_t)0x0080)            /*!<PE Interrupt Enable */\r
6773 #define  USART_CR1_PEIE                      ((uint16_t)0x0100)            /*!<PE Interrupt Enable */\r
6774 #define  USART_CR1_PS                        ((uint16_t)0x0200)            /*!<Parity Selection */\r
6775 #define  USART_CR1_PCE                       ((uint16_t)0x0400)            /*!<Parity Control Enable */\r
6776 #define  USART_CR1_WAKE                      ((uint16_t)0x0800)            /*!<Wakeup method */\r
6777 #define  USART_CR1_M                         ((uint16_t)0x1000)            /*!<Word length */\r
6778 #define  USART_CR1_UE                        ((uint16_t)0x2000)            /*!<USART Enable */\r
6779 \r
6780 /******************  Bit definition for USART_CR2 register  *******************/\r
6781 #define  USART_CR2_ADD                       ((uint16_t)0x000F)            /*!<Address of the USART node */\r
6782 #define  USART_CR2_LBDL                      ((uint16_t)0x0020)            /*!<LIN Break Detection Length */\r
6783 #define  USART_CR2_LBDIE                     ((uint16_t)0x0040)            /*!<LIN Break Detection Interrupt Enable */\r
6784 #define  USART_CR2_LBCL                      ((uint16_t)0x0100)            /*!<Last Bit Clock pulse */\r
6785 #define  USART_CR2_CPHA                      ((uint16_t)0x0200)            /*!<Clock Phase */\r
6786 #define  USART_CR2_CPOL                      ((uint16_t)0x0400)            /*!<Clock Polarity */\r
6787 #define  USART_CR2_CLKEN                     ((uint16_t)0x0800)            /*!<Clock Enable */\r
6788 \r
6789 #define  USART_CR2_STOP                      ((uint16_t)0x3000)            /*!<STOP[1:0] bits (STOP bits) */\r
6790 #define  USART_CR2_STOP_0                    ((uint16_t)0x1000)            /*!<Bit 0 */\r
6791 #define  USART_CR2_STOP_1                    ((uint16_t)0x2000)            /*!<Bit 1 */\r
6792 \r
6793 #define  USART_CR2_LINEN                     ((uint16_t)0x4000)            /*!<LIN mode enable */\r
6794 \r
6795 /******************  Bit definition for USART_CR3 register  *******************/\r
6796 #define  USART_CR3_EIE                       ((uint16_t)0x0001)            /*!<Error Interrupt Enable */\r
6797 #define  USART_CR3_IREN                      ((uint16_t)0x0002)            /*!<IrDA mode Enable */\r
6798 #define  USART_CR3_IRLP                      ((uint16_t)0x0004)            /*!<IrDA Low-Power */\r
6799 #define  USART_CR3_HDSEL                     ((uint16_t)0x0008)            /*!<Half-Duplex Selection */\r
6800 #define  USART_CR3_NACK                      ((uint16_t)0x0010)            /*!<Smartcard NACK enable */\r
6801 #define  USART_CR3_SCEN                      ((uint16_t)0x0020)            /*!<Smartcard mode enable */\r
6802 #define  USART_CR3_DMAR                      ((uint16_t)0x0040)            /*!<DMA Enable Receiver */\r
6803 #define  USART_CR3_DMAT                      ((uint16_t)0x0080)            /*!<DMA Enable Transmitter */\r
6804 #define  USART_CR3_RTSE                      ((uint16_t)0x0100)            /*!<RTS Enable */\r
6805 #define  USART_CR3_CTSE                      ((uint16_t)0x0200)            /*!<CTS Enable */\r
6806 #define  USART_CR3_CTSIE                     ((uint16_t)0x0400)            /*!<CTS Interrupt Enable */\r
6807 \r
6808 /******************  Bit definition for USART_GTPR register  ******************/\r
6809 #define  USART_GTPR_PSC                      ((uint16_t)0x00FF)            /*!<PSC[7:0] bits (Prescaler value) */\r
6810 #define  USART_GTPR_PSC_0                    ((uint16_t)0x0001)            /*!<Bit 0 */\r
6811 #define  USART_GTPR_PSC_1                    ((uint16_t)0x0002)            /*!<Bit 1 */\r
6812 #define  USART_GTPR_PSC_2                    ((uint16_t)0x0004)            /*!<Bit 2 */\r
6813 #define  USART_GTPR_PSC_3                    ((uint16_t)0x0008)            /*!<Bit 3 */\r
6814 #define  USART_GTPR_PSC_4                    ((uint16_t)0x0010)            /*!<Bit 4 */\r
6815 #define  USART_GTPR_PSC_5                    ((uint16_t)0x0020)            /*!<Bit 5 */\r
6816 #define  USART_GTPR_PSC_6                    ((uint16_t)0x0040)            /*!<Bit 6 */\r
6817 #define  USART_GTPR_PSC_7                    ((uint16_t)0x0080)            /*!<Bit 7 */\r
6818 \r
6819 #define  USART_GTPR_GT                       ((uint16_t)0xFF00)            /*!<Guard time value */\r
6820 \r
6821 /******************************************************************************/\r
6822 /*                                                                            */\r
6823 /*                                 Debug MCU                                  */\r
6824 /*                                                                            */\r
6825 /******************************************************************************/\r
6826 \r
6827 /****************  Bit definition for DBGMCU_IDCODE register  *****************/\r
6828 #define  DBGMCU_IDCODE_DEV_ID                ((uint32_t)0x00000FFF)        /*!<Device Identifier */\r
6829 \r
6830 #define  DBGMCU_IDCODE_REV_ID                ((uint32_t)0xFFFF0000)        /*!<REV_ID[15:0] bits (Revision Identifier) */\r
6831 #define  DBGMCU_IDCODE_REV_ID_0              ((uint32_t)0x00010000)        /*!<Bit 0 */\r
6832 #define  DBGMCU_IDCODE_REV_ID_1              ((uint32_t)0x00020000)        /*!<Bit 1 */\r
6833 #define  DBGMCU_IDCODE_REV_ID_2              ((uint32_t)0x00040000)        /*!<Bit 2 */\r
6834 #define  DBGMCU_IDCODE_REV_ID_3              ((uint32_t)0x00080000)        /*!<Bit 3 */\r
6835 #define  DBGMCU_IDCODE_REV_ID_4              ((uint32_t)0x00100000)        /*!<Bit 4 */\r
6836 #define  DBGMCU_IDCODE_REV_ID_5              ((uint32_t)0x00200000)        /*!<Bit 5 */\r
6837 #define  DBGMCU_IDCODE_REV_ID_6              ((uint32_t)0x00400000)        /*!<Bit 6 */\r
6838 #define  DBGMCU_IDCODE_REV_ID_7              ((uint32_t)0x00800000)        /*!<Bit 7 */\r
6839 #define  DBGMCU_IDCODE_REV_ID_8              ((uint32_t)0x01000000)        /*!<Bit 8 */\r
6840 #define  DBGMCU_IDCODE_REV_ID_9              ((uint32_t)0x02000000)        /*!<Bit 9 */\r
6841 #define  DBGMCU_IDCODE_REV_ID_10             ((uint32_t)0x04000000)        /*!<Bit 10 */\r
6842 #define  DBGMCU_IDCODE_REV_ID_11             ((uint32_t)0x08000000)        /*!<Bit 11 */\r
6843 #define  DBGMCU_IDCODE_REV_ID_12             ((uint32_t)0x10000000)        /*!<Bit 12 */\r
6844 #define  DBGMCU_IDCODE_REV_ID_13             ((uint32_t)0x20000000)        /*!<Bit 13 */\r
6845 #define  DBGMCU_IDCODE_REV_ID_14             ((uint32_t)0x40000000)        /*!<Bit 14 */\r
6846 #define  DBGMCU_IDCODE_REV_ID_15             ((uint32_t)0x80000000)        /*!<Bit 15 */\r
6847 \r
6848 /******************  Bit definition for DBGMCU_CR register  *******************/\r
6849 #define  DBGMCU_CR_DBG_SLEEP                 ((uint32_t)0x00000001)        /*!<Debug Sleep Mode */\r
6850 #define  DBGMCU_CR_DBG_STOP                  ((uint32_t)0x00000002)        /*!<Debug Stop Mode */\r
6851 #define  DBGMCU_CR_DBG_STANDBY               ((uint32_t)0x00000004)        /*!<Debug Standby mode */\r
6852 #define  DBGMCU_CR_TRACE_IOEN                ((uint32_t)0x00000020)        /*!<Trace Pin Assignment Control */\r
6853 \r
6854 #define  DBGMCU_CR_TRACE_MODE                ((uint32_t)0x000000C0)        /*!<TRACE_MODE[1:0] bits (Trace Pin Assignment Control) */\r
6855 #define  DBGMCU_CR_TRACE_MODE_0              ((uint32_t)0x00000040)        /*!<Bit 0 */\r
6856 #define  DBGMCU_CR_TRACE_MODE_1              ((uint32_t)0x00000080)        /*!<Bit 1 */\r
6857 \r
6858 #define  DBGMCU_CR_DBG_IWDG_STOP             ((uint32_t)0x00000100)        /*!<Debug Independent Watchdog stopped when Core is halted */\r
6859 #define  DBGMCU_CR_DBG_WWDG_STOP             ((uint32_t)0x00000200)        /*!<Debug Window Watchdog stopped when Core is halted */\r
6860 #define  DBGMCU_CR_DBG_TIM1_STOP             ((uint32_t)0x00000400)        /*!<TIM1 counter stopped when core is halted */\r
6861 #define  DBGMCU_CR_DBG_TIM2_STOP             ((uint32_t)0x00000800)        /*!<TIM2 counter stopped when core is halted */\r
6862 #define  DBGMCU_CR_DBG_TIM3_STOP             ((uint32_t)0x00001000)        /*!<TIM3 counter stopped when core is halted */\r
6863 #define  DBGMCU_CR_DBG_TIM4_STOP             ((uint32_t)0x00002000)        /*!<TIM4 counter stopped when core is halted */\r
6864 #define  DBGMCU_CR_DBG_CAN_STOP              ((uint32_t)0x00004000)        /*!<Debug CAN stopped when Core is halted */\r
6865 #define  DBGMCU_CR_DBG_I2C1_SMBUS_TIMEOUT    ((uint32_t)0x00008000)        /*!<SMBUS timeout mode stopped when Core is halted */\r
6866 #define  DBGMCU_CR_DBG_I2C2_SMBUS_TIMEOUT    ((uint32_t)0x00010000)        /*!<SMBUS timeout mode stopped when Core is halted */\r
6867 #define  DBGMCU_CR_DBG_TIM5_STOP             ((uint32_t)0x00020000)        /*!<TIM5 counter stopped when core is halted */\r
6868 #define  DBGMCU_CR_DBG_TIM6_STOP             ((uint32_t)0x00040000)        /*!<TIM6 counter stopped when core is halted */\r
6869 #define  DBGMCU_CR_DBG_TIM7_STOP             ((uint32_t)0x00080000)        /*!<TIM7 counter stopped when core is halted */\r
6870 #define  DBGMCU_CR_DBG_TIM8_STOP             ((uint32_t)0x00100000)        /*!<TIM8 counter stopped when core is halted */\r
6871 \r
6872 /******************************************************************************/\r
6873 /*                                                                            */\r
6874 /*                      FLASH and Option Bytes Registers                      */\r
6875 /*                                                                            */\r
6876 /******************************************************************************/\r
6877 \r
6878 /*******************  Bit definition for FLASH_ACR register  ******************/\r
6879 #define  FLASH_ACR_LATENCY                   ((uint8_t)0x03)               /*!<LATENCY[2:0] bits (Latency) */\r
6880 #define  FLASH_ACR_LATENCY_0                 ((uint8_t)0x00)               /*!<Bit 0 */\r
6881 #define  FLASH_ACR_LATENCY_1                 ((uint8_t)0x01)               /*!<Bit 0 */\r
6882 #define  FLASH_ACR_LATENCY_2                 ((uint8_t)0x02)               /*!<Bit 1 */\r
6883 \r
6884 #define  FLASH_ACR_HLFCYA                    ((uint8_t)0x08)               /*!<Flash Half Cycle Access Enable */\r
6885 #define  FLASH_ACR_PRFTBE                    ((uint8_t)0x10)               /*!<Prefetch Buffer Enable */\r
6886 #define  FLASH_ACR_PRFTBS                    ((uint8_t)0x20)               /*!<Prefetch Buffer Status */\r
6887 \r
6888 /******************  Bit definition for FLASH_KEYR register  ******************/\r
6889 #define  FLASH_KEYR_FKEYR                    ((uint32_t)0xFFFFFFFF)        /*!<FPEC Key */\r
6890 \r
6891 /*****************  Bit definition for FLASH_OPTKEYR register  ****************/\r
6892 #define  FLASH_OPTKEYR_OPTKEYR               ((uint32_t)0xFFFFFFFF)        /*!<Option Byte Key */\r
6893 \r
6894 /******************  Bit definition for FLASH_SR register  *******************/\r
6895 #define  FLASH_SR_BSY                        ((uint8_t)0x01)               /*!<Busy */\r
6896 #define  FLASH_SR_PGERR                      ((uint8_t)0x04)               /*!<Programming Error */\r
6897 #define  FLASH_SR_WRPRTERR                   ((uint8_t)0x10)               /*!<Write Protection Error */\r
6898 #define  FLASH_SR_EOP                        ((uint8_t)0x20)               /*!<End of operation */\r
6899 \r
6900 /*******************  Bit definition for FLASH_CR register  *******************/\r
6901 #define  FLASH_CR_PG                         ((uint16_t)0x0001)            /*!<Programming */\r
6902 #define  FLASH_CR_PER                        ((uint16_t)0x0002)            /*!<Page Erase */\r
6903 #define  FLASH_CR_MER                        ((uint16_t)0x0004)            /*!<Mass Erase */\r
6904 #define  FLASH_CR_OPTPG                      ((uint16_t)0x0010)            /*!<Option Byte Programming */\r
6905 #define  FLASH_CR_OPTER                      ((uint16_t)0x0020)            /*!<Option Byte Erase */\r
6906 #define  FLASH_CR_STRT                       ((uint16_t)0x0040)            /*!<Start */\r
6907 #define  FLASH_CR_LOCK                       ((uint16_t)0x0080)            /*!<Lock */\r
6908 #define  FLASH_CR_OPTWRE                     ((uint16_t)0x0200)            /*!<Option Bytes Write Enable */\r
6909 #define  FLASH_CR_ERRIE                      ((uint16_t)0x0400)            /*!<Error Interrupt Enable */\r
6910 #define  FLASH_CR_EOPIE                      ((uint16_t)0x1000)            /*!<End of operation interrupt enable */\r
6911 \r
6912 /*******************  Bit definition for FLASH_AR register  *******************/\r
6913 #define  FLASH_AR_FAR                        ((uint32_t)0xFFFFFFFF)        /*!<Flash Address */\r
6914 \r
6915 /******************  Bit definition for FLASH_OBR register  *******************/\r
6916 #define  FLASH_OBR_OPTERR                    ((uint16_t)0x0001)            /*!<Option Byte Error */\r
6917 #define  FLASH_OBR_RDPRT                     ((uint16_t)0x0002)            /*!<Read protection */\r
6918 \r
6919 #define  FLASH_OBR_USER                      ((uint16_t)0x03FC)            /*!<User Option Bytes */\r
6920 #define  FLASH_OBR_WDG_SW                    ((uint16_t)0x0004)            /*!<WDG_SW */\r
6921 #define  FLASH_OBR_nRST_STOP                 ((uint16_t)0x0008)            /*!<nRST_STOP */\r
6922 #define  FLASH_OBR_nRST_STDBY                ((uint16_t)0x0010)            /*!<nRST_STDBY */\r
6923 #define  FLASH_OBR_Notused                   ((uint16_t)0x03E0)            /*!<Not used */\r
6924 \r
6925 /******************  Bit definition for FLASH_WRPR register  ******************/\r
6926 #define  FLASH_WRPR_WRP                        ((uint32_t)0xFFFFFFFF)        /*!<Write Protect */\r
6927 \r
6928 /*----------------------------------------------------------------------------*/\r
6929 \r
6930 /******************  Bit definition for FLASH_RDP register  *******************/\r
6931 #define  FLASH_RDP_RDP                       ((uint32_t)0x000000FF)        /*!<Read protection option byte */\r
6932 #define  FLASH_RDP_nRDP                      ((uint32_t)0x0000FF00)        /*!<Read protection complemented option byte */\r
6933 \r
6934 /******************  Bit definition for FLASH_USER register  ******************/\r
6935 #define  FLASH_USER_USER                     ((uint32_t)0x00FF0000)        /*!<User option byte */\r
6936 #define  FLASH_USER_nUSER                    ((uint32_t)0xFF000000)        /*!<User complemented option byte */\r
6937 \r
6938 /******************  Bit definition for FLASH_Data0 register  *****************/\r
6939 #define  FLASH_Data0_Data0                   ((uint32_t)0x000000FF)        /*!<User data storage option byte */\r
6940 #define  FLASH_Data0_nData0                  ((uint32_t)0x0000FF00)        /*!<User data storage complemented option byte */\r
6941 \r
6942 /******************  Bit definition for FLASH_Data1 register  *****************/\r
6943 #define  FLASH_Data1_Data1                   ((uint32_t)0x00FF0000)        /*!<User data storage option byte */\r
6944 #define  FLASH_Data1_nData1                  ((uint32_t)0xFF000000)        /*!<User data storage complemented option byte */\r
6945 \r
6946 /******************  Bit definition for FLASH_WRP0 register  ******************/\r
6947 #define  FLASH_WRP0_WRP0                     ((uint32_t)0x000000FF)        /*!<Flash memory write protection option bytes */\r
6948 #define  FLASH_WRP0_nWRP0                    ((uint32_t)0x0000FF00)        /*!<Flash memory write protection complemented option bytes */\r
6949 \r
6950 /******************  Bit definition for FLASH_WRP1 register  ******************/\r
6951 #define  FLASH_WRP1_WRP1                     ((uint32_t)0x00FF0000)        /*!<Flash memory write protection option bytes */\r
6952 #define  FLASH_WRP1_nWRP1                    ((uint32_t)0xFF000000)        /*!<Flash memory write protection complemented option bytes */\r
6953 \r
6954 /******************  Bit definition for FLASH_WRP2 register  ******************/\r
6955 #define  FLASH_WRP2_WRP2                     ((uint32_t)0x000000FF)        /*!<Flash memory write protection option bytes */\r
6956 #define  FLASH_WRP2_nWRP2                    ((uint32_t)0x0000FF00)        /*!<Flash memory write protection complemented option bytes */\r
6957 \r
6958 /******************  Bit definition for FLASH_WRP3 register  ******************/\r
6959 #define  FLASH_WRP3_WRP3                     ((uint32_t)0x00FF0000)        /*!<Flash memory write protection option bytes */\r
6960 #define  FLASH_WRP3_nWRP3                    ((uint32_t)0xFF000000)        /*!<Flash memory write protection complemented option bytes */\r
6961 \r
6962 /**\r
6963   * @}\r
6964   */\r
6965 \r
6966  /**\r
6967   * @}\r
6968   */\r
6969 \r
6970 #ifdef USE_STDPERIPH_DRIVER\r
6971   #include "stm32f10x_conf.h"\r
6972 #endif\r
6973 \r
6974 /** @addtogroup Exported_macro\r
6975   * @{\r
6976   */\r
6977 \r
6978 #define SET_BIT(REG, BIT)     ((REG) |= (BIT))\r
6979 \r
6980 #define CLEAR_BIT(REG, BIT)   ((REG) &= ~(BIT))\r
6981 \r
6982 #define READ_BIT(REG, BIT)    ((REG) & (BIT))\r
6983 \r
6984 #define CLEAR_REG(REG)        ((REG) = (0x0))\r
6985 \r
6986 #define WRITE_REG(REG, VAL)   ((REG) = (VAL))\r
6987 \r
6988 #define READ_REG(REG)         ((REG))\r
6989 \r
6990 #define MODIFY_REG(REG, CLEARMASK, SETMASK)  WRITE_REG((REG), (((READ_REG(REG)) & (~CLEARMASK)) | (SETMASK)))\r
6991 \r
6992 /**\r
6993   * @}\r
6994   */\r
6995 \r
6996 #endif /* __STM32F10x_H */\r
6997 \r
6998 /**\r
6999   * @}\r
7000   */\r
7001 \r
7002   /**\r
7003   * @}\r
7004   */\r
7005 \r
7006 /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/\r