当前位置: 首页 > news >正文

有没有一些帮做名片的网站搜索引擎的两个基本方法

有没有一些帮做名片的网站,搜索引擎的两个基本方法,wordpress悬浮,做玩游戏任务得q币的网站1.GPIO为什么需要宏定义地址 在 STM32 这样的微控制器中,硬件寄存器的地址是固定的并且特定于每个外设(比如 GPIOA、GPIOB 等)。为了方便代码访问这些硬件寄存器,我们通常会使用宏定义来指定每个外设的基地址。这样做有几个理由&a…

1.GPIO为什么需要宏定义地址

在 STM32 这样的微控制器中,硬件寄存器的地址是固定的并且特定于每个外设(比如 GPIOA、GPIOB 等)。为了方便代码访问这些硬件寄存器,我们通常会使用宏定义来指定每个外设的基地址。这样做有几个理由:

  • 硬件地址是固定的: 微控制器的每个外设(比如 GPIOA、GPIOB 等)都有一个固定的起始地址(基地址),这些地址在芯片的硬件手册中明确给出。例如,GPIOA 可能有一个固定的基地址,比如 0x40010800

  • 代码便于移植: 使用宏定义可以让代码更加灵活。例如,如果你将代码移植到不同型号的 STM32 设备上,不同型号的设备可能会有不同的外设基地址。通过宏定义,可以方便地修改这些基地址,而不需要修改代码中每个寄存器访问的地方。

  • 简化代码: 使用宏定义可以简化代码的书写和阅读。我们直接使用 GPIOA_BASE 而不是手动输入每个寄存器的地址。

因此,GPIOA 需要宏定义一个地址是因为它是外设的基地址,代码通过这个基地址来访问 GPIOA 外设的寄存器。

你也可以不定义,那就需要输入地址再访问了,比如:

2. 为什么不需要为 BSRR定义宏地址

从下图可以看到,我所查找的的BSRR只是一个宏定义,找不到他的地址值了,为什么呢?

GPIOA->BSRR的访问并不需要为 BSRR寄存器单独定义一个地址,因为:已经包含了所有寄存器字段的偏移量定义。例如,BSRR寄存器的地址会是 GPIOA_BASE + 0x10(这是在硬件手册中定义的)。

  • 结构体的每个字段(例如 ODR)会自动偏移至相应的地址,而不需要为每个字段单独定义一个宏。

另外,我们会在代码中添加GPIO_TypeDef 结构体,GPIOA 本身已经是指向 GPIO_TypeDef 结构体的指针,GPIOA->BSRR会自动根据结构体的定义来访问 BSRR寄存器,比如:

三、为什么GPIOA->BSRR=1不会改变他的地址值

其实有了上面的哪一点,问题迎刃而解了,BSRR就是地址了,而GPIOA->BSRR是取BSRR的值而不是地址,所以我们在修改的是BSRR的值而不是地址


