Skip to content

Commit f14f29a

Browse files
committed
undo storing in debug val
1 parent 056b098 commit f14f29a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/MagAlpha.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ uint8_t MagAlpha::readRegister(uint8_t address){
111111
digitalWrite(_spiChipSelectPin, HIGH);
112112
delayMicroseconds(1); //Wait for 1us (=1000 ns) to respect tIdleReg of 750ns before register readout
113113
digitalWrite(_spiChipSelectPin, LOW);
114-
uint16_t result = SPI.transfer16(0x0000);
115-
readbackRegisterValue = ((result & 0xFF00) >> 8);
114+
readbackRegisterValue = ((SPI.transfer16(0x0000) & 0xFF00) >> 8);
116115
digitalWrite(_spiChipSelectPin, HIGH);
117116
delayMicroseconds(1); //Wait for 1us (=1000 ns) to respect tIdleReg of 750ns after register readout
118117
return readbackRegisterValue;

0 commit comments

Comments
 (0)