This commit is contained in:
caternuson 2021-06-25 09:12:04 -07:00
parent 3b9b0e6a2c
commit e6712a5dfe
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ bool Adafruit_BusIO_Register::read(uint8_t *buffer, uint8_t len) {
// the 'actual' reg addr is the second byte then // the 'actual' reg addr is the second byte then
addrbuffer[1] = (uint8_t)(_address & 0xFF); addrbuffer[1] = (uint8_t)(_address & 0xFF);
// the address appears to be a byte longer // the address appears to be a byte longer
return _spidevice->write(buffer, len, addrbuffer, _addrwidth+1); return _spidevice->write_then_read(addrbuffer, _addrwidth+1, buffer, len);
} }
if (_spiregtype == ADDRBIT8_HIGH_TOREAD) { if (_spiregtype == ADDRBIT8_HIGH_TOREAD) {
addrbuffer[0] |= 0x80; addrbuffer[0] |= 0x80;