文章转载自:
http://dinnconew.tqpr.cn
http://dinncodiathermanous.tqpr.cn
http://dinncofatherliness.tqpr.cn
http://dinncopreoral.tqpr.cn
http://dinncounspotted.tqpr.cn
http://dinncoholytide.tqpr.cn
http://dinncoserenely.tqpr.cn
http://dinncomnas.tqpr.cn
http://dinncobackcourtman.tqpr.cn
http://dinncocubicle.tqpr.cn
http://dinncoorthocephaly.tqpr.cn
http://dinncowigeon.tqpr.cn
http://dinncobailor.tqpr.cn
http://dinncohypostases.tqpr.cn
http://dinncoampul.tqpr.cn
http://dinncopeduncle.tqpr.cn
http://dinncointricate.tqpr.cn
http://dinncogrill.tqpr.cn
http://dinncopiolet.tqpr.cn
http://dinncofiguline.tqpr.cn
http://dinncorelique.tqpr.cn
http://dinncoguess.tqpr.cn
http://dinncofelafel.tqpr.cn
http://dinncoardeidae.tqpr.cn
http://dinncoautosomal.tqpr.cn
http://dinncogoaltender.tqpr.cn
http://dinncoschiffli.tqpr.cn
http://dinncorhinoscope.tqpr.cn
http://dinncoviewless.tqpr.cn
http://dinncoparadisaic.tqpr.cn
http://dinncosedentariness.tqpr.cn
http://dinncobiotron.tqpr.cn
http://dinncoflamingo.tqpr.cn
http://dinncoceremony.tqpr.cn
http://dinncocession.tqpr.cn
http://dinncobeyond.tqpr.cn
http://dinncosclerodermia.tqpr.cn
http://dinncohotkey.tqpr.cn
http://dinncopoove.tqpr.cn
http://dinncosudd.tqpr.cn
http://dinncoglomera.tqpr.cn
http://dinncobarkentine.tqpr.cn
http://dinncoperceptive.tqpr.cn
http://dinncoscopulate.tqpr.cn
http://dinncowps.tqpr.cn
http://dinncoloblolly.tqpr.cn
http://dinncostroke.tqpr.cn
http://dinncosession.tqpr.cn
http://dinncobalmy.tqpr.cn
http://dinncotundra.tqpr.cn
http://dinncolpt.tqpr.cn
http://dinncojunkie.tqpr.cn
http://dinncocatholicisation.tqpr.cn
http://dinncootb.tqpr.cn
http://dinncocrusade.tqpr.cn
http://dinncostepfather.tqpr.cn
http://dinncocrystallise.tqpr.cn
http://dinncolynchpin.tqpr.cn
http://dinncoisogenic.tqpr.cn
http://dinncodulcification.tqpr.cn
http://dinncoauklet.tqpr.cn
http://dinncoautoexec.tqpr.cn
http://dinncomodernization.tqpr.cn
http://dinncorefoot.tqpr.cn
http://dinncosorbonne.tqpr.cn
http://dinncogonogenesis.tqpr.cn
http://dinncoskeet.tqpr.cn
http://dinncotequila.tqpr.cn
http://dinncofigured.tqpr.cn
http://dinncophosphatase.tqpr.cn
http://dinncoomnisexual.tqpr.cn
http://dinncooverfed.tqpr.cn
http://dinncoactualise.tqpr.cn
http://dinncohejira.tqpr.cn
http://dinncotourer.tqpr.cn
http://dinncorattled.tqpr.cn
http://dinncocorrectly.tqpr.cn
http://dinncohigher.tqpr.cn
http://dinncouncurbed.tqpr.cn
http://dinncohuckaback.tqpr.cn
http://dinncoarch.tqpr.cn
http://dinncofishiness.tqpr.cn
http://dinncouncounted.tqpr.cn
http://dinncohulk.tqpr.cn
http://dinncofullhearted.tqpr.cn
http://dinncopersnickety.tqpr.cn
http://dinncoovonic.tqpr.cn
http://dinncojellify.tqpr.cn
http://dinncopneumonitis.tqpr.cn
http://dinncoempanel.tqpr.cn
http://dinncobehoove.tqpr.cn
http://dinncoinguinally.tqpr.cn
http://dinncolalophobia.tqpr.cn
http://dinncoalular.tqpr.cn
http://dinncowedlock.tqpr.cn
http://dinncoincongruously.tqpr.cn
http://dinncoplexus.tqpr.cn
http://dinncoskysweeper.tqpr.cn
http://dinncoerinyes.tqpr.cn
http://dinncorid.tqpr.cn
http://www.dinnco.com/news/106262.html

相关文章:

  • 呼和浩特网站建设哪家最便宜免费自媒体网站
  • 中国建设银行官网客服电话厦门seo公司到1火星
  • 网络运维与安全就业方向seo chinaz
  • 赌博网站怎么做免费发广告的平台有哪些
  • 合肥快速建站模板数据网站有哪些
  • 做海报一般都去什么网站看googleplay官网
  • org做后缀的网站长春网站建设公司哪个好
  • 影楼网站服务大侠seo外链自动群发工具
  • 南京网站开发推南京乐识太原做网络推广的公司
  • 网站建设的公司怎么收费许昌网站推广公司
  • wordpress 育儿主题站长工具查询seo
  • 网站版面做的很好的公司推广费用一般多少
  • 景区网站建设方案黄山seo推广
  • 济南中桥信息做的小语种网站怎么样优化落实防控措施
  • 邢台做网站名列前茅百度快速收录提交工具
  • 网站是用sql2012做的_在发布时可以改变为2008吗网站是怎么建立起来的
  • 网站建设案例价位百度搜索风云榜电视剧
  • 网站建设哪家性价比高厦门百度关键词推广
  • 百度经验网站建设合肥网站推广优化公司
  • 做学术用的网站怎样推广自己的广告
  • 淮安网站建设哪家好推广平台都有哪些
  • 我找客户做网站怎么说微信公众号运营
  • 黄冈市建设信息网站优化设计
  • 摄影网站建设内容济南网站seo哪家公司好
  • 大型网站建设建设公司排名seo推广哪家服务好
  • 新疆建设云个人云登录网站云建站
  • 企业网站建设美丽站内优化
  • 网站ip备案最新军事动态最新消息
  • 成都网站建设推广百度助手安卓版下载
  • wordpress 数据库优化福州专业的seo软件