From 13854cdd3e77eae9764f0a5ced35d5ecd9394f23 Mon Sep 17 00:00:00 2001 From: Pedro Marquez Date: Thu, 1 Feb 2024 11:16:30 +0100 Subject: [PATCH 1/2] More general solution for external RS485_DEFAULT_DE_PIN definition --- src/RS485.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RS485.h b/src/RS485.h index 8d01799..c71314e 100644 --- a/src/RS485.h +++ b/src/RS485.h @@ -30,6 +30,7 @@ #endif #endif +#ifndef RS485_DEFAULT_DE_PIN #ifdef __AVR__ #define RS485_DEFAULT_DE_PIN 2 #define RS485_DEFAULT_RE_PIN -1 @@ -40,7 +41,6 @@ #define RS485_DEFAULT_DE_PIN A4 #define RS485_DEFAULT_RE_PIN A5 #else -#ifndef RS485_DEFAULT_DE_PIN #define RS485_DEFAULT_DE_PIN A6 #define RS485_DEFAULT_RE_PIN A5 #endif From 88fbafdb9bb0cf339ba355d60c4e9221d2bee284 Mon Sep 17 00:00:00 2001 From: Pedro Marquez Date: Mon, 26 Feb 2024 10:00:00 +0100 Subject: [PATCH 2/2] Update branch --- .github/workflows/compile-examples.yml | 15 +++++++++++++-- .github/workflows/report-size-deltas.yml | 4 ++-- .github/workflows/sync-labels.yml | 6 +++--- .gitignore | 1 + src/RS485.h | 9 ++++++++- 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index e50456a..61c3708 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -34,36 +34,47 @@ jobs: - fqbn: arduino:samd:mkrzero platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrzero - fqbn: arduino:samd:mkr1000 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkr1000 - fqbn: arduino:samd:mkrwifi1010 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrwifi1010 - fqbn: arduino:samd:mkrfox1200 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrfox1200 - fqbn: arduino:samd:mkrwan1300 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrwan1300 - fqbn: arduino:samd:mkrwan1310 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrwan1310 - fqbn: arduino:samd:mkrgsm1400 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrgsm1400 - fqbn: arduino:samd:mkrnb1500 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrnb1500 - fqbn: arduino:samd:mkrvidor4000 platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrvidor4000 - fqbn: arduino:mbed_portenta:envie_m7 platforms: | - name: arduino:mbed_portenta + artifact-name-suffix: arduino-mbed_portenta-envie_m7 - fqbn: arduino:mbed_opta:opta platforms: | - name: arduino:mbed_opta + artifact-name-suffix: arduino-suffix-opta steps: - name: Checkout repository @@ -86,8 +97,8 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save sketches report as workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-report-${{ matrix.board.artifact-name-suffix }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index 652be5d..39e2a0a 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -20,5 +20,5 @@ jobs: - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@v1 with: - # The name of the workflow artifact created by the sketch compilation workflow - sketches-reports-source: sketches-reports + # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow + sketches-reports-source: ^sketches-report-.+ diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 9cde1ac..47ac50a 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -70,7 +70,7 @@ jobs: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} - name: Pass configuration files to next job via workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | *.yaml @@ -108,13 +108,13 @@ jobs: uses: actions/checkout@v4 - name: Download configuration files artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} path: ${{ env.CONFIGURATIONS_FOLDER }} - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + uses: geekyeggo/delete-artifact@v4 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/src/RS485.h b/src/RS485.h index c71314e..b2b6009 100644 --- a/src/RS485.h +++ b/src/RS485.h @@ -30,7 +30,6 @@ #endif #endif -#ifndef RS485_DEFAULT_DE_PIN #ifdef __AVR__ #define RS485_DEFAULT_DE_PIN 2 #define RS485_DEFAULT_RE_PIN -1 @@ -41,11 +40,19 @@ #define RS485_DEFAULT_DE_PIN A4 #define RS485_DEFAULT_RE_PIN A5 #else +#ifndef RS485_DEFAULT_DE_PIN #define RS485_DEFAULT_DE_PIN A6 #define RS485_DEFAULT_RE_PIN A5 #endif #endif +#ifdef CUSTOM_RS485_DEFAULT_DE_PIN +# define RS485_DEFAULT_DE_PIN CUSTOM_RS485_DEFAULT_DE_PIN +#endif + +#ifdef CUSTOM_RS485_DEFAULT_RE_PIN +# define RS485_DEFAULT_RE_PIN CUSTOM_RS485_DEFAULT_RE_PIN +#endif #define RS485_DEFAULT_PRE_DELAY 50 #define RS485_DEFAULT_POST_DELAY 50