Skip to content

Commit 6246041

Browse files
authored
Merge pull request #55 from sparkfun/main
Catching up the develop branch ....
2 parents 331575c + 286297b commit 6246041

File tree

4 files changed

+63
-16
lines changed

4 files changed

+63
-16
lines changed

.github/workflows/compile-sketch.yml

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,69 +22,103 @@ jobs:
2222
# Uno
2323
# https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt
2424
- fqbn: arduino:avr:mega
25+
name: Arduino AVR
2526
platforms: |
2627
- name: arduino:avr
2728
source-url: https://downloads.arduino.cc/packages/package_index.json
2829
2930
# ESP32
3031
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
31-
- fqbn: esp32:esp32:esp32
32+
- fqbn: esp32:esp32:esp32thing_plus_c
33+
name: ESP32 Thing Plus C
3234
platforms: |
3335
- name: esp32:esp32
3436
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
3537
3638
# ESP32-S2
3739
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
38-
- fqbn: esp32:esp32:esp32s2
40+
- fqbn: esp32:esp32:sparkfun_esp32s2_thing_plus
41+
name: ESP32-S2 Thing Plus
42+
platforms: |
43+
- name: esp32:esp32
44+
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
45+
46+
# ESP32-S3
47+
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
48+
- fqbn: esp32:esp32:sparkfun_esp32s3_thing_plus
49+
name: ESP32-S3 Thing Plus
3950
platforms: |
4051
- name: esp32:esp32
4152
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
4253
4354
# ESP32-C3
4455
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
45-
- fqbn: esp32:esp32:esp32c3
56+
- fqbn: esp32:esp32:sparkfun_pro_micro_esp32c3
57+
name: ESP32-C3 Pro Micro
58+
platforms: |
59+
- name: esp32:esp32
60+
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
61+
62+
# ESP32-C6
63+
# https://github.com/espressif/arduino-esp32/blob/master/boards.txt
64+
- fqbn: esp32:esp32:sparkfun_esp32c6_thing_plus
65+
name: ESP32-C6 Thing Plus
4666
platforms: |
4767
- name: esp32:esp32
4868
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
4969
5070
# Artemis / Apollo3 Feb 25 - there some issue here -- will need to look at
5171
# https://github.com/sparkfun/Arduino_Apollo3/blob/main/boards.txt
52-
# - fqbn: SparkFun:apollo3:sfe_artemis_atp
53-
# platforms: |
54-
# - name: SparkFun:apollo3
55-
# source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json
72+
- fqbn: SparkFun:apollo3:sfe_artemis_atp
73+
name: SparkFun Artemis ATP
74+
platforms: |
75+
- name: SparkFun:apollo3
76+
source-url: https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json
5677
5778
# ESP8266
5879
# https://github.com/esp8266/Arduino/blob/master/boards.txt
5980
- fqbn: esp8266:esp8266:thingdev
81+
name: ESP8266 Thing Dev
6082
platforms: |
6183
- name: esp8266:esp8266
6284
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
6385
6486
# SAMD21
6587
# https://github.com/arduino/ArduinoCore-samd/blob/master/boards.txt
6688
- fqbn: arduino:samd:mkr1000
89+
name: SAMD21 MKR1000
6790
platforms: |
6891
- name: arduino:samd
6992
# source-url: https://downloads.arduino.cc/packages/package_index.json
7093
7194
# Nano BLE 33 / nRF52840
7295
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
7396
- fqbn: arduino:mbed:nano33ble
97+
name: Nano BLE 33
7498
platforms: |
7599
- name: arduino:mbed
76100
# source-url: https://downloads.arduino.cc/packages/package_index.json
77101
78102
# RP2040
79103
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
80104
- fqbn: rp2040:rp2040:sparkfun_promicrorp2040
105+
name: SparkFun Pro Micro RP2040
106+
platforms: |
107+
- name: rp2040:rp2040
108+
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
109+
110+
# RP2350
111+
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
112+
- fqbn: rp2040:rp2040:sparkfun_iotredboard_rp2350
113+
name: SparkFun IoT RedBoard RP2350
81114
platforms: |
82115
- name: rp2040:rp2040
83116
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
84117
85118
# STM32
86119
# https://github.com/arduino/ArduinoCore-mbed/blob/master/boards.txt
87120
- fqbn: STMicroelectronics:stm32:GenF4
121+
name: STM32 GenF4
88122
platforms: |
89123
- name: STMicroelectronics:stm32
90124
source-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
@@ -93,8 +127,10 @@ jobs:
93127
- name: Checkout
94128
uses: actions/checkout@v3
95129

