Skip to content

Commit 7e0e6fc

Browse files
committed
Metro M4 now compiles
1 parent 1b9ecab commit 7e0e6fc

17 files changed

Lines changed: 41 additions & 35 deletions

File tree

extmod/moduselect.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
171171
mp_map_deinit(&poll_map);
172172
return mp_obj_new_tuple(3, list_array);
173173
}
174-
MICROPY_EVENT_POLL_HOOK
174+
// CIRCUITPY
175+
RUN_BACKGROUND_TASKS;
175176
}
176177
}
177178
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_select_obj, 3, 4, select_select);
@@ -250,7 +251,11 @@ STATIC mp_uint_t poll_poll_internal(uint n_args, const mp_obj_t *args) {
250251
if (n_ready > 0 || (timeout != (mp_uint_t)-1 && mp_hal_ticks_ms() - start_tick >= timeout)) {
251252
break;
252253
}
253-
MICROPY_EVENT_POLL_HOOK
254+
// CIRCUITPY
255+
RUN_BACKGROUND_TASKS;
256+
if (mp_hal_is_interrupted()) {
257+
return 0;
258+
}
254259
}
255260

256261
return n_ready;

ports/atmel-samd/common-hal/i2ctarget/I2CTarget.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
* THE SOFTWARE.
2525
*/
26-
#ifndef MICROPY_INCLUDED_SAMD_PENDSV_H
27-
#define MICROPY_INCLUDED_SAMD_PENDSV_H
2826

2927
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_TARGET_H
3028
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_TARGET_H

py/obj.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,10 @@ extern const mp_obj_type_t mp_type_UnicodeError;
898898
extern const mp_obj_type_t mp_type_ValueError;
899899
extern const mp_obj_type_t mp_type_ViperTypeError;
900900
extern const mp_obj_type_t mp_type_ZeroDivisionError;
901+
#if CIRCUITPY_ALARM
902+
extern const mp_obj_type_t mp_type_DeepSleepRequest;
903+
#endif
904+
901905

902906
// Constant objects, globally accessible: None, False, True
903907
// These should always be accessed via the below macros.

shared-bindings/_bleio/CharacteristicBuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,6 @@ MP_DEFINE_CONST_OBJ_TYPE(
228228
MP_TYPE_FLAG_ITER_IS_ITERNEXT,
229229
make_new, bleio_characteristic_buffer_make_new,
230230
locals_dict, &bleio_characteristic_buffer_locals_dict,
231-
iternext, mp_stream_unbuffered_iter,
231+
iter, mp_stream_unbuffered_iter,
232232
protocol, &characteristic_buffer_stream_p
233233
);

shared-bindings/_bleio/ScanResults.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
6363
bleio_scanresults_type,
6464
MP_QSTR_ScanResults,
6565
MP_TYPE_FLAG_ITER_IS_ITERNEXT,
66-
getiter, mp_identity_getiter,
67-
iternext, scanresults_iternext
66+
iter, scanresults_iternext
6867
);

shared-bindings/_bleio/UUID.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,5 +288,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
288288
make_new, bleio_uuid_make_new,
289289
locals_dict, &bleio_uuid_locals_dict,
290290
unary_op, bleio_uuid_unary_op,
291-
binary_op, bleio_uuid_binary_op,
291+
binary_op, bleio_uuid_binary_op
292292
);

shared-bindings/_bleio/__init__.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO___INIT___H
3030
#define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO___INIT___H
3131

32+
#include "py/obj.h"
3233
#include "py/objlist.h"
3334

3435
#include "shared-bindings/_bleio/Adapter.h"
@@ -41,14 +42,12 @@ extern bleio_adapter_obj_t common_hal_bleio_adapter_obj;
4142
void bleio_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind);
4243

4344
#define MP_DEFINE_BLEIO_EXCEPTION(exc_name, base_name) \
44-
const mp_obj_type_t mp_type_bleio_##exc_name = { \
45-
{ &mp_type_type }, \
46-
.name = MP_QSTR_##exc_name, \
47-
.print = bleio_exception_print, \
48-
.make_new = mp_obj_exception_make_new, \
49-
.attr = mp_obj_exception_attr, \
50-
.parent = &mp_type_##base_name, \
51-
};
45+
MP_DEFINE_CONST_OBJ_TYPE(mp_type_bleio_##exc_name, MP_QSTR_##exc_name, MP_TYPE_FLAG_NONE, \
46+
make_new, mp_obj_exception_make_new, \
47+
print, bleio_exception_print, \
48+
attr, mp_obj_exception_attr, \
49+
parent, &mp_type_##base_name \
50+
);
5251

5352
extern const mp_obj_type_t mp_type_bleio_BluetoothError;
5453
extern const mp_obj_type_t mp_type_bleio_RoleError;

shared-bindings/_pixelmap/PixelMap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ MP_DEFINE_CONST_OBJ_TYPE(
259259
pixelmap_pixelmap_type,
260260
MP_QSTR_PixelMap,
261261
MP_TYPE_FLAG_NONE,
262-
.locals_dict, &pixelmap_pixelmap_locals_dict,
263-
.make_new, pixelmap_pixelmap_make_new,
264-
.subscr, pixelmap_pixelmap_subscr,
265-
.unary_op, pixelmap_pixelmap_unary_op
262+
locals_dict, &pixelmap_pixelmap_locals_dict,
263+
make_new, pixelmap_pixelmap_make_new,
264+
subscr, pixelmap_pixelmap_subscr,
265+
unary_op, pixelmap_pixelmap_unary_op
266266
);

shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,5 +289,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
289289
MP_QSTR_I2CDevice,
290290
MP_TYPE_FLAG_NONE,
291291
make_new, adafruit_bus_device_i2cdevice_make_new,
292-
locals_dict = &adafruit_bus_device_i2cdevice_locals_dict
292+
locals_dict, &adafruit_bus_device_i2cdevice_locals_dict
293293
);

shared-bindings/audiomp3/MP3Decoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,5 +289,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
289289
MP_TYPE_FLAG_NONE,
290290
make_new, audiomp3_mp3file_make_new,
291291
locals_dict, &audiomp3_mp3file_locals_dict,
292-
.protocol, &audiomp3_mp3file_proto
292+
protocol, &audiomp3_mp3file_proto
293293
);

0 commit comments

Comments
 (0)