i2cioexpander inconsistencies and problems
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- c
- Domaine
- embedded-iot
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- C
- Étoiles
- 4.6k
- Forks
- 1.4k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 183
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de adafruit/circuitpython
-
documentation enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
adafruit/circuitpython#11689 ·
Les mainteneurs répondent en général sous 1 jour
-
SD card read errors are not reported to the host and send bad dataPeut-être pris @mikeysklar l’a pris il y a 2 jours. Ouvertebug sdcardio storage usb
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
adafruit/circuitpython#11715 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Hard fault with combination of ESP32SPI and wifi monitorPeut-être pris @dhalbert l’a pris il y a 3 jours. Ouvertebug network
adafruit/circuitpython#11710 · 6 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Feather RP2350: MAX3421E instead of PIO USB host, or a second build?Peut-être pris @mikeysklar l’a pris il y a 5 jours. Ouverterp2 usb
adafruit/circuitpython#11697 · 5 commentaires · 2 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
rp2040 zephyr
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
adafruit/circuitpython#11690 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de adafruit/circuitpython
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 9 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
containers/bubblewrap#826 ·
Les mainteneurs répondent en général sous 1 jour
-
Vulkan: create_device reads the device extension list after freeing it (random crash at start)Ouverte
Difficulté 1/5 1-3 heures Accessibilité débutants 62/100
Revivedx/SavageWindRecomp#488 ·
Les mainteneurs répondent en général sous 1 jour
-
needs-device
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100