Skip to content

Feature update (& some patches)

Compare
Choose a tag to compare
@2bndy5 2bndy5 released this 13 Apr 01:37
· 111 commits to master since this release

Overloaded begin()

  • new overloaded begin(_SPI*) function for Arduino based platforms (but not Due, ATTiny, LittleWire, or SPI_UART) that allows the user to specify a non-default SPI bus object
    1. /docs/arduino.md has example snippets for
      • NodeMCU (using pins' on-board labels via macros from the ESP8266 Arduino core)
      • ESP32 (generic)
      • Teensy (generic) - though I don't think teensy users need to use the overloaded begin(_SPI*) (as demonstrated in example snippet)
    2. The SPIClass::begin() function must be called before calling RF24::begin() as warned in /docs/arduino.md page and the RF24::begin(_SPI*) function's docs (which also defers to the Arduino support page).
    3. A new macro RF24_SPI_PTR which is only defined when _SPI is used as a datatype (as opposed to the actual SPI object for a platform).
  • new overloaded begin(_cepin, _cspin) to implement feature request from #539. This applies to all supported platforms. This implementation also provides an overloaded c'tor that accepts only the _spi_speed parameter (that still defaults to RF24_SPI_SPEED - so it could essentially be used as an empty c'tor). Note that begin() returns false if CE & CSN pins are never specified (either with c'tor or new overloaded begin(_cepin, _cspin)/begin(_SPI*, _cepin, _cspin) methods). This feature is extended to the python wrapper as well.
  • new additionally overloaded begin(_SPI*, _cepin, _cspin) on Arduino based platforms (but not Due, ATTiny, LittleWire, or SPI_UART) to allow also specifying a SPI bus from feature request #743 when combined with feature request from #539

Patch updates

  • fix releases for PlatformIO (a missing comma prevented v1.3.12 from showing in PlatformIO)
  • abstract docs (main page and all "Related Pages" now live in the docs folder)
  • added fix for mbed platform about printf.h from @TonioChingon in #739
  • added fix for #414 to RF24_config.h concerning ARDUINO_ARCH_SAMD about internally using printf(). This fix is only appicable to the adafruit fork of the ArduinoCore-samd. Original ArduinoCore-samd does not use avr/pgmspace.h and doesn't declare printf() as accessible method from the Serial object(s).
  • Removed useless /utility/Due/R24_arch_config.h file and fixed missing avr/pgmspace.h for Arduino Due (pgmspace was added back into the Due core in 2013).
  • added Arduino Due to the ArduinoCLI workflow. Also introduced a new workflow that uses PlatformIO to test the examples on the Teensy platform (thus the new badge in the README).
  • amended isValid() to check if private members ce_pin & csn_pin are 0xFFFF because it seems it wasn't updated when the c'tor parameters changed their datatype from uint8_t to uint16_t