1
1
/**
2
2
******************************************************************************
3
- * @file stm32f401xe .h
3
+ * @file stm32f401xc .h
4
4
* @author MCD Application Team
5
- * @version V2.1 .0
6
- * @date 19-June-2014
7
- * @brief CMSIS STM32F401xExx Device Peripheral Access Layer Header File.
5
+ * @version V2.3 .0
6
+ * @date 02-March-2015
7
+ * @brief CMSIS STM32F401xCxx Device Peripheral Access Layer Header File.
8
8
*
9
9
* This file contains:
10
10
* - Data structures and the address mapping for all peripherals
14
14
******************************************************************************
15
15
* @attention
16
16
*
17
- * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
17
+ * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
18
18
*
19
19
* Redistribution and use in source and binary forms, with or without modification,
20
20
* are permitted provided that the following conditions are met:
45
45
* @{
46
46
*/
47
47
48
- /** @addtogroup stm32f401xe
48
+ /** @addtogroup stm32f401xc
49
49
* @{
50
50
*/
51
51
52
- #ifndef __STM32F401xE_H
53
- #define __STM32F401xE_H
52
+ #ifndef __STM32F401xC_H
53
+ #define __STM32F401xC_H
54
54
55
55
#ifdef __cplusplus
56
56
extern "C" {
@@ -290,8 +290,7 @@ typedef struct
290
290
__IO uint32_t PUPDR ; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */
291
291
__IO uint32_t IDR ; /*!< GPIO port input data register, Address offset: 0x10 */
292
292
__IO uint32_t ODR ; /*!< GPIO port output data register, Address offset: 0x14 */
293
- __IO uint16_t BSRRL ; /*!< GPIO port bit set/reset low register, Address offset: 0x18 */
294
- __IO uint16_t BSRRH ; /*!< GPIO port bit set/reset high register, Address offset: 0x1A */
293
+ __IO uint32_t BSRR ; /*!< GPIO port bit set/reset register, Address offset: 0x18 */
295
294
__IO uint32_t LCKR ; /*!< GPIO port configuration lock register, Address offset: 0x1C */
296
295
__IO uint32_t AFR [2 ]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */
297
296
} GPIO_TypeDef ;
@@ -536,7 +535,7 @@ typedef struct
536
535
__IO uint32_t CFR ; /*!< WWDG Configuration register, Address offset: 0x04 */
537
536
__IO uint32_t SR ; /*!< WWDG Status register, Address offset: 0x08 */
538
537
} WWDG_TypeDef ;
539
-
538
+
540
539
/**
541
540
* @brief __USB_OTG_Core_register
542
541
*/
@@ -675,7 +674,7 @@ USB_OTG_HostChannelTypeDef;
675
674
#define SRAM3_BB_BASE ((uint32_t)0x22020000) /*!< SRAM3(64 KB) base address in the bit-band region */
676
675
#define PERIPH_BB_BASE ((uint32_t)0x42000000) /*!< Peripheral base address in the bit-band region */
677
676
#define BKPSRAM_BB_BASE ((uint32_t)0x42024000) /*!< Backup SRAM(4 KB) base address in the bit-band region */
678
- #define FLASH_END ((uint32_t)0x0807FFFF ) /*!< FLASH end address */
677
+ #define FLASH_END ((uint32_t)0x0803FFFF ) /*!< FLASH end address */
679
678
680
679
/* Legacy defines */
681
680
#define SRAM_BASE SRAM1_BASE
@@ -1423,6 +1422,9 @@ USB_OTG_HostChannelTypeDef;
1423
1422
#define EXTI_IMR_MR17 ((uint32_t)0x00020000) /*!< Interrupt Mask on line 17 */
1424
1423
#define EXTI_IMR_MR18 ((uint32_t)0x00040000) /*!< Interrupt Mask on line 18 */
1425
1424
#define EXTI_IMR_MR19 ((uint32_t)0x00080000) /*!< Interrupt Mask on line 19 */
1425
+ #define EXTI_IMR_MR20 ((uint32_t)0x00100000) /*!< Interrupt Mask on line 20 */
1426
+ #define EXTI_IMR_MR21 ((uint32_t)0x00200000) /*!< Interrupt Mask on line 21 */
1427
+ #define EXTI_IMR_MR22 ((uint32_t)0x00400000) /*!< Interrupt Mask on line 22 */
1426
1428
1427
1429
/******************* Bit definition for EXTI_EMR register *******************/
1428
1430
#define EXTI_EMR_MR0 ((uint32_t)0x00000001) /*!< Event Mask on line 0 */
@@ -1445,6 +1447,9 @@ USB_OTG_HostChannelTypeDef;
1445
1447
#define EXTI_EMR_MR17 ((uint32_t)0x00020000) /*!< Event Mask on line 17 */
1446
1448
#define EXTI_EMR_MR18 ((uint32_t)0x00040000) /*!< Event Mask on line 18 */
1447
1449
#define EXTI_EMR_MR19 ((uint32_t)0x00080000) /*!< Event Mask on line 19 */
1450
+ #define EXTI_EMR_MR20 ((uint32_t)0x00100000) /*!< Event Mask on line 20 */
1451
+ #define EXTI_EMR_MR21 ((uint32_t)0x00200000) /*!< Event Mask on line 21 */
1452
+ #define EXTI_EMR_MR22 ((uint32_t)0x00400000) /*!< Event Mask on line 22 */
1448
1453
1449
1454
/****************** Bit definition for EXTI_RTSR register *******************/
1450
1455
#define EXTI_RTSR_TR0 ((uint32_t)0x00000001) /*!< Rising trigger event configuration bit of line 0 */
@@ -1467,6 +1472,9 @@ USB_OTG_HostChannelTypeDef;
1467
1472
#define EXTI_RTSR_TR17 ((uint32_t)0x00020000) /*!< Rising trigger event configuration bit of line 17 */
1468
1473
#define EXTI_RTSR_TR18 ((uint32_t)0x00040000) /*!< Rising trigger event configuration bit of line 18 */
1469
1474
#define EXTI_RTSR_TR19 ((uint32_t)0x00080000) /*!< Rising trigger event configuration bit of line 19 */
1475
+ #define EXTI_RTSR_TR20 ((uint32_t)0x00100000) /*!< Rising trigger event configuration bit of line 20 */
1476
+ #define EXTI_RTSR_TR21 ((uint32_t)0x00200000) /*!< Rising trigger event configuration bit of line 21 */
1477
+ #define EXTI_RTSR_TR22 ((uint32_t)0x00400000) /*!< Rising trigger event configuration bit of line 22 */
1470
1478
1471
1479
/****************** Bit definition for EXTI_FTSR register *******************/
1472
1480
#define EXTI_FTSR_TR0 ((uint32_t)0x00000001) /*!< Falling trigger event configuration bit of line 0 */
@@ -1489,6 +1497,9 @@ USB_OTG_HostChannelTypeDef;
1489
1497
#define EXTI_FTSR_TR17 ((uint32_t)0x00020000) /*!< Falling trigger event configuration bit of line 17 */
1490
1498
#define EXTI_FTSR_TR18 ((uint32_t)0x00040000) /*!< Falling trigger event configuration bit of line 18 */
1491
1499
#define EXTI_FTSR_TR19 ((uint32_t)0x00080000) /*!< Falling trigger event configuration bit of line 19 */
1500
+ #define EXTI_FTSR_TR20 ((uint32_t)0x00100000) /*!< Falling trigger event configuration bit of line 20 */
1501
+ #define EXTI_FTSR_TR21 ((uint32_t)0x00200000) /*!< Falling trigger event configuration bit of line 21 */
1502
+ #define EXTI_FTSR_TR22 ((uint32_t)0x00400000) /*!< Falling trigger event configuration bit of line 22 */
1492
1503
1493
1504
/****************** Bit definition for EXTI_SWIER register ******************/
1494
1505
#define EXTI_SWIER_SWIER0 ((uint32_t)0x00000001) /*!< Software Interrupt on line 0 */
@@ -1511,6 +1522,9 @@ USB_OTG_HostChannelTypeDef;
1511
1522
#define EXTI_SWIER_SWIER17 ((uint32_t)0x00020000) /*!< Software Interrupt on line 17 */
1512
1523
#define EXTI_SWIER_SWIER18 ((uint32_t)0x00040000) /*!< Software Interrupt on line 18 */
1513
1524
#define EXTI_SWIER_SWIER19 ((uint32_t)0x00080000) /*!< Software Interrupt on line 19 */
1525
+ #define EXTI_SWIER_SWIER20 ((uint32_t)0x00100000) /*!< Software Interrupt on line 20 */
1526
+ #define EXTI_SWIER_SWIER21 ((uint32_t)0x00200000) /*!< Software Interrupt on line 21 */
1527
+ #define EXTI_SWIER_SWIER22 ((uint32_t)0x00400000) /*!< Software Interrupt on line 22 */
1514
1528
1515
1529
/******************* Bit definition for EXTI_PR register ********************/
1516
1530
#define EXTI_PR_PR0 ((uint32_t)0x00000001) /*!< Pending bit for line 0 */
@@ -1533,6 +1547,9 @@ USB_OTG_HostChannelTypeDef;
1533
1547
#define EXTI_PR_PR17 ((uint32_t)0x00020000) /*!< Pending bit for line 17 */
1534
1548
#define EXTI_PR_PR18 ((uint32_t)0x00040000) /*!< Pending bit for line 18 */
1535
1549
#define EXTI_PR_PR19 ((uint32_t)0x00080000) /*!< Pending bit for line 19 */
1550
+ #define EXTI_PR_PR20 ((uint32_t)0x00100000) /*!< Pending bit for line 20 */
1551
+ #define EXTI_PR_PR21 ((uint32_t)0x00200000) /*!< Pending bit for line 21 */
1552
+ #define EXTI_PR_PR22 ((uint32_t)0x00400000) /*!< Pending bit for line 22 */
1536
1553
1537
1554
/******************************************************************************/
1538
1555
/* */
@@ -1954,7 +1971,7 @@ USB_OTG_HostChannelTypeDef;
1954
1971
#define GPIO_BSRR_BR_14 ((uint32_t)0x40000000)
1955
1972
#define GPIO_BSRR_BR_15 ((uint32_t)0x80000000)
1956
1973
1957
- /****************** Bit definition for GPIO_LCKR register ********************/
1974
+ /****************** Bit definition for GPIO_LCKR register ********************* /
1958
1975
#define GPIO_LCKR_LCK0 ((uint32_t)0x00000001)
1959
1976
#define GPIO_LCKR_LCK1 ((uint32_t)0x00000002)
1960
1977
#define GPIO_LCKR_LCK2 ((uint32_t)0x00000004)
@@ -2125,7 +2142,7 @@ USB_OTG_HostChannelTypeDef;
2125
2142
#define PWR_CR_LPLVDS ((uint32_t)0x00000400) /*!< Low Power Regulator Low Voltage in Deep Sleep mode */
2126
2143
#define PWR_CR_MRLVDS ((uint32_t)0x00000800) /*!< Main Regulator Low Voltage in Deep Sleep mode */
2127
2144
#define PWR_CR_ADCDC1 ((uint32_t)0x00002000) /*!< Refer to AN4073 on how to use this bit */
2128
- #define PWR_CR_VOS ((uint32_t)0x0000C000) /*!< VOS[1:0] bits (Regulator voltage scaling output selection) */
2145
+ #define PWR_CR_VOS ((uint32_t)0x0000C000) /*!< VOS[1:0] bits (Regulator voltage scaling output selection) */
2129
2146
#define PWR_CR_VOS_0 ((uint32_t)0x00004000) /*!< Bit 0 */
2130
2147
#define PWR_CR_VOS_1 ((uint32_t)0x00008000) /*!< Bit 1 */
2131
2148
@@ -4511,14 +4528,14 @@ USB_OTG_HostChannelTypeDef;
4511
4528
((INSTANCE) == I2C3))
4512
4529
4513
4530
/******************************** I2S Instances *******************************/
4514
- #define IS_I2S_INSTANCE (INSTANCE ) (((INSTANCE) == SPI2) || \
4531
+ #define IS_I2S_ALL_INSTANCE (INSTANCE ) (((INSTANCE) == SPI2) || \
4515
4532
((INSTANCE) == SPI3))
4516
4533
4517
4534
/*************************** I2S Extended Instances ***************************/
4518
- #define IS_I2S_INSTANCE_EXT (PERIPH ) (((INSTANCE) == SPI2) || \
4519
- ((INSTANCE) == SPI3) || \
4520
- ((INSTANCE) == I2S2ext) || \
4521
- ((INSTANCE) == I2S3ext))
4535
+ #define IS_I2S_ALL_INSTANCE_EXT (PERIPH ) (((INSTANCE) == SPI2) || \
4536
+ ((INSTANCE) == SPI3) || \
4537
+ ((INSTANCE) == I2S2ext) || \
4538
+ ((INSTANCE) == I2S3ext))
4522
4539
4523
4540
/****************************** RTC Instances *********************************/
4524
4541
#define IS_RTC_ALL_INSTANCE (INSTANCE ) ((INSTANCE) == RTC)
@@ -4728,6 +4745,14 @@ USB_OTG_HostChannelTypeDef;
4728
4745
/****************************** WWDG Instances ********************************/
4729
4746
#define IS_WWDG_ALL_INSTANCE (INSTANCE ) ((INSTANCE) == WWDG)
4730
4747
4748
+ /****************************** SDIO Instances ********************************/
4749
+ #define IS_SDIO_ALL_INSTANCE (INSTANCE ) ((INSTANCE) == SDIO)
4750
+
4751
+ /****************************** USB Exported Constants ************************/
4752
+ #define USB_OTG_FS_HOST_MAX_CHANNEL_NBR 8
4753
+ #define USB_OTG_FS_MAX_IN_ENDPOINTS 4 /* Including EP0 */
4754
+ #define USB_OTG_FS_MAX_OUT_ENDPOINTS 4 /* Including EP0 */
4755
+ #define USB_OTG_FS_TOTAL_FIFO_SIZE 1280 /* in Bytes */
4731
4756
4732
4757
/**
4733
4758
* @}
@@ -4745,7 +4770,7 @@ USB_OTG_HostChannelTypeDef;
4745
4770
}
4746
4771
#endif /* __cplusplus */
4747
4772
4748
- #endif /* __STM32F401xE_H */
4773
+ #endif /* __STM32F401xC_H */
4749
4774
4750
4775
4751
4776
0 commit comments