96-
- name: Branch name
97-
run: echo running on branch ${GITHUB_REF##*/}
130+
- name: Branch name and details
131+
run: |
132+
echo "running on branch ${{ github.ref_name }}"
133+
echo "Board: ${{matrix.board.name}}, fqbn: ${{ matrix.board.fqbn }}"
98134
99135
- name: Compile Sketch
100136
uses: arduino/compile-sketches@v1.1.0

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun Toolkit
2-
version=1.1.0
2+
version=1.1.1
33
author=SparkFun Electronics
44
maintainer=SparkFun Electronics
55
sentence=A utility library that other SparkFun libraries can take advantage of.

src/sfTk/sfTkIUART.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typedef enum _sfTkUARTDataBits
6868
kUARTDataBitsEight = 0x400ul,
6969
} sfTkUARTDataBits_t;
7070

71-
inline const uint8_t dataBitsToValue(sfTkUARTDataBits_t dataBits)
71+
inline uint8_t dataBitsToValue(sfTkUARTDataBits_t dataBits)
7272
{
7373
static const uint8_t dataBitsArray[] = {5, 6, 7, 8};
7474

src/sfTkArdUART.cpp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,23 @@ sfTkError_t sfTkArdUART::init(HardwareSerial &hwSerial, uint32_t baudRate, bool
4848

4949
sfTkError_t sfTkArdUART::init(uint32_t baudRate, bool bInit)
5050
{
51+
// issues here on some devices - $defineing out for now
52+
#ifdef _THIS_IS_BROKEN
5153
// if we don't have a port already, use the default Arduino Serial.
5254
if (!_hwSerial)
5355
return init(Serial, baudRate, bInit);
5456

5557
// We already have a UART setup, so it's already initialized. Change the baud rate.
5658
return setBaudRate(baudRate); // set the baud rate
59+
#else
60+
return ksfTkErrFail;
61+
#endif
5762
}
5863

5964
sfTkError_t sfTkArdUART::init(sfTkIUART::UARTConfig_t config, bool bInit)
6065
{
66+
// issues here on some devices - $defineing out for now
67+
#ifdef _THIS_IS_BROKEN
6168
// if we don't have a port already, use the default Arduino Serial.
6269
if (!_hwSerial)
6370
return init(Serial, config, bInit);
@@ -67,6 +74,9 @@ sfTkError_t sfTkArdUART::init(sfTkIUART::UARTConfig_t config, bool bInit)
6774

6875
// We already have a UART setup, so it's already initialized.
6976
return ksfTkErrOk;
77+
#else
78+
return ksfTkErrFail;
79+
#endif
7080
}
7181

7282
sfTkError_t sfTkArdUART::init()
@@ -103,11 +113,11 @@ sfTkError_t sfTkArdUART::read(uint8_t *data, size_t length, size_t &bytesRead)
103113

104114
bytesRead = 0; // zero out value
105115

106-
// #ifdef ARDUINO_ARCH_AVR
116+
// #ifdef ARDUINO_ARCH_AVR
107117
bytesRead = _hwSerial->readBytes(data, length);
108-
// #else
109-
// bytesRead = readBytes(data, length);
110-
// #endif
118+
// #else
119+
// bytesRead = readBytes(data, length);
120+
// #endif
111121

112122
if (bytesRead == 0)
113123
return ksfTkErrFail;
@@ -187,7 +197,8 @@ sfTkError_t sfTkArdUART::_start(void)
187197
// ESP8266 does not support setting stop bits, parity, and data bits in a stanard manner.
188198
_hwSerial->begin(_config.baudRate);
189199
#else
190-
_hwSerial->begin(_config.baudRate, _config.stopBits | _config.parity | _config.dataBits);
200+
_hwSerial->begin(_config.baudRate,
201+
(uint32_t)_config.stopBits | (uint32_t)_config.parity | (uint32_t)_config.dataBits);
191202
#endif
192203
if (!availableForWrite())
193204
return ksfTkErrSerialNotInit; // check if the port is available

0 commit comments

Comments
 (0)