typedef struct
{
__IO uint32_t CTLR; /*!< GPIO port mode register, Address offset: 0x00 */
__IO uint16_t OMODE; /*!< GPIO port output type register, Address offset: 0x04 */
uint16_t RESERVED0; /*!< Reserved, 0x06 */
__IO uint32_t OSPD; /*!< GPIO port output speed register, Address offset: 0x08 */
__IO uint32_t PUPD; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */
__IO uint16_t DIR; /*!< GPIO port input data register, Address offset: 0x10 */
uint16_t RESERVED1; /*!< Reserved, 0x12 */
__IO uint16_t DOR; /*!< GPIO port output data register, Address offset: 0x14 */
uint16_t RESERVED2; /*!< Reserved, 0x16 */
__IO uint32_t BOR; /*!< GPIO port bit set/reset registerBSRR, Address offset: 0x18 */
__IO uint32_t LOCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */
__IO uint32_t AFS[2]; /*!< GPIO alternate function HIGH register, Address offset: 0x20-0x24 */
__IO uint16_t BCR; /*!< GPIO bit reset register, Address offset: 0x28 */
uint16_t RESERVED3; /*!< Reserved, 0x2A */
}GPIO_TypeDef;
typedef struct
{
__IO uint32_t CRL;
__IO uint32_t CRH;
__IO uint32_t IDR;
__IO uint32_t ODR;
__IO uint32_t BSRR;
__IO uint32_t BRR;
__IO uint32_t LCKR;
} GPIO_TypeDef;
这个GPIO的定义和datasheet中的不一致?
|