unfortunately it is not possible to write a different value to the DAC and EEPROM simultaneously or write EEPROM only.
| 114 | // unfortunately it is not possible to write a different value |
| 115 | // to the DAC and EEPROM simultaneously or write EEPROM only. |
| 116 | int MCP4725::writeDAC(const uint16_t value, const bool EEPROM) |
| 117 | { |
| 118 | if (value > MCP4725_MAXVALUE) return MCP4725_VALUE_ERROR; |
| 119 | while(!ready()); |
| 120 | int rv = _writeRegisterMode(value, EEPROM ? MCP4725_DACEEPROM : MCP4725_DAC); |
| 121 | if (rv == 0) _lastValue = value; |
| 122 | return rv; |
| 123 | } |
| 124 | |
| 125 | |
| 126 | uint16_t MCP4725::readDAC() |