We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a8e722 + f14f29a commit fff5e5dCopy full SHA for fff5e5d
src/MagAlpha.cpp
@@ -109,9 +109,11 @@ uint8_t MagAlpha::readRegister(uint8_t address){
109
digitalWrite(_spiChipSelectPin, LOW);
110
SPI.transfer16(READ_REG_COMMAND | ((address & 0x1F) << 8) | 0x00);
111
digitalWrite(_spiChipSelectPin, HIGH);
112
+ delayMicroseconds(1); //Wait for 1us (=1000 ns) to respect tIdleReg of 750ns before register readout
113
114
readbackRegisterValue = ((SPI.transfer16(0x0000) & 0xFF00) >> 8);
115
116
+ delayMicroseconds(1); //Wait for 1us (=1000 ns) to respect tIdleReg of 750ns after register readout
117
return readbackRegisterValue;
118
}
119
0 commit comments