Skip to content

Commit 88ada26

Browse files
committed
Merge remote-tracking branch 'upstream/main' into wiz
2 parents 9f517c0 + 6cb7c82 commit 88ada26

File tree

14 files changed

+110
-100
lines changed

14 files changed

+110
-100
lines changed

.github/workflows/build-board-custom.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,29 @@ jobs:
4242
run: |
4343
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE
4444
- name: Checkout head / tag
45+
env:
46+
TAG: ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }}
4547
run: |
46-
git checkout ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }}
48+
git checkout "$TAG"
4749
- name: fork compatibility
4850
if: github.repository_owner != 'adafruit'
51+
env:
52+
REPO: ${{ github.repository }}
4953
run: |
50-
git remote add fork https://github.com/${{github.repository}}.git
54+
git remote add fork "https://github.com/$REPO.git"
5155
git fetch fork --filter=tree:0
5256
- name: branch compatibility
5357
if: inputs.branch != 'main' && inputs.version == 'latest' && github.repository_owner == 'adafruit'
58+
env:
59+
BRANCH: ${{ inputs.branch }}
5460
run: |
55-
git checkout ${{inputs.branch}}
61+
git checkout "$BRANCH"
5662
- name: branch compatibility (fork)
5763
if: inputs.branch != '' && inputs.version == 'latest' && github.repository_owner != 'adafruit'
64+
env:
65+
BRANCH: ${{ inputs.branch }}
5866
run: |
59-
git checkout -b fork-branch fork/${{inputs.branch}}
67+
git checkout -b fork-branch "fork/$BRANCH"
6068
- name: Set up identifier
6169
if: inputs.debug || inputs.flags != ''
6270
run: |
@@ -101,7 +109,12 @@ jobs:
101109
riscv64-unknown-elf-gcc --version || true
102110
mkfs.fat --version || true
103111
- name: Build board
104-
run: make -j4 ${{ inputs.flags }} BOARD=${{ inputs.board }} DEBUG=${{ inputs.debug && '1' || '0' }} TRANSLATION=${{ inputs.language }}
112+
env:
113+
TRANSLATION: ${{ inputs.language }}
114+
BOARD: ${{ inputs.board }}
115+
FLAGS: ${{ inputs.flags }}
116+
DEBUG: ${{ inputs.debug && '1' || '0' }}
117+
run: make -j4 $FLAGS BOARD="$BOARD" DEBUG=$DEBUG TRANSLATION="$TRANSLATION"
105118
working-directory: ports/${{ steps.set-up-port.outputs.port }}
106119
- name: Upload artifact
107120
uses: actions/upload-artifact@v4

.github/workflows/build-boards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
submodules: false
3232
show-progress: false
3333
fetch-depth: 1
34+
persist-credentials: false
3435

3536
- name: Set up python
3637
uses: actions/setup-python@v5

.github/workflows/build-mpy-cross.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
submodules: false
3434
show-progress: false
3535
fetch-depth: 1
36+
persist-credentials: false
3637
- name: Set up python
3738
uses: actions/setup-python@v5
3839
with:
@@ -57,9 +58,12 @@ jobs:
5758
run: make -C mpy-cross -j4 -f Makefile.${{ matrix.mpy-cross }}
5859

5960
- name: Set output
61+
env:
62+
EX: ${{ env[format('EX_{0}', matrix.mpy-cross)] || matrix.mpy-cross }}
63+
OS: ${{ env[format('OS_{0}', matrix.mpy-cross)] }}"
6064
run: |
61-
echo >> $GITHUB_ENV "EX=${{ env[format('EX_{0}', matrix.mpy-cross)] || matrix.mpy-cross }}"
62-
echo >> $GITHUB_ENV "OS=${{ env[format('OS_{0}', matrix.mpy-cross)] }}"
65+
echo >> $GITHUB_ENV "EX=$EX"
66+
echo >> $GITHUB_ENV "OS=$OS"
6367
6468
- name: Upload artifact
6569
uses: actions/upload-artifact@v4

.github/workflows/build.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
submodules: false
3434
show-progress: false
3535
fetch-depth: 1
36+
persist-credentials: false
3637
- name: Set up python
3738
uses: actions/setup-python@v5
3839
with:
@@ -66,15 +67,19 @@ jobs:
6667
EXCLUDE_COMMIT: ${{ github.event.pull_request.head.sha }}
6768
- name: Set head sha (pull)
6869
if: github.event_name == 'pull_request'
69-
run: echo "HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
70+
env:
71+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
72+
run: echo "HEAD_SHA=$HEAD_SHA" >> $GITHUB_ENV
7073
- name: Set base sha (pull)
7174
if: github.event_name == 'pull_request'
7275
run: git cat-file -e $SHA && echo "BASE_SHA=$SHA" >> $GITHUB_ENV || true
7376
env:
7477
SHA: ${{ steps.get-last-commit-with-checks.outputs.commit_sha || github.event.pull_request.base.sha }}
7578
- name: Set head sha (push)
7679
if: github.event_name == 'push'
77-
run: echo "HEAD_SHA=${{ github.event.after }}" >> $GITHUB_ENV
80+
env:
81+
SHA: ${{ github.event.after }}
82+
run: echo "HEAD_SHA=$SHA" >> $GITHUB_ENV
7883
- name: Set base sha (push)
7984
if: github.event_name == 'push'
8085
run: git cat-file -e $SHA && echo "BASE_SHA=$SHA" >> $GITHUB_ENV || true
@@ -114,6 +119,7 @@ jobs:
114119
submodules: false
115120
show-progress: false
116121
fetch-depth: 1
122+
persist-credentials: false
117123
- name: Set up python
118124
uses: actions/setup-python@v5
119125
with:
@@ -149,9 +155,9 @@ jobs:
149155
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
150156
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
151157
run: |
152-
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-${{ env.CP_VERSION }}-universal --no-progress --region us-east-1
153-
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/build-arm64/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
154-
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/build/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-${{ env.CP_VERSION }}-x64 --no-progress --region us-east-1
158+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-"${CP_VERSION}"-universal --no-progress --region us-east-1
159+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/build-arm64/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-"${CP_VERSION}"-arm64 --no-progress --region us-east-1
160+
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/build/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-"${CP_VERSION}"-x64 --no-progress --region us-east-1
155161
env:
156162
AWS_PAGER: ''
157163
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -170,6 +176,7 @@ jobs:
170176
submodules: false
171177
show-progress: false
172178
fetch-depth: 1
179+
persist-credentials: false
173180
- name: Set up python
174181
uses: actions/setup-python@v5
175182
with:
@@ -188,7 +195,7 @@ jobs:
188195
name: stubs
189196
path: circuitpython-stubs/dist/*
190197
- name: Test Documentation Build (HTML)
191-
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
198+
run: sphinx-build -E -W -b html -D version="$CP_VERSION" -D release="$CP_VERSION" . _build/html
192199
- uses: actions/upload-artifact@v4
193200
with:
194201
name: docs-html
@@ -271,6 +278,7 @@ jobs:
271278
submodules: false
272279
show-progress: false
273280
fetch-depth: 1
281+
persist-credentials: false
274282
- name: Set up submodules
275283
uses: ./.github/actions/deps/submodules
276284
- name: build mpy-cross

.github/workflows/create-website-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
submodules: false
2323
show-progress: false
2424
fetch-depth: 1
25+
persist-credentials: false
2526
- name: Set up python
2627
uses: actions/setup-python@v5
2728
with:

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
submodules: false
2323
show-progress: false
2424
fetch-depth: 1
25+
persist-credentials: false
2526
- name: Set up python
2627
uses: actions/setup-python@v5
2728
with:

lib/mbedtls_config/mbedtls_port.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727

2828
#if CIRCUITPY_SSL_MBEDTLS
2929

30+
#include "py/runtime.h"
3031
#include "mbedtls_config.h"
3132
#include "mbedtls/entropy_poll.h"
3233

33-
#include "hardware/rtc.h"
3434
#include "shared/timeutils/timeutils.h"
3535
#include "shared-bindings/os/__init__.h"
36-
37-
#include "hardware/rtc.h"
38-
#include "shared/timeutils/timeutils.h"
36+
#include "shared-bindings/time/__init__.h"
3937

4038
extern uint8_t rosc_random_u8(size_t cycles);
4139

@@ -46,9 +44,10 @@ int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t
4644
}
4745

4846
time_t rp2_rtctime_seconds(time_t *timer) {
49-
datetime_t t;
50-
rtc_get_datetime(&t);
51-
return timeutils_seconds_since_epoch(t.year, t.month, t.day, t.hour, t.min, t.sec);
47+
mp_obj_t datetime = mp_load_attr(MP_STATE_VM(rtc_time_source), MP_QSTR_datetime);
48+
timeutils_struct_time_t tm;
49+
struct_time_to_tm(datetime, &tm);
50+
return timeutils_seconds_since_epoch(tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
5251
}
5352

5453
#endif

shared-bindings/synthio/Note.c

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ static const mp_arg_t note_properties[] = {
2020
{ MP_QSTR_amplitude, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(1) } },
2121
{ MP_QSTR_bend, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
2222
{ MP_QSTR_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
23-
{ MP_QSTR_waveform_loop_start, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
24-
{ MP_QSTR_waveform_loop_end, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(SYNTHIO_WAVEFORM_SIZE) } },
23+
{ MP_QSTR_waveform_loop_start, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
24+
{ MP_QSTR_waveform_loop_end, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(SYNTHIO_WAVEFORM_SIZE) } },
2525
{ MP_QSTR_envelope, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
2626
{ MP_QSTR_filter, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
27-
{ MP_QSTR_ring_frequency, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
28-
{ MP_QSTR_ring_bend, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
27+
{ MP_QSTR_ring_frequency, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
28+
{ MP_QSTR_ring_bend, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
2929
{ MP_QSTR_ring_waveform, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_NONE } },
30-
{ MP_QSTR_ring_waveform_loop_start, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(0) } },
31-
{ MP_QSTR_ring_waveform_loop_end, MP_ARG_OBJ, {.u_obj = MP_ROM_INT(SYNTHIO_WAVEFORM_SIZE) } },
30+
{ MP_QSTR_ring_waveform_loop_start, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(0) } },
31+
{ MP_QSTR_ring_waveform_loop_end, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_ROM_INT(SYNTHIO_WAVEFORM_SIZE) } },
3232
};
3333
//| class Note:
3434
//| def __init__(
@@ -37,17 +37,17 @@ static const mp_arg_t note_properties[] = {
3737
//| frequency: float,
3838
//| panning: BlockInput = 0.0,
3939
//| waveform: Optional[ReadableBuffer] = None,
40-
//| waveform_loop_start: int = 0,
41-
//| waveform_loop_end: int = waveform_max_length,
40+
//| waveform_loop_start: BlockInput = 0,
41+
//| waveform_loop_end: BlockInput = waveform_max_length,
4242
//| envelope: Optional[Envelope] = None,
43-
//| amplitude: BlockInput = 0.0,
43+
//| amplitude: BlockInput = 1.0,
4444
//| bend: BlockInput = 0.0,
4545
//| filter: Optional[Biquad] = None,
4646
//| ring_frequency: float = 0.0,
4747
//| ring_bend: float = 0.0,
4848
//| ring_waveform: Optional[ReadableBuffer] = None,
49-
//| ring_waveform_loop_start: int = 0,
50-
//| ring_waveform_loop_end: int = waveform_max_length,
49+
//| ring_waveform_loop_start: BlockInput = 0,
50+
//| ring_waveform_loop_end: BlockInput = waveform_max_length,
5151
//| ) -> None:
5252
//| """Construct a Note object, with a frequency in Hz, and optional panning, waveform, envelope, tremolo (volume change) and bend (frequency change).
5353
//|
@@ -198,46 +198,44 @@ MP_PROPERTY_GETSET(synthio_note_waveform_obj,
198198
(mp_obj_t)&synthio_note_get_waveform_obj,
199199
(mp_obj_t)&synthio_note_set_waveform_obj);
200200

201-
//| waveform_loop_start: int
201+
202+
203+
//| waveform_loop_start: BlockInput
202204
//| """The sample index of where to begin looping waveform data.
203205
//|
204-
//| Values outside the range ``0`` to ``waveform_max_length-1`` (inclusive) are rejected with a `ValueError`.
205-
//|
206-
//| Values greater than or equal to the actual waveform length are treated as 0."""
206+
//| The value is limited to the range ``0`` to ``len(waveform)-1`` (inclusive)."""
207207
static mp_obj_t synthio_note_get_waveform_loop_start(mp_obj_t self_in) {
208208
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
209-
return mp_obj_new_int(common_hal_synthio_note_get_waveform_loop_start(self));
209+
return common_hal_synthio_note_get_waveform_loop_start(self);
210210
}
211211
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_waveform_loop_start_obj, synthio_note_get_waveform_loop_start);
212212

213213
static mp_obj_t synthio_note_set_waveform_loop_start(mp_obj_t self_in, mp_obj_t arg) {
214214
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
215-
common_hal_synthio_note_set_waveform_loop_start(self, mp_obj_get_int(arg));
215+
common_hal_synthio_note_set_waveform_loop_start(self, arg);
216216
return mp_const_none;
217217
}
218218
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_waveform_loop_start_obj, synthio_note_set_waveform_loop_start);
219219
MP_PROPERTY_GETSET(synthio_note_waveform_loop_start_obj,
220220
(mp_obj_t)&synthio_note_get_waveform_loop_start_obj,
221221
(mp_obj_t)&synthio_note_set_waveform_loop_start_obj);
222222

223-
//| waveform_loop_end: int
223+
//| waveform_loop_end: BlockInput
224224
//| """The sample index of where to end looping waveform data.
225225
//|
226-
//| Values outside the range ``1`` to ``waveform_max_length`` (inclusive) are rejected with a `ValueError`.
227-
//|
228-
//| If the value is greater than the actual waveform length, or less than or equal to the loop start, the loop will occur at the end of the waveform.
226+
//| The value is limited to the range ``waveform_loop_start+1`` to ``len(waveform)`` (inclusive).
229227
//|
230228
//| Use the `synthio.waveform_max_length` constant to set the loop point at the end of the wave form, no matter its length."""
231229
//|
232230
static mp_obj_t synthio_note_get_waveform_loop_end(mp_obj_t self_in) {
233231
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
234-
return mp_obj_new_int(common_hal_synthio_note_get_waveform_loop_end(self));
232+
return common_hal_synthio_note_get_waveform_loop_end(self);
235233
}
236234
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_waveform_loop_end_obj, synthio_note_get_waveform_loop_end);
237235

238236
static mp_obj_t synthio_note_set_waveform_loop_end(mp_obj_t self_in, mp_obj_t arg) {
239237
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
240-
common_hal_synthio_note_set_waveform_loop_end(self, mp_obj_get_int(arg));
238+
common_hal_synthio_note_set_waveform_loop_end(self, arg);
241239
return mp_const_none;
242240
}
243241
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_waveform_loop_end_obj, synthio_note_set_waveform_loop_end);
@@ -331,46 +329,42 @@ MP_PROPERTY_GETSET(synthio_note_ring_waveform_obj,
331329
(mp_obj_t)&synthio_note_get_ring_waveform_obj,
332330
(mp_obj_t)&synthio_note_set_ring_waveform_obj);
333331

334-
//| ring_waveform_loop_start: int
332+
//| ring_waveform_loop_start: BlockInput
335333
//| """The sample index of where to begin looping waveform data.
336334
//|
337-
//| Values outside the range ``0`` to ``waveform_max_length-1`` (inclusive) are rejected with a `ValueError`.
338-
//|
339-
//| Values greater than or equal to the actual waveform length are treated as 0."""
335+
//| The value is limited to the range ``0`` to ``len(ring_waveform)-1`` (inclusive)."""
340336
static mp_obj_t synthio_note_get_ring_waveform_loop_start(mp_obj_t self_in) {
341337
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
342-
return mp_obj_new_int(common_hal_synthio_note_get_ring_waveform_loop_start(self));
338+
return common_hal_synthio_note_get_ring_waveform_loop_start(self);
343339
}
344340
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_ring_waveform_loop_start_obj, synthio_note_get_ring_waveform_loop_start);
345341

346342
static mp_obj_t synthio_note_set_ring_waveform_loop_start(mp_obj_t self_in, mp_obj_t arg) {
347343
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
348-
common_hal_synthio_note_set_ring_waveform_loop_start(self, mp_obj_get_int(arg));
344+
common_hal_synthio_note_set_ring_waveform_loop_start(self, arg);
349345
return mp_const_none;
350346
}
351347
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_ring_waveform_loop_start_obj, synthio_note_set_ring_waveform_loop_start);
352348
MP_PROPERTY_GETSET(synthio_note_ring_waveform_loop_start_obj,
353349
(mp_obj_t)&synthio_note_get_ring_waveform_loop_start_obj,
354350
(mp_obj_t)&synthio_note_set_ring_waveform_loop_start_obj);
355351

356-
//| ring_waveform_loop_end: int
352+
//| ring_waveform_loop_end: BlockInput
357353
//| """The sample index of where to end looping waveform data.
358354
//|
359-
//| Values outside the range ``1`` to ``waveform_max_length`` (inclusive) are rejected with a `ValueError`.
360-
//|
361-
//| If the value is greater than the actual waveform length, or less than or equal to the loop start, the loop will occur at the end of the waveform.
355+
//| The value is limited to the range ``ring_waveform_loop_start+1`` to ``len(ring_waveform)`` (inclusive).
362356
//|
363357
//| Use the `synthio.waveform_max_length` constant to set the loop point at the end of the wave form, no matter its length."""
364358
//|
365359
static mp_obj_t synthio_note_get_ring_waveform_loop_end(mp_obj_t self_in) {
366360
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
367-
return mp_obj_new_int(common_hal_synthio_note_get_ring_waveform_loop_end(self));
361+
return common_hal_synthio_note_get_ring_waveform_loop_end(self);
368362
}
369363
MP_DEFINE_CONST_FUN_OBJ_1(synthio_note_get_ring_waveform_loop_end_obj, synthio_note_get_ring_waveform_loop_end);
370364

371365
static mp_obj_t synthio_note_set_ring_waveform_loop_end(mp_obj_t self_in, mp_obj_t arg) {
372366
synthio_note_obj_t *self = MP_OBJ_TO_PTR(self_in);
373-
common_hal_synthio_note_set_ring_waveform_loop_end(self, mp_obj_get_int(arg));
367+
common_hal_synthio_note_set_ring_waveform_loop_end(self, arg);
374368
return mp_const_none;
375369
}
376370
MP_DEFINE_CONST_FUN_OBJ_2(synthio_note_set_ring_waveform_loop_end_obj, synthio_note_set_ring_waveform_loop_end);

shared-bindings/synthio/Note.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ void common_hal_synthio_note_set_bend(synthio_note_obj_t *self, mp_obj_t value);
3131
mp_obj_t common_hal_synthio_note_get_waveform_obj(synthio_note_obj_t *self);
3232
void common_hal_synthio_note_set_waveform(synthio_note_obj_t *self, mp_obj_t value);
3333

34-
mp_int_t common_hal_synthio_note_get_waveform_loop_start(synthio_note_obj_t *self);
35-
void common_hal_synthio_note_set_waveform_loop_start(synthio_note_obj_t *self, mp_int_t value_in);
34+
mp_obj_t common_hal_synthio_note_get_waveform_loop_start(synthio_note_obj_t *self);
35+
void common_hal_synthio_note_set_waveform_loop_start(synthio_note_obj_t *self, mp_obj_t value);
3636

37-
mp_int_t common_hal_synthio_note_get_waveform_loop_end(synthio_note_obj_t *self);
38-
void common_hal_synthio_note_set_waveform_loop_end(synthio_note_obj_t *self, mp_int_t value_in);
37+
mp_obj_t common_hal_synthio_note_get_waveform_loop_end(synthio_note_obj_t *self);
38+
void common_hal_synthio_note_set_waveform_loop_end(synthio_note_obj_t *self, mp_obj_t value);
3939

4040
mp_float_t common_hal_synthio_note_get_ring_frequency(synthio_note_obj_t *self);
4141
void common_hal_synthio_note_set_ring_frequency(synthio_note_obj_t *self, mp_float_t value);
@@ -46,11 +46,11 @@ void common_hal_synthio_note_set_ring_bend(synthio_note_obj_t *self, mp_obj_t va
4646
mp_obj_t common_hal_synthio_note_get_ring_waveform_obj(synthio_note_obj_t *self);
4747
void common_hal_synthio_note_set_ring_waveform(synthio_note_obj_t *self, mp_obj_t value);
4848

49-
mp_int_t common_hal_synthio_note_get_ring_waveform_loop_start(synthio_note_obj_t *self);
50-
void common_hal_synthio_note_set_ring_waveform_loop_start(synthio_note_obj_t *self, mp_int_t value_in);
49+
mp_obj_t common_hal_synthio_note_get_ring_waveform_loop_start(synthio_note_obj_t *self);
50+
void common_hal_synthio_note_set_ring_waveform_loop_start(synthio_note_obj_t *self, mp_obj_t value);
5151

52-
mp_int_t common_hal_synthio_note_get_ring_waveform_loop_end(synthio_note_obj_t *self);
53-
void common_hal_synthio_note_set_ring_waveform_loop_end(synthio_note_obj_t *self, mp_int_t value_in);
52+
mp_obj_t common_hal_synthio_note_get_ring_waveform_loop_end(synthio_note_obj_t *self);
53+
void common_hal_synthio_note_set_ring_waveform_loop_end(synthio_note_obj_t *self, mp_obj_t value);
5454

5555
mp_obj_t common_hal_synthio_note_get_envelope_obj(synthio_note_obj_t *self);
5656
void common_hal_synthio_note_set_envelope(synthio_note_obj_t *self, mp_obj_t value);

shared-module/storage/__init__.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ void common_hal_storage_erase_filesystem(bool extended) {
264264
supervisor_flash_set_extended(extended);
265265
#endif
266266
(void)filesystem_init(false, true); // Force a re-format. Ignore failure.
267+
common_hal_mcu_on_next_reset(RUNMODE_NORMAL);
267268
common_hal_mcu_reset();
268269
// We won't actually get here, since we're resetting.
269270
}

0 commit comments

Comments
 (0)