physical-computation / Warp-firmware

Firmware for the Cambridge Physical Computation Laboratory's Warp Embedded Multi-Sensor Platform.
http://physcomp.eng.cam.ac.uk
BSD 3-Clause "New" or "Revised" License
5 stars 198 forks source link

I2C pull up resistance variables - type, name, configuration #90

Open btsouts opened 4 years ago

btsouts commented 4 years ago

Describe the bug Variables for I2C pull up resistance appear in various places with different type and semantics.

Variable menuI2cPullupValue in main functions is uint16_t and intended to be the I2C resistance value in Ohms.

Variable pullupValue in configureI2Cpins function is uint8_t and corresponds to the tap positions of the ISL23425 DCPs.

Required changes

  1. There are currently two ISL23425 DCPs which are configured with the same tap position value using configureI2Cpins function. We should modify the function to be able to take two values.
  2. A similar approach for menuI2cPullupValue, since there are two DCPs.
  3. We should add a function to map the menuI2cPullupValue Ohms value to ISL23425 DCP tap position.
phillipstanleymarbell commented 4 years ago

See also #50