打印

请教GBIOx_LCKR总共有几位的问题

[复制链接]
246|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
一片混沌|  楼主 | 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

粉丝