Metro M4 now compiles
This commit is contained in:
parent
1b9ecabf8b
commit
7e0e6fcdca
|
@ -171,7 +171,8 @@ STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
|
|||
mp_map_deinit(&poll_map);
|
||||
return mp_obj_new_tuple(3, list_array);
|
||||
}
|
||||
MICROPY_EVENT_POLL_HOOK
|
||||
// CIRCUITPY
|
||||
RUN_BACKGROUND_TASKS;
|
||||
}
|
||||
}
|
||||
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) {
|
|||
if (n_ready > 0 || (timeout != (mp_uint_t)-1 && mp_hal_ticks_ms() - start_tick >= timeout)) {
|
||||
break;
|
||||
}
|
||||
MICROPY_EVENT_POLL_HOOK
|
||||
// CIRCUITPY
|
||||
RUN_BACKGROUND_TASKS;
|
||||
if (mp_hal_is_interrupted()) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return n_ready;
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef MICROPY_INCLUDED_SAMD_PENDSV_H
|
||||
#define MICROPY_INCLUDED_SAMD_PENDSV_H
|
||||
|
||||
#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_TARGET_H
|
||||
#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_I2C_TARGET_H
|
||||
|
|
4
py/obj.h
4
py/obj.h
|
@ -898,6 +898,10 @@ extern const mp_obj_type_t mp_type_UnicodeError;
|
|||
extern const mp_obj_type_t mp_type_ValueError;
|
||||
extern const mp_obj_type_t mp_type_ViperTypeError;
|
||||
extern const mp_obj_type_t mp_type_ZeroDivisionError;
|
||||
#if CIRCUITPY_ALARM
|
||||
extern const mp_obj_type_t mp_type_DeepSleepRequest;
|
||||
#endif
|
||||
|
||||
|
||||
// Constant objects, globally accessible: None, False, True
|
||||
// These should always be accessed via the below macros.
|
||||
|
|
|
@ -228,6 +228,6 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
MP_TYPE_FLAG_ITER_IS_ITERNEXT,
|
||||
make_new, bleio_characteristic_buffer_make_new,
|
||||
locals_dict, &bleio_characteristic_buffer_locals_dict,
|
||||
iternext, mp_stream_unbuffered_iter,
|
||||
iter, mp_stream_unbuffered_iter,
|
||||
protocol, &characteristic_buffer_stream_p
|
||||
);
|
||||
|
|
|
@ -63,6 +63,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
bleio_scanresults_type,
|
||||
MP_QSTR_ScanResults,
|
||||
MP_TYPE_FLAG_ITER_IS_ITERNEXT,
|
||||
getiter, mp_identity_getiter,
|
||||
iternext, scanresults_iternext
|
||||
iter, scanresults_iternext
|
||||
);
|
||||
|
|
|
@ -288,5 +288,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
make_new, bleio_uuid_make_new,
|
||||
locals_dict, &bleio_uuid_locals_dict,
|
||||
unary_op, bleio_uuid_unary_op,
|
||||
binary_op, bleio_uuid_binary_op,
|
||||
binary_op, bleio_uuid_binary_op
|
||||
);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO___INIT___H
|
||||
#define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO___INIT___H
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/objlist.h"
|
||||
|
||||
#include "shared-bindings/_bleio/Adapter.h"
|
||||
|
@ -41,14 +42,12 @@ extern bleio_adapter_obj_t common_hal_bleio_adapter_obj;
|
|||
void bleio_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind);
|
||||
|
||||
#define MP_DEFINE_BLEIO_EXCEPTION(exc_name, base_name) \
|
||||
const mp_obj_type_t mp_type_bleio_##exc_name = { \
|
||||
{ &mp_type_type }, \
|
||||
.name = MP_QSTR_##exc_name, \
|
||||
.print = bleio_exception_print, \
|
||||
.make_new = mp_obj_exception_make_new, \
|
||||
.attr = mp_obj_exception_attr, \
|
||||
.parent = &mp_type_##base_name, \
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(mp_type_bleio_##exc_name, MP_QSTR_##exc_name, MP_TYPE_FLAG_NONE, \
|
||||
make_new, mp_obj_exception_make_new, \
|
||||
print, bleio_exception_print, \
|
||||
attr, mp_obj_exception_attr, \
|
||||
parent, &mp_type_##base_name \
|
||||
);
|
||||
|
||||
extern const mp_obj_type_t mp_type_bleio_BluetoothError;
|
||||
extern const mp_obj_type_t mp_type_bleio_RoleError;
|
||||
|
|
|
@ -259,8 +259,8 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
pixelmap_pixelmap_type,
|
||||
MP_QSTR_PixelMap,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
.locals_dict, &pixelmap_pixelmap_locals_dict,
|
||||
.make_new, pixelmap_pixelmap_make_new,
|
||||
.subscr, pixelmap_pixelmap_subscr,
|
||||
.unary_op, pixelmap_pixelmap_unary_op
|
||||
locals_dict, &pixelmap_pixelmap_locals_dict,
|
||||
make_new, pixelmap_pixelmap_make_new,
|
||||
subscr, pixelmap_pixelmap_subscr,
|
||||
unary_op, pixelmap_pixelmap_unary_op
|
||||
);
|
||||
|
|
|
@ -289,5 +289,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
MP_QSTR_I2CDevice,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
make_new, adafruit_bus_device_i2cdevice_make_new,
|
||||
locals_dict = &adafruit_bus_device_i2cdevice_locals_dict
|
||||
locals_dict, &adafruit_bus_device_i2cdevice_locals_dict
|
||||
);
|
||||
|
|
|
@ -289,5 +289,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
MP_TYPE_FLAG_NONE,
|
||||
make_new, audiomp3_mp3file_make_new,
|
||||
locals_dict, &audiomp3_mp3file_locals_dict,
|
||||
.protocol, &audiomp3_mp3file_proto
|
||||
protocol, &audiomp3_mp3file_proto
|
||||
);
|
||||
|
|
|
@ -214,12 +214,13 @@ STATIC const mp_rom_map_elem_t i2ctarget_i2c_target_locals_dict_table[] = {
|
|||
|
||||
STATIC MP_DEFINE_CONST_DICT(i2ctarget_i2c_target_locals_dict, i2ctarget_i2c_target_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t i2ctarget_i2c_target_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_I2CTarget,
|
||||
.make_new = i2ctarget_i2c_target_make_new,
|
||||
.locals_dict = (mp_obj_dict_t *)&i2ctarget_i2c_target_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
i2ctarget_i2c_target_type,
|
||||
MP_QSTR_I2CTarget,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
make_new, i2ctarget_i2c_target_make_new,
|
||||
locals_dict, &i2ctarget_i2c_target_locals_dict
|
||||
);
|
||||
|
||||
//| class I2CTargetRequest:
|
||||
//| def __init__(
|
||||
|
|
|
@ -167,7 +167,7 @@ STATIC const mp_stream_p_t eventqueue_p = {
|
|||
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
keypad_eventqueue_type,
|
||||
P_QSTR_EventQueue,
|
||||
MP_QSTR_EventQueue,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
unary_op, keypad_eventqueue_unary_op,
|
||||
#if MICROPY_PY_USELECT
|
||||
|
|
|
@ -173,7 +173,7 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
keypad_keys_type,
|
||||
MP_QSTR_Keys,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
.make_new = keypad_keys_make_new
|
||||
make_new, keypad_keys_make_new
|
||||
#if CIRCUITPY_KEYPAD_KEYS
|
||||
, locals_dict, &keypad_keys_locals_dict
|
||||
#endif
|
||||
|
|
|
@ -428,5 +428,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
locals_dict, &rgbmatrix_rgbmatrix_locals_dict,
|
||||
make_new, rgbmatrix_rgbmatrix_make_new,
|
||||
buffer, rgbmatrix_rgbmatrix_get_buffer,
|
||||
protocol = &rgbmatrix_rgbmatrix_proto
|
||||
protocol, &rgbmatrix_rgbmatrix_proto
|
||||
);
|
||||
|
|
|
@ -245,5 +245,5 @@ MP_DEFINE_CONST_OBJ_TYPE(
|
|||
vectorio_vector_shape_type,
|
||||
MP_QSTR_VectorShape,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
locals_dict = &vectorio_vector_shape_locals_dict
|
||||
locals_dict, &vectorio_vector_shape_locals_dict
|
||||
);
|
||||
|
|
|
@ -57,5 +57,5 @@ mp_obj_t shared_module_getpass_getpass(const char *prompt, mp_print_t *print) {
|
|||
}
|
||||
}
|
||||
|
||||
return mp_obj_new_str_from_vstr(&mp_type_str, &vstr);
|
||||
return mp_obj_new_str_from_vstr(&vstr);
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ STATIC mp_obj_t unpack_bytes(msgpack_stream_t *s, size_t size) {
|
|||
size -= n;
|
||||
p += n;
|
||||
}
|
||||
return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
|
||||
return mp_obj_new_bytes_from_vstr(&vstr);
|
||||
}
|
||||
|
||||
STATIC mp_obj_t unpack_ext(msgpack_stream_t *s, size_t size, mp_obj_t ext_hook) {
|
||||
|
@ -474,7 +474,7 @@ STATIC mp_obj_t unpack(msgpack_stream_t *s, mp_obj_t ext_hook, bool use_list) {
|
|||
vstr_init_len(&vstr, size);
|
||||
byte *p = (byte *)vstr.buf;
|
||||
read(s, p, size);
|
||||
return mp_obj_new_str_from_vstr(&mp_type_str, &vstr);
|
||||
return mp_obj_new_str_from_vstr(&vstr);
|
||||
}
|
||||
case 0xde:
|
||||
case 0xdf: {
|
||||
|
|
Loading…
Reference in New Issue