Closed johntalton closed 6 years ago
@johntalton very nice :smile:
top level issues / request for comment:
Additional Stuff:
for the parseId method of deviceId*, i am not sure if the return type of an object is "right" for this lib. maybe the callback should take (err, man, prod, name) or just (err, man, prod) and externalize the "enum" list?
also used (ret > 0) in C-code for ioctl return checking (Zero is a valid return). This is slightly different from the other implicit if(ioctl..) call which casts the int to boolean.
I have NOT included the other I2C method (SoftwareReset and ReloadAddress) as they both can be implemented on-top of the existing api. thus at best they should live in the JS code (or just not included at all an left for the higher level implementor). Your call.
Please feel free to rewrite the README - it likely would "sound" better in your "voice" (you would be surprised how far consistency in docs goes :) )
for the parseId method of deviceId*, i am not sure if the return type of an object is "right" for this lib. maybe the callback should take (err, man, prod, name) or just (err, man, prod) and externalize the "enum" list?
I prefer return type object. deviceId is a bit like i2cFuncs.
Please feel free to rewrite the README - it likely would "sound" better in your "voice" (you would be surprised how far consistency in docs goes :) )
Ok :)
first pass addition of i2c_smbus_deviceid (tested on rpi with fujitsu mb85 fram (http://www.fujitsu.com/global/documents/products/devices/semiconductor/fram/lineup/MB85RC256V-DS501-00017-5v1-E.pdf) on address 0x50, outputting 0xA510 [aka correct value for device])
top level issues / request for comment: