diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index d947ab34c0..b7ff2fcbaa 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -91,7 +91,7 @@ INC += -I../../supervisor/shared/usb ifeq ($(DEBUG), 1) CFLAGS += -ggdb # You may want to enable these flags to make setting breakpoints easier. - CFLAGS += -fno-inline -fno-ipa-sra + # CFLAGS += -fno-inline -fno-ipa-sra else CFLAGS += -Os -DNDEBUG # TODO: Test with -flto diff --git a/shared-bindings/bleio/Peripheral.c b/shared-bindings/bleio/Peripheral.c index ca703bd535..4492a8e269 100644 --- a/shared-bindings/bleio/Peripheral.c +++ b/shared-bindings/bleio/Peripheral.c @@ -117,11 +117,8 @@ STATIC mp_obj_t bleio_peripheral_make_new(const mp_obj_type_t *type, size_t n_ar } const mp_obj_t name = args[ARG_name].u_obj; - if (name == MP_OBJ_NULL) { + if (name == MP_OBJ_NULL || name == mp_const_none) { self->name = mp_obj_new_str(default_name, strlen(default_name)); - } else if (name == mp_const_none) { - // Make None be the empty string. - self->name = MP_OBJ_NEW_QSTR(MP_QSTR_); } else if (MP_OBJ_IS_STR(name)) { self->name = name; } else { diff --git a/shared-bindings/bleio/ScanEntry.c b/shared-bindings/bleio/ScanEntry.c index 475bade153..f66b3df4b8 100644 --- a/shared-bindings/bleio/ScanEntry.c +++ b/shared-bindings/bleio/ScanEntry.c @@ -55,6 +55,7 @@ STATIC mp_obj_t bleio_scanentry_get_address(mp_obj_t self_in) { bleio_scanentry_obj_t *self = MP_OBJ_TO_PTR(self_in); bleio_address_obj_t *address = m_new_obj(bleio_address_obj_t); + address->base.type = &bleio_address_type; memcpy(address->bytes, self->address.bytes, NUM_BLEIO_ADDRESS_BYTES); address->type = self->address.type; return MP_OBJ_TO_PTR(address); diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index 97b704c40e..43ce36ed37 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -440,7 +440,7 @@ void displayio_tilegrid_finish_refresh(displayio_tilegrid_t *self) { displayio_area_t* displayio_tilegrid_get_refresh_areas(displayio_tilegrid_t *self, displayio_area_t* tail) { if (self->moved && !self->first_draw) { displayio_area_union(&self->previous_area, &self->current_area, &self->dirty_area); - if (displayio_area_size(&self->dirty_area) <= 2 * self->pixel_width * self->pixel_height) { + if (displayio_area_size(&self->dirty_area) <= 2U * self->pixel_width * self->pixel_height) { self->dirty_area.next = tail; return &self->dirty_area; }