diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index eee9338..adced18 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -22,41 +22,63 @@ jobs: # Uno # https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt - fqbn: arduino:avr:mega + name: Arduino AVR platforms: | - name: arduino:avr source-url: https://downloads.arduino.cc/packages/package_index.json # ESP32 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt - - fqbn: esp32:esp32:esp32 + - fqbn: esp32:esp32:esp32thing_plus_c + name: ESP32 Thing Plus C platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json # ESP32-S2 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt - - fqbn: esp32:esp32:esp32s2 + - fqbn: esp32:esp32:sparkfun_esp32s2_thing_plus + name: ESP32-S2 Thing Plus + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + + # ESP32-S3 + # https://github.com/espressif/arduino-esp32/blob/master/boards.txt + - fqbn: esp32:esp32:sparkfun_esp32s3_thing_plus + name: ESP32-S3 Thing Plus platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json # ESP32-C3 # https://github.com/espressif/arduino-esp32/blob/master/boards.txt - - fqbn: esp32:esp32:esp32c3 + - fqbn: esp32:esp32:sparkfun_pro_micro_esp32c3 + name: ESP32-C3 Pro Micro + platforms: | + - name: esp32:esp32 + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + + # ESP32-C6 + # https://github.com/espressif/arduino-esp32/blob/master/boards.txt + - fqbn: esp32:esp32:sparkfun_esp32c6_thing_plus + name: ESP32-C6 Thing Plus platforms: | - name: esp32:esp32 source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json # Artemis / Apollo3 Feb 25 - there some issue here -- will need to look at # https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt - # - fqbn: SparkFun:apollo3:sfe_artemis_atp - # platforms: | - # - name: SparkFun:apollo3 - # source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json + - fqbn: SparkFun:apollo3:sfe_artemis_atp + name: SparkFun Artemis ATP + platforms: | + - name: SparkFun:apollo3 + source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json # ESP8266 # https://github.com/esp8266/Arduino/blob/master/boards.txt - fqbn: esp8266:esp8266:thingdev + name: ESP8266 Thing Dev platforms: | - name: esp8266:esp8266 source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json @@ -64,6 +86,7 @@ jobs: # SAMD21 # https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt - fqbn: arduino:samd:mkr1000 + name: SAMD21 MKR1000 platforms: | - name: arduino:samd # source-url: https://downloads.arduino.cc/packages/package_index.json @@ -71,6 +94,7 @@ jobs: # Nano BLE 33 / nRF52840 # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt - fqbn: arduino:mbed:nano33ble + name: Nano BLE 33 platforms: | - name: arduino:mbed # source-url: https://downloads.arduino.cc/packages/package_index.json @@ -78,6 +102,15 @@ jobs: # RP2040 # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt - fqbn: rp2040:rp2040:sparkfun_promicrorp2040 + name: SparkFun Pro Micro RP2040 + platforms: | + - name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + + # RP2350 + # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt + - fqbn: rp2040:rp2040:sparkfun_iotredboard_rp2350 + name: SparkFun IoT RedBoard RP2350 platforms: | - name: rp2040:rp2040 source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json @@ -85,6 +118,7 @@ jobs: # STM32 # https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt - fqbn: STMicroelectronics:stm32:GenF4 + name: STM32 GenF4 platforms: | - name: STMicroelectronics:stm32 source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json @@ -93,8 +127,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Branch name - run: echo running on branch ${GITHUB_REF##*/} + - name: Branch name and details + run: | + echo "running on branch ${{ github.ref_name }}" + echo "Board: ${{matrix.board.name}}, fqbn: ${{ matrix.board.fqbn }}" - name: Compile Sketch uses: arduino/compile-sketches@v1.1.0 diff --git a/library.properties b/library.properties index e52c88b..ccfba8b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SparkFun Toolkit -version=1.1.0 +version=1.1.1 author=SparkFun Electronics maintainer=SparkFun Electronics sentence=A utility library that other SparkFun libraries can take advantage of. diff --git a/src/sfTk/sfTkIUART.h b/src/sfTk/sfTkIUART.h index 9ce5c15..8d517c4 100644 --- a/src/sfTk/sfTkIUART.h +++ b/src/sfTk/sfTkIUART.h @@ -68,7 +68,7 @@ typedef enum _sfTkUARTDataBits kUARTDataBitsEight = 0x400ul, } sfTkUARTDataBits_t; -inline const uint8_t dataBitsToValue(sfTkUARTDataBits_t dataBits) +inline uint8_t dataBitsToValue(sfTkUARTDataBits_t dataBits) { static const uint8_t dataBitsArray[] = {5, 6, 7, 8}; diff --git a/src/sfTkArdUART.cpp b/src/sfTkArdUART.cpp index 7e63721..6c82262 100644 --- a/src/sfTkArdUART.cpp +++ b/src/sfTkArdUART.cpp @@ -48,16 +48,23 @@ sfTkError_t sfTkArdUART::init(HardwareSerial &hwSerial, uint32_t baudRate, bool sfTkError_t sfTkArdUART::init(uint32_t baudRate, bool bInit) { + // issues here on some devices - $defineing out for now +#ifdef _THIS_IS_BROKEN // if we don't have a port already, use the default Arduino Serial. if (!_hwSerial) return init(Serial, baudRate, bInit); // We already have a UART setup, so it's already initialized. Change the baud rate. return setBaudRate(baudRate); // set the baud rate +#else + return ksfTkErrFail; +#endif } sfTkError_t sfTkArdUART::init(sfTkIUART::UARTConfig_t config, bool bInit) { +// issues here on some devices - $defineing out for now +#ifdef _THIS_IS_BROKEN // if we don't have a port already, use the default Arduino Serial. if (!_hwSerial) return init(Serial, config, bInit); @@ -67,6 +74,9 @@ sfTkError_t sfTkArdUART::init(sfTkIUART::UARTConfig_t config, bool bInit) // We already have a UART setup, so it's already initialized. return ksfTkErrOk; +#else + return ksfTkErrFail; +#endif } sfTkError_t sfTkArdUART::init() @@ -103,11 +113,11 @@ sfTkError_t sfTkArdUART::read(uint8_t *data, size_t length, size_t &bytesRead) bytesRead = 0; // zero out value -// #ifdef ARDUINO_ARCH_AVR + // #ifdef ARDUINO_ARCH_AVR bytesRead = _hwSerial->readBytes(data, length); -// #else -// bytesRead = readBytes(data, length); -// #endif + // #else + // bytesRead = readBytes(data, length); + // #endif if (bytesRead == 0) return ksfTkErrFail; @@ -187,7 +197,8 @@ sfTkError_t sfTkArdUART::_start(void) // ESP8266 does not support setting stop bits, parity, and data bits in a stanard manner. _hwSerial->begin(_config.baudRate); #else - _hwSerial->begin(_config.baudRate, _config.stopBits | _config.parity | _config.dataBits); + _hwSerial->begin(_config.baudRate, + (uint32_t)_config.stopBits | (uint32_t)_config.parity | (uint32_t)_config.dataBits); #endif if (!availableForWrite()) return ksfTkErrSerialNotInit; // check if the port is available