Description
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!