i2cioexpander inconsistencies and problems
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- c
- 领域
- embedded-iot
调研方向
Start by reading reset_board_buses() in shared-module/board/__init__.c and compare its behavior with common_hal_i2cioexpander_ioexpander_construct() and common_hal_i2cdisplaybus_i2cdisplaybus_construct(). Then trace the CIRCUITPY_I2CIOEXPANDER defaults across ports. Done means the intended bus and pin reset behavior is consistent, including for external I2C devices and user-created expanders.
由索引模型根据 Issue 内容生成。
描述
CircuitPython version and board name
main
Code/REPL
n.a.
Behavior
There are a number of inconsistencies across ports regarding the i2cioexpander module. Also, the behavior is not as intended:
CIRCUITPY_I2CIOEXPANDERdefaults to0for all ports except raspberrypi. That port sets the value to=1(instead of?=1), so it is impossible to override it in ampconfigboard.mkfile. While this sounds like just another module for the raspberrypi port, it also changes behavior as a side effect. SettingCIRCUITPY_I2CIOEXPANDERprevents resetting the board I2C bus (seereset_board_buses()inshared-module/board/__init__.c. So none of the raspberrypi boards reset the board I2C bus, while all espressif boards except the yotas do the reset.- The coding in
reset_board_buses()has two additional problems. It silently assumes that the ioexpander is an internal peripheral and not just a normal external i2c device. This assumption can be wrong. - Major problem: not resetting the bus in this way does not prevent resetting the SCL/SDA pins. So although the bus is not explicitely reset, it is still unusable after the cleanup routines from main.c.
(1) is easy to solve.
(2) is debateble: treating ioexpanders as something special is possible, but the current implementation treats them differently if they are not on the board I2C bus.
(3) common_hal_i2cioexpander_ioexpander_construct() could call common_hal_busio_i2c_never_reset(), like common_hal_i2cdisplaybus_i2cdisplaybus_construct() does. As an alternative, this can be added to all boards that create an ioexpander and treat all ioexpander instances created from user code as "normal" i2c devices.
Description
No response
Additional information
No response
- 主要语言
- C
- 星标
- 4.6k
- 派生
- 1.4k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 155
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
adafruit/circuitpython 的其他 Issue
-
board breaks api
难度 2/5 1-3 小时 新手友好度 68/100
adafruit/circuitpython#11099 · 3 条评论 ·
维护者通常 1 天内回复
-
storage usb zephyr
难度 4/5 3-5 天 新手友好度 48/100
adafruit/circuitpython#11531 ·
维护者通常 1 天内回复
-
silabs
难度 5/5 一周以上 新手友好度 20/100
adafruit/circuitpython#11507 · 1 条评论 ·
维护者通常 1 天内回复
-
Feature/API request: portable camera capture across ESP-IDF, Zephyr, and parallel interfaces可能已有人在做 @tannewt 今天认领。 未关闭circuitpython api displayio enhancement
难度 5/5 一周以上 新手友好度 25/100
adafruit/circuitpython#11505 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 38/100
adafruit/circuitpython#11472 · 1 条评论 ·
维护者通常 1 天内回复
查看 adafruit/circuitpython 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
NASA-AMMOS/BSL#355 ·
维护者通常 1 天内回复
-
#242 leftovers: dated narrative and shas in the social-features test plan可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
EchoTools/nevr-runtime#264 ·
维护者通常 1 天内回复
-
area/docdb kind/bug priority/medium status/awaiting-triage
难度 2/5 1-3 小时 新手友好度 82/100
yugabyte/yugabyte-db#34873 ·
维护者通常 1 天内回复
-
category:port-update
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
mypaint/libmypaint#209 ·