From 10a17b4ae3f7d525aa1b1869442650445a68cb38 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 23 Mar 2021 12:46:31 +0100 Subject: [PATCH 1/6] The Adafruit Feather nRF52840 Express is now a supported board --- .github/workflows/main.yml | 2 +- README.md | 1 + library.json | 7 +++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5cc29556..8c5c4d90 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: # See: https://travis-ci.org/github/felis/USB_Host_Shield_2.0/jobs/743787235 if [[ "${{ matrix.example }}" != *"bidirectional_converter" ]]; then TEENSY35="--board=teensy35"; TEENSY36="--board=teensy36"; TEENSY40="--board=teensy40"; TEENSY41="--board=teensy41"; fi - pio ci --lib="." $UNO --board=genuino101 --board=teensylc $TEENSY40 $TEENSY41 --board=esp12e --board=nodemcu --board=esp32dev + pio ci --lib="." $UNO --board=genuino101 --board=teensylc $TEENSY40 $TEENSY41 --board=esp12e --board=nodemcu --board=esp32dev --board=adafruit_feather_nrf52840 # Teensy 3.x depends on the SPI4Teensy3 library: https://platformio.org/lib/show/417/SPI4Teensy3 pio ci --lib="." --board=teensy30 --board=teensy31 $TEENSY35 $TEENSY36 --project-option="lib_deps=SPI4Teensy3" diff --git a/README.md b/README.md index 968377d7..eba03c3c 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ Currently the following boards are supported by the library: * Sanguino * Black Widdow * RedBearLab nRF51822 +* Adafruit Feather nRF52840 Express * Digilent chipKIT * Please see: . * STM32F4 diff --git a/library.json b/library.json index 559b7682..fbe6bc81 100644 --- a/library.json +++ b/library.json @@ -7,8 +7,7 @@ { "name": "Oleg Mazurov", "email": "mazurov@circuitsathome.com", - "url": "http://www.circuitsathome.com", - "maintainer": true + "url": "http://www.circuitsathome.com" }, { "name": "Alexei Glushchenko", @@ -22,8 +21,7 @@ }, { "name": "Andrew Kroll", - "email": "xxxajk@gmail.com", - "maintainer": true + "email": "xxxajk@gmail.com" } ], "repository": @@ -50,6 +48,7 @@ "teensy", "atmelsam", "nordicnrf51", + "nordicnrf52", "ststm32", "espressif8266", "espressif32" From 4d20580b184ed3612e3e2031578d16b5cf45f0db Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 23 Mar 2021 12:53:33 +0100 Subject: [PATCH 2/6] Workaround "warning: comparison between signed and unsigned integer expressions" in the Arduino core --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c5c4d90..ceb64f9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,13 +33,16 @@ jobs: # See: https://travis-ci.org/github/felis/USB_Host_Shield_2.0/jobs/743787235 if [[ "${{ matrix.example }}" != *"bidirectional_converter" ]]; then TEENSY35="--board=teensy35"; TEENSY36="--board=teensy36"; TEENSY40="--board=teensy40"; TEENSY41="--board=teensy41"; fi - pio ci --lib="." $UNO --board=genuino101 --board=teensylc $TEENSY40 $TEENSY41 --board=esp12e --board=nodemcu --board=esp32dev --board=adafruit_feather_nrf52840 + pio ci --lib="." $UNO --board=genuino101 --board=teensylc $TEENSY40 $TEENSY41 --board=esp12e --board=nodemcu --board=esp32dev # Teensy 3.x depends on the SPI4Teensy3 library: https://platformio.org/lib/show/417/SPI4Teensy3 pio ci --lib="." --board=teensy30 --board=teensy31 $TEENSY35 $TEENSY36 --project-option="lib_deps=SPI4Teensy3" # Workaround https://github.com/arduino/ArduinoCore-sam/issues/69 pio ci --lib="." --board=due --project-option="build_flags=-Wno-misleading-indentation" + + # Workaround "warning: comparison between signed and unsigned integer expressions" in the Arduino core + pio ci --lib="." --board=adafruit_feather_nrf52840 --project-option="build_flags=-Wno-sign-compare" env: PLATFORMIO_CI_SRC: ${{ matrix.example }} PLATFORMIO_BUILD_FLAGS: -DWIICAMERA -DDEBUG_USB_HOST -Wall -Werror From f31bca66d5577d9c564fa68f4bd21daa46fbcd99 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 23 Mar 2021 13:02:04 +0100 Subject: [PATCH 3/6] Also ignore 'unused-function' warnings --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ceb64f9e..e5ad35cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,8 +41,8 @@ jobs: # Workaround https://github.com/arduino/ArduinoCore-sam/issues/69 pio ci --lib="." --board=due --project-option="build_flags=-Wno-misleading-indentation" - # Workaround "warning: comparison between signed and unsigned integer expressions" in the Arduino core - pio ci --lib="." --board=adafruit_feather_nrf52840 --project-option="build_flags=-Wno-sign-compare" + # Ignore warnings in the Arduino core + pio ci --lib="." --board=adafruit_feather_nrf52840 --project-option="build_flags=-Wno-sign-compare -Wno-unused-function" env: PLATFORMIO_CI_SRC: ${{ matrix.example }} PLATFORMIO_BUILD_FLAGS: -DWIICAMERA -DDEBUG_USB_HOST -Wall -Werror From 3be8da5ff606cb4c0ebf08e4c978bda485650f5a Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 23 Mar 2021 13:34:15 +0100 Subject: [PATCH 4/6] Ignore 'unused-variable' warnings as well --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e5ad35cb..7cb4f6b1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,7 +42,7 @@ jobs: pio ci --lib="." --board=due --project-option="build_flags=-Wno-misleading-indentation" # Ignore warnings in the Arduino core - pio ci --lib="." --board=adafruit_feather_nrf52840 --project-option="build_flags=-Wno-sign-compare -Wno-unused-function" + pio ci --lib="." --board=adafruit_feather_nrf52840 --project-option="build_flags=-Wno-sign-compare -Wno-unused-function -Wno-unused-variable" env: PLATFORMIO_CI_SRC: ${{ matrix.example }} PLATFORMIO_BUILD_FLAGS: -DWIICAMERA -DDEBUG_USB_HOST -Wall -Werror From a121516eff66b52c0f5f2435fe9dc6d931dadbb3 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Wed, 24 Mar 2021 13:07:15 +0100 Subject: [PATCH 5/6] Install adafruit-nrfutil, as it is needed for building the application even though it is only used for uploading --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cb4f6b1..458b4890 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: - name: Install PlatformIO run: | pip install -U pip setuptools wheel - pip install platformio + pip install platformio adafruit-nrfutil - name: Install MIDI library if: contains(matrix.example, 'MIDI') # https://platformio.org/lib/show/62/MIDI%20Library From 0b4213319b50628221e95f50331bc0874dd70b8f Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Wed, 24 Mar 2021 13:39:51 +0100 Subject: [PATCH 6/6] Include for the Adafruit Feather nRF52840 Express manually --- examples/HID/scale/scale_rptparser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/HID/scale/scale_rptparser.cpp b/examples/HID/scale/scale_rptparser.cpp index 97e216d5..bc240a59 100644 --- a/examples/HID/scale/scale_rptparser.cpp +++ b/examples/HID/scale/scale_rptparser.cpp @@ -1,7 +1,8 @@ -/* Parser for standard HID scale (usage page 0x8d) data input report (ID 3) */ -#ifdef ARDUINO_SAM_DUE +#if defined(ARDUINO_SAM_DUE) || defined(ARDUINO_NRF52840_FEATHER) #include #endif + +/* Parser for standard HID scale (usage page 0x8d) data input report (ID 3) */ #include "scale_rptparser.h" const char* UNITS[13] = {