some fixes, strange zeros in between
This commit is contained in:
16
ads1210.cpp
16
ads1210.cpp
@ -69,26 +69,14 @@ void ADS1210::exec() {
|
||||
res.in[3] = 0;
|
||||
disableCS();
|
||||
|
||||
Serial << "DOR4x8: " << _HEX(res.in[3]) << " " << _HEX(res.in[2]) << " " << _HEX(res.in[1]) << " " << _HEX(res.in[0]) << endl;
|
||||
Serial << "DOR1x32: " << _HEX(res.out) << endl;
|
||||
// Serial << "DOR4x8: " << _HEX(res.in[3]) << " " << _HEX(res.in[2]) << " " << _HEX(res.in[1]) << " " << _HEX(res.in[0]) << endl;
|
||||
// Serial << "DOR1x32: " << _HEX(res.out) << endl;
|
||||
|
||||
value = res.out;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ADS1210::disableRefO() const {
|
||||
uint8_t cmr = readRegister(ADDR_CMR3);
|
||||
cmr &= ~CMR_REFO;
|
||||
writeRegister(ADDR_CMR3, cmr);
|
||||
}
|
||||
|
||||
void ADS1210::enableRefO() const {
|
||||
uint8_t cmr = readRegister(ADDR_CMR3);
|
||||
cmr |= CMR_REFO;
|
||||
writeRegister(ADDR_CMR3, cmr);
|
||||
}
|
||||
|
||||
void ADS1210::setMode(uint8_t mode) const {
|
||||
uint8_t cmr = readRegister(ADDR_CMR2);
|
||||
cmr &= ~CMR_MD_Mask;
|
||||
|
Reference in New Issue
Block a user