Marlin-RC_Deltaprintr/Marlin/dac_mcp4728.cpp
/**
 * Begin I2C, get current values (input register and eeprom) of mcp4728
 */
Begin I2C, get current values (input register and eeprom) of mcp4728
Begin I2C get current values ( input register and eeprom ) of mcp4728
void mcp4728_init() {
  Wire.begin();
  Wire.requestFrom(int(DAC_DEV_ADDRESS), 24);
  while(Wire.available()) {
    int deviceID = Wire.receive();
    int hiByte = Wire.receive();
    int loByte = Wire.receive();
    int isEEPROM = (deviceID & 0B00001000) >> 3;
    int channel = (deviceID & 0B00110000) >> 4;
    if (isEEPROM != 1) {
      mcp4728_values[channel] = word((hiByte & 0B00001111), loByte);
    }
  }
}
void mcp4728_init ( ) { Wire . begin ( ) ; Wire . requestFrom ( int ( DAC_DEV_ADDRESS ) , 24 ) ; while ( Wire . available ( ) ) { int deviceID = Wire . receive ( ) ; int hiByte = Wire . receive ( ) ; int loByte = Wire . receive ( ) ; int isEEPROM = ( deviceID & 0 B00001000 ) >> 3 ; int channel = ( deviceID & 0 B00110000 ) >> 4 ; if ( isEEPROM != 1 ) { mcp4728_values [ channel ] = word ( ( hiByte & 0 B00001111 ) , loByte ) ; } } }
Begin I2C, get current values (input register and eeprom) of mcp4728
Begin I2C get current values ( input register and eeprom ) of mcp4728