I2C address used in STM32-i2c drivers
@Fabien-Chouteau ci sta già lavorando.
Dal 18/2/2019.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Hello, when using I2C boards to communicate in "Master_Request_Write" and "Master_Request_Read" functions, the I2C address used is taken using the following function:
Address_to_use := UInt8 (Addr) and 2#1#;
This takes the upper 7 bits of the Addr. I think the standard is using the lower 7 bits of the address field, at least for most of "open source" sensors/boards, most of them come with the address written in the lower 7 bits in hexadecimal.
So, it is not like the library it is not working at this point, but it does not follow what I think is an I2C standard. I think there could be two approaches to "solve" this issue:
-
Maybe writing an additional description in the I2C functions that the user should be using: Master_Transmit, Master_Receive, Mem_Write and Mem_Read. Maybe putting this info in the description of the package?
-
Changing the function to shift_left the register address before taking the and/or operations, and updating the I2C address of the already written components. I think this one will require as well some sort of informative text, as some people working already with these libraries might be used to the current state of the library.
Let me know what you think, and thanks for your time!
- Lingua principale
- Ada
- Stelle
- 286
- Fork
- 165
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AdaCore/Ada_Drivers_Library
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
AdaCore/Ada_Drivers_Library#482 · 3 commenti ·
-
Outdated SVD bindingsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
AdaCore/Ada_Drivers_Library#481 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
AdaCore/Ada_Drivers_Library#462 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
AdaCore/Ada_Drivers_Library#447 · 2 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
AdaCore/Ada_Drivers_Library#440 · 2 commenti ·