src/HapTouch.cpp
// genericCommand()
// See section 6.2.1 in Haptics Library Designer's Guide (slau543)
// Implements a generic I2C message. Use this method to access
// undocumented HapTouch controller commands.
genericCommand()
See section 6.2.1 in Haptics Library Designer's Guide (slau543)
Implements a generic I2C message. Use this method to access
undocumented HapTouch controller commands.
genericCommand () See section 6 . 2 . 1 in Haptics Library Designer ' s Guide ( slau543 ) Implements a generic I2C message . Use this method to access undocumented HapTouch controller commands .
uint8_t HapTouch::genericCommand(uint8_t command, uint8_t* params,
                                 uint8_t param_length)
{
  uint8_t i = 0;
  Wire.beginTransmission(_i2c_addr);
  Wire.write(command);                
  while (i < param_length) {
    Wire.write(params[i++]);   
  }
  Wire.endTransmission(true);
  return getResponseCode();
}
uint8_t HapTouch :: genericCommand ( uint8_t command , uint8_t * params , uint8_t param_length ) { uint8_t i = 0 ; Wire . beginTransmission ( _i2c_addr ) ; Wire . write ( command ) ; while ( i < param_length ) { Wire . write ( params [ i ++ ] ) ; } Wire . endTransmission ( true ) ; return getResponseCode ( ) ; }
genericCommand()
See section 6.2.1 in Haptics Library Designer's Guide (slau543)
Implements a generic I2C message.
genericCommand () See section 6 . 2 . 1 in Haptics Library Designer ' s Guide ( slau543 ) Implements a generic I2C message .
// Command ID // Write out the parameters