Ensure _slaveSelectPin is driven high after initialize() or setCS()
This commit is contained in:
parent
8cecd36d9b
commit
3899f1f018
|
|
@ -87,6 +87,7 @@ bool RFM69::initialize(uint8_t freqBand, uint8_t nodeID, uint8_t networkID)
|
|||
{255, 0}
|
||||
};
|
||||
|
||||
digitalWrite(_slaveSelectPin, HIGH);
|
||||
pinMode(_slaveSelectPin, OUTPUT);
|
||||
SPI.begin();
|
||||
|
||||
|
|
@ -456,6 +457,7 @@ void RFM69::setHighPowerRegs(bool onOff) {
|
|||
|
||||
void RFM69::setCS(uint8_t newSPISlaveSelect) {
|
||||
_slaveSelectPin = newSPISlaveSelect;
|
||||
digitalWrite(_slaveSelectPin, HIGH);
|
||||
pinMode(_slaveSelectPin, OUTPUT);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue