Skip to content

Commit 83f2f3f

Browse files
authored
Merge pull request #3 from arduino-libraries/revamp
Revamp API
2 parents 107d276 + 887a061 commit 83f2f3f

File tree

24 files changed

+1100
-923
lines changed

24 files changed

+1100
-923
lines changed
+17-35
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md
12
name: Compile Examples
23

34
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
@@ -22,11 +23,9 @@ on:
2223

2324
env:
2425
UNIVERSAL_SKETCH_PATHS: |
25-
- examples/Battery
26-
- examples/Charger
27-
- examples/DeepSleep_WakeFromPin
28-
- examples/DeepSleep_WakeFromRTC
29-
- examples/Powershell
26+
- examples/Battery
27+
- examples/Charger
28+
- examples/Standby_WakeFromPin
3029
SKETCHES_REPORTS_PATH: sketches-reports
3130
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
3231

@@ -43,10 +42,18 @@ jobs:
4342

4443
matrix:
4544
board:
45+
- fqbn: arduino:mbed_portenta:envie_m7
46+
platforms: |
47+
- name: arduino:mbed_portenta
48+
artifact-name-suffix: arduino-mbed_portenta-envie_m7
49+
additional-sketch-paths: |
50+
- examples/Standby_WakeFromRTC_H7
4651
- fqbn: arduino:renesas_portenta:portenta_c33
4752
platforms: |
4853
- name: arduino:renesas_portenta
49-
54+
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
55+
additional-sketch-paths: |
56+
- examples/Standby_WakeFromRTC_C33
5057
5158
steps:
5259
- name: Checkout repository
@@ -59,11 +66,10 @@ jobs:
5966
fqbn: ${{ matrix.board.fqbn }}
6067
platforms: ${{ matrix.board.platforms }}
6168
libraries: |
62-
# Install the library from the local path.
6369
- source-path: ./
64-
# - name: Arduino_PF1550
65-
- source-url: https://github.com/cristidragomir97/Arduino_PF1550_old.git
66-
- source-url: https://github.com/cristidragomir97/Arduino_Portenta_C33_LowPower.git
70+
- name: Arduino_PF1550
71+
- name: Arduino_LowPowerPortentaH7
72+
- source-url: https://github.com/arduino-libraries/Arduino_LowPowerPortentaC33.git
6773
sketch-paths: |
6874
${{ env.UNIVERSAL_SKETCH_PATHS }}
6975
${{ matrix.board.additional-sketch-paths }}
@@ -74,29 +80,5 @@ jobs:
7480
uses: actions/upload-artifact@v4
7581
with:
7682
if-no-files-found: error
83+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
7784
path: ${{ env.SKETCHES_REPORTS_PATH }}
78-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
79-
80-
report-size-deltas:
81-
needs: build
82-
# Run even if some compilations failed.
83-
if: always() && github.event_name == 'pull_request'
84-
runs-on: ubuntu-latest
85-
permissions:
86-
pull-requests: write
87-
88-
steps:
89-
- name: Download sketches reports artifact
90-
id: download-artifact
91-
continue-on-error: true # If compilation failed for all boards then there are no artifacts
92-
uses: actions/download-artifact@v4
93-
with:
94-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
95-
path: ${{ env.SKETCHES_REPORTS_PATH }}
96-
97-
- name: Comment size deltas report to PR
98-
uses: arduino/report-size-deltas@v1
99-
# If actions/download-artifact failed, there are no artifacts to report from.
100-
if: steps.download-artifact.outcome == 'success'
101-
with:
102-
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ⚡ Arduino PowerManagement
22

3-
[![Check Arduino](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/check-arduino.yml) [![Compile Examples](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/compile-examples.yml) [![Spell Check](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/spell-check.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/spell-check.yml) [![Sync Labels](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/sync-labels.yml)
3+
[![Check Arduino](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/check-arduino.yml) [![Compile Examples](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/compile-examples.yml) [![Spell Check](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/spell-check.yml) [![Sync Labels](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/sync-labels.yml)
44

55
The Arduino Pro Power Management Library serves as a comprehensive and sophisticated power management toolkit tailored for Arduino Pro boards, encompassing the Portenta H7, Portenta C33, and Nicla Vision.
66

@@ -9,7 +9,7 @@ This library streamlines the interaction with complex hardware components such a
99
## ✅ Supported Boards
1010

1111
- Arduino Portenta H7
12-
- Arduino Nicla Vision
12+
- Arduino Nicla Vision (Low power features not supported yet)
1313
- Arduino Portenta C33
1414

1515
## Core Components of the Library

docs/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,19 @@ To simplify things, we have added a convenience function in `Board` called `slee
221221
Here's an overview of the reduction in power usage that you can expect from this library on the Portenta C33. The screenshots below are taken from the nRF Power Profiler application using a Nordic PPK2 while running the blink sketch on the same board.
222222

223223
#### Without power optimisations
224-
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/normal_usage_blink.png)
224+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/normal_usage_blink.png)
225225

226226
#### Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth off)
227-
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_no_peripherals.png)
227+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_no_peripherals.png)
228228

229229
#### Deep Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth off)
230-
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_no_peripherals.png)
230+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_no_peripherals.png)
231231

232232
#### Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth on)
233-
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_peripherals_on.png)
233+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_peripherals_on.png)
234234

235235
#### Deep Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth on)
236-
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_peripherals_on.png)
236+
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_peripherals_on.png)
237237

238238

239239

0 commit comments

Comments
 (0)