Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Details on What happening on this line below. #11

Open
Raj9417 opened this issue Nov 25, 2020 · 0 comments
Open

Details on What happening on this line below. #11

Raj9417 opened this issue Nov 25, 2020 · 0 comments

Comments

@Raj9417
Copy link

Raj9417 commented Nov 25, 2020

def get_eeprom(self, eeprom_address=0x50):
# Two separate I2C transfers in case the buffer size is small
**q1 = [I2C.Message([0x00, 0x00]), I2C.Message([0x00]4000, read=True)]
q2 = [I2C.Message([0x0f, 0xa0]), I2C.Message([0x00]4000, read=True)]

self.i2c.transfer(eeprom_address, q1)
self.i2c.transfer(eeprom_address, q2)
return np.array(q1[1].data + q2[1].data)

The function above was taken from htpa.py code. what I understand is you are reading 4000 number of bytes from 4 location from the EEPROM, (0x00,0x00,0x0f,0x0a). Please explain this two line I bold up in the function on what is happening and is my understanding correct?

Actually this is more for explaination and details rather than an issue.

Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant