Closed smolbun closed 1 year ago
void ELECHOUSE_CC1101::SpiStart(void)
{
// initialize the SPI pins
pinMode(SCK_PIN, OUTPUT);
pinMode(MOSI_PIN, OUTPUT);
pinMode(MISO_PIN, INPUT);
pinMode(SS_PIN, OUTPUT);
// enable SPI
#ifdef ESP32
SPI.begin(SCK_PIN, MISO_PIN, MOSI_PIN, SS_PIN);
#elif ARDUINO_ARCH_RP2040
SPI.setRX(MISO_PIN);
SPI.setCS(SS_PIN);
SPI.setSCK(SCK_PIN);
SPI.setTX(MOSI_PIN);
SPI.begin();
#else
SPI.begin();
#endif
}
Only the default SPI works when using the pico
ELECHOUSE_cc1101.setSpiPin(18, 16, 19, 17)
, I've tried other SPI ports refering to the pinout diagram . Any idea why it doesn't work on other SPI ports?Modified example without GDO