Skip to content

Commit

Permalink
_begun isn't needed; it is only set, never read
Browse files Browse the repository at this point in the history
  • Loading branch information
eringerli committed May 14, 2022
1 parent 515f63f commit 91f8940
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Adafruit_SPIDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t cspin, uint32_t freq,
_cs = cspin;
_sck = _mosi = _miso = -1;
_spi = theSPI;
_begun = false;
_spiSetting = new SPISettings(freq, dataOrder, dataMode);
_freq = freq;
_dataOrder = dataOrder;
Expand Down Expand Up @@ -67,7 +66,6 @@ Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t cspin, int8_t sckpin,
_freq = freq;
_dataOrder = dataOrder;
_dataMode = dataMode;
_begun = false;
_spiSetting = new SPISettings(freq, dataOrder, dataMode);
_spi = nullptr;
}
Expand Down Expand Up @@ -109,7 +107,6 @@ bool Adafruit_SPIDevice::begin(void) {
}
}

_begun = true;
return true;
}

Expand Down
1 change: 0 additions & 1 deletion Adafruit_SPIDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class Adafruit_SPIDevice {
BusIO_PortReg *mosiPort, *clkPort, *misoPort, *csPort;
BusIO_PortMask mosiPinMask, misoPinMask, clkPinMask, csPinMask;
#endif
bool _begun;
};

#endif // has SPI defined
Expand Down

0 comments on commit 91f8940

Please sign in to comment.