| 341 | } |
| 342 | |
| 343 | void deinitRfModule() { |
| 344 | if (bruceConfigPins.rfModule == CC1101_SPI_MODULE) { |
| 345 | if (cc1101_spi_ready) { |
| 346 | ELECHOUSE_cc1101.setSidle(); |
| 347 | cc1101_spi_ready = false; |
| 348 | } |
| 349 | digitalWrite(bruceConfigPins.CC1101_bus.io0, LOW); |
| 350 | digitalWrite(bruceConfigPins.CC1101_bus.cs, HIGH); |
| 351 | ioExpander.turnPinOnOff(IO_EXP_CC_RX, LOW); |
| 352 | ioExpander.turnPinOnOff(IO_EXP_CC_TX, LOW); |
| 353 | } else digitalWrite(bruceConfigPins.rfTx, LED_OFF); |
| 354 | } |
| 355 | |
| 356 | void initCC1101once(SPIClass *SSPI) { |
| 357 | // the init (); command may only be executed once in the entire program sequence. Otherwise problems can |