Skip to content

Catching up the develop branch .... #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 45 additions & 9 deletions .github/workflows/compile-sketch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,69 +22,103 @@ 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

# 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

# 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

# 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

# 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
Expand All @@ -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/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/sfTk/sfTkIUART.h
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
21 changes: 16 additions & 5 deletions src/sfTkArdUART.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Loading