c - how do i write a binary number to STM32 GPIO
问题描述
I want to control a 4 bit multiplexer with my nucleo board. I understand I have to write either to the higher or lower parts of the BSRR resgister, to set bits high and set bits low.
I want to increment some variable, say multp_select
and then output it to GPIOA (in AVR I can do this just by writing PORTA = multp_select
for example) what is the best way to do this?
解决方案
Use the register ODR
instead.
My advice is: read the Reference Manual - everything is described there.
推荐阅读
- python - 在 Python 中从命名列表中解析元素
- html - ::after 元素在焦点时不显示
- azure - 每两个小时早上 7 点到晚上 9 点的 CRON 表达式
- javascript - 使用 Vue 路由器响应式查询参数
- ubuntu-18.04 - 如何修复右键单击ubuntu?
- swift - 快速删除前导字符和零
- java - Listview搜索结果onclick错误返回
- java - NamedParameterJdbcTemplate 单元测试
- c# - 使用 LDAP 身份验证查找用户组
- microsoft-graph-api - 无法使用 microsoft graph api 将 .docx 文件转换为 pdf