Add STM32F1 HW support (#795)
This commit is contained in:
@@ -90,6 +90,8 @@ bool RFM69::initialize(uint8_t freqBand, uint8_t nodeID, uint8_t networkID)
|
||||
|
||||
hwDigitalWrite(_slaveSelectPin, HIGH);
|
||||
hwPinMode(_slaveSelectPin, OUTPUT);
|
||||
hwPinMode(_interruptPin, INPUT);
|
||||
|
||||
SPI.begin();
|
||||
unsigned long start = millis();
|
||||
uint8_t timeout = 50;
|
||||
@@ -500,8 +502,7 @@ void RFM69::select()
|
||||
// set RFM69 SPI settings
|
||||
SPI.setDataMode(SPI_MODE0);
|
||||
SPI.setBitOrder(MSBFIRST);
|
||||
SPI.setClockDivider(
|
||||
SPI_CLOCK_DIV4); // decided to slow down from DIV2 after SPI stalling in some instances, especially visible on mega1284p when RFM69 and FLASH chip both present
|
||||
SPI.setClockDivider(MY_RF69_SPI_CLOCK_DIV);
|
||||
hwDigitalWrite(_slaveSelectPin, LOW);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user