mirror of
https://github.com/1technophile/OpenMQTTGateway.git
synced 2026-02-20 00:32:04 +01:00
[RF] Allow configuration of CC1101 SPI pins (#2141)
If all CC1101 SPI pins are defined, use them to create the SPI device. Otherwise, default to the platform's SPI.
This commit is contained in:
@@ -36,6 +36,10 @@ void initCC1101() {
|
||||
int delayMS = 16;
|
||||
int delayMaxMS = 500;
|
||||
for (int i = 0; i < 10; i++) {
|
||||
# if defined(RF_MODULE_SCK) && defined(RF_MODULE_MISO) && \
|
||||
defined(RF_MODULE_MOSI) && defined(RF_MODULE_CS)
|
||||
ELECHOUSE_cc1101.setSpiPin(RF_MODULE_SCK, RF_MODULE_MISO, RF_MODULE_MOSI, RF_MODULE_CS);
|
||||
# endif
|
||||
if (ELECHOUSE_cc1101.getCC1101()) {
|
||||
Log.notice(F("C1101 spi Connection OK" CR));
|
||||
ELECHOUSE_cc1101.Init();
|
||||
|
||||
Reference in New Issue
Block a user