请教GBIOx_LCKR总共有几位的问题

[复制链接]
 楼主| 一片混沌 发表于 2020-4-23 08:28 | 显示全部楼层 |阅读模式
ck, GB, IO, ui, gp
#include<stdio.h>
#include<stdlib.h>
typedef unsigned int uint32_t;
typedef unsigned short int uint16_t;
typedef struct
{
        uint32_t CRL;        uint32_t CRH;        uint32_t IDR;        uint32_t ODR;
        uint32_t BSRR;        uint32_t BRR;        uint16_t LCKR;  
}GPIO_TypeDef;
#define GPIOB_BASE ( (GPIO_TypeDef*)0x40010800 )        //定义GPIOB_BASE的内存地址为 0x 4001 0800
void main(void)
{
        GPIO_TypeDef *GPIOx;
        GPIOx=GPIOB_BASE;

}
在这里为什么LCKR设置了16位、2个字节?是因为LCKR只有16位有效?但是我查了一下LCKR,不是总共有17位吗?0—16,不是17个么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

391

主题

391

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部

391

主题

391

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部