![]() |
2014-01-04
, 13:53
|
|
Posts: 562 |
Thanked: 2,744 times |
Joined on Dec 2013
@ Espoo, Finland
|
#242
|
![]() |
2014-01-04
, 14:01
|
Posts: 1,104 |
Thanked: 5,652 times |
Joined on Feb 2010
@ Holland
|
#243
|
![]() |
2014-01-04
, 14:20
|
|
Posts: 956 |
Thanked: 2,628 times |
Joined on Nov 2011
|
#244
|
The Following User Says Thank You to Morpog For This Useful Post: | ||
![]() |
2014-01-04
, 15:19
|
Posts: 4 |
Thanked: 12 times |
Joined on Dec 2013
@ Zagreb
|
#245
|
![]() |
2014-01-04
, 15:48
|
Posts: 1,104 |
Thanked: 5,652 times |
Joined on Feb 2010
@ Holland
|
#246
|
For eeprom (toh-core):
https://github.com/KonstaT/sailfisho...vers/mfd/toh.c
If an eeprom with valid data is present, toh will appear in /sys fs.
From toh-core source eeprom data structure format can be extracted and than tested.
![]() |
2014-01-04
, 21:55
|
Posts: 30 |
Thanked: 42 times |
Joined on Oct 2010
@ Russia
|
#247
|
The TCA8424 documentation says:
...
#!/usr/bin/python import fcntl import os import struct class I2C(object): I2C_SLAVE = 0x0703 def __init__(self, fname): self.fd = os.open(fname, os.O_RDWR) def __del__(self): os.close(self.fd) def select_device(self, devaddr): if fcntl.ioctl(self.fd, self.I2C_SLAVE, devaddr) < 0: return IOError('ioctl error') def write(self, data): os.write(self.fd, data) def read(self, count): data = '' while 1: d = os.read(self.fd, count - len(data)) if len(d)==0: raise IOError("EOF while reading %d bytes" % count) data += d if len(data) == count: return data if __name__ == '__main__': port = I2C('/dev/i2c-1') port.select_device(0x76) # or 0x77 for i in range(10): port.write(struct.pack('<H', i)) v = ord(p.read(1)) print "reg=%02Xh val=%02Xh" % (i, v)
![]() |
2014-01-04
, 22:30
|
|
Posts: 562 |
Thanked: 2,744 times |
Joined on Dec 2013
@ Espoo, Finland
|
#248
|
![]() |
2014-01-05
, 11:41
|
Posts: 1,104 |
Thanked: 5,652 times |
Joined on Feb 2010
@ Holland
|
#249
|
![]() |
2014-01-05
, 23:58
|
Posts: 4 |
Thanked: 12 times |
Joined on Dec 2013
@ Zagreb
|
#250
|
The whole workings of the eeprom is very valuable in my eyes! If the eeprom could carry out commands, download files and install programs and deamons etc, all custom OH's can really be made plug&play.
This is a make or break condition for usage of the OH for the general public!