Skip to content

Commit bdd8cf8

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 9126c7f + 6837e4f commit bdd8cf8

36 files changed

+2046
-21
lines changed

locale/circuitpython.pot

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ msgstr ""
216216
msgid "%q must be of type %q, %q, or %q, not %q"
217217
msgstr ""
218218

219-
#: py/argcheck.c shared-module/synthio/__init__.c
219+
#: py/argcheck.c shared-bindings/bitmapfilter/__init__.c
220+
#: shared-module/synthio/__init__.c
220221
msgid "%q must be of type %q, not %q"
221222
msgstr ""
222223

@@ -896,10 +897,6 @@ msgstr ""
896897
msgid "Deep sleep pins must use a rising edge with pulldown"
897898
msgstr ""
898899

899-
#: shared-module/jpegio/JpegDecoder.c
900-
msgid "Destination bitmap too small to contain image"
901-
msgstr ""
902-
903900
#: shared-bindings/audiobusio/PDMIn.c
904901
msgid "Destination capacity is smaller than destination_length."
905902
msgstr ""
@@ -2539,6 +2536,10 @@ msgstr ""
25392536
msgid "binary op %q not implemented"
25402537
msgstr ""
25412538

2539+
#: shared-module/bitmapfilter/__init__.c
2540+
msgid "bitmap size and depth must match"
2541+
msgstr ""
2542+
25422543
#: shared-bindings/bitmaptools/__init__.c
25432544
msgid "bitmap sizes must match"
25442545
msgstr ""
@@ -3879,10 +3880,6 @@ msgstr ""
38793880
msgid "parameters must be registers in sequence r0 to r3"
38803881
msgstr ""
38813882

3882-
#: shared-bindings/bitmaptools/__init__.c
3883-
msgid "pixel coordinates out of bounds"
3884-
msgstr ""
3885-
38863883
#: extmod/vfs_posix_file.c
38873884
msgid "poll on file not available on win32"
38883885
msgstr ""
@@ -4277,6 +4274,10 @@ msgstr ""
42774274
msgid "unsupported Xtensa instruction '%s' with %d arguments"
42784275
msgstr ""
42794276

4277+
#: shared-module/bitmapfilter/__init__.c
4278+
msgid "unsupported bitmap depth"
4279+
msgstr ""
4280+
42804281
#: shared-module/gifio/GifWriter.c
42814282
msgid "unsupported colorspace for GifWriter"
42824283
msgstr ""
@@ -4323,6 +4324,16 @@ msgstr ""
43234324
msgid "wbits"
43244325
msgstr ""
43254326

4327+
#: shared-bindings/bitmapfilter/__init__.c
4328+
msgid ""
4329+
"weights must be a sequence with an odd square number of elements (usually 9 "
4330+
"or 25)"
4331+
msgstr ""
4332+
4333+
#: shared-bindings/bitmapfilter/__init__.c
4334+
msgid "weights must be an object of type %q, %q, %q, or %q, not %q "
4335+
msgstr ""
4336+
43264337
#: shared-bindings/is31fl3741/FrameBuffer.c
43274338
msgid "width must be greater than zero"
43284339
msgstr ""

ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ CIRCUITPY_ESP_PSRAM_MODE = opi
1515
CIRCUITPY_ESP_PSRAM_FREQ = 80m
1616

1717
CIRCUITPY_ESPCAMERA = 0
18+
CIRCUITPY_BITMAPFILTER = 0
1819

1920
OPTIMIZATION_FLAGS = -Os

ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ CIRCUITPY_ESP_PSRAM_FREQ = 40m
1515

1616
OPTIMIZATION_FLAGS = -Os
1717
CIRCUITPY_ESPCAMERA = 0
18+
CIRCUITPY_BITMAPFILTER = 0
1819

1920
# Include these Python libraries in firmware.
2021
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

ports/espressif/boards/waveshare_esp32_s3_zero/mpconfigboard.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ CIRCUITPY_ESP_PSRAM_FREQ = 40m
1515

1616
OPTIMIZATION_FLAGS = -Os
1717
CIRCUITPY_ESPCAMERA = 0
18+
CIRCUITPY_BITMAPFILTER = 0
1819

1920
# Include these Python libraries in firmware.
2021
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel

ports/espressif/mpconfigport.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0
114114

115115
else ifeq ($(IDF_TARGET),esp32s3)
116116
# Modules
117+
CIRCUITPY_BITMAPFILTER ?= $(CIRCUITPY_ESPCAMERA)
117118
CIRCUITPY_PARALLELDISPLAY = 0
118119
CIRCUITPY_RGBMATRIX_USES_SUPERVISOR_ALLOCATION = 0
119120

ports/espressif/supervisor/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ void port_free(void *ptr) {
336336
heap_caps_free(ptr);
337337
}
338338

339-
void port_realloc(void *ptr, size_t size) {
340-
heap_caps_realloc(ptr, size, MALLOC_CAP_8BIT);
339+
void *port_realloc(void *ptr, size_t size) {
340+
return heap_caps_realloc(ptr, size, MALLOC_CAP_8BIT);
341341
}
342342

343343
size_t port_heap_get_largest_free_size(void) {

ports/unix/displayio_min.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
#include "shared-bindings/displayio/__init__.h"
3232
#include "shared-bindings/displayio/Bitmap.h"
33+
#include "shared-bindings/displayio/ColorConverter.h"
34+
#include "shared-bindings/displayio/Palette.h"
3335

3436
MAKE_ENUM_VALUE(displayio_colorspace_type, displayio_colorspace, RGB888, DISPLAYIO_COLORSPACE_RGB888);
3537
MAKE_ENUM_VALUE(displayio_colorspace_type, displayio_colorspace, RGB565, DISPLAYIO_COLORSPACE_RGB565);
@@ -81,6 +83,8 @@ STATIC const mp_rom_map_elem_t displayio_module_globals_table[] = {
8183
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_displayio) },
8284
{ MP_ROM_QSTR(MP_QSTR_Bitmap), MP_ROM_PTR(&displayio_bitmap_type) },
8385
{ MP_ROM_QSTR(MP_QSTR_Colorspace), MP_ROM_PTR(&displayio_colorspace_type) },
86+
{ MP_ROM_QSTR(MP_QSTR_ColorConverter), MP_ROM_PTR(&displayio_colorconverter_type) },
87+
{ MP_ROM_QSTR(MP_QSTR_Palette), MP_ROM_PTR(&displayio_palette_type) },
8488
};
8589
STATIC MP_DEFINE_CONST_DICT(displayio_module_globals, displayio_module_globals_table);
8690

ports/unix/variants/coverage/mpconfigvariant.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ SRC_BITMAP := \
3434
shared-bindings/audiomixer/__init__.c \
3535
shared-bindings/audiomixer/Mixer.c \
3636
shared-bindings/audiomixer/MixerVoice.c \
37+
shared-bindings/bitmapfilter/__init__.c \
3738
shared-bindings/bitmaptools/__init__.c \
3839
shared-bindings/codeop/__init__.c \
3940
shared-bindings/displayio/Bitmap.c \
41+
shared-bindings/displayio/ColorConverter.c \
42+
shared-bindings/displayio/Palette.c \
4043
shared-bindings/jpegio/__init__.c \
4144
shared-bindings/jpegio/JpegDecoder.c \
4245
shared-bindings/locale/__init__.c \
@@ -60,11 +63,12 @@ SRC_BITMAP := \
6063
shared-module/audiomixer/__init__.c \
6164
shared-module/audiomixer/Mixer.c \
6265
shared-module/audiomixer/MixerVoice.c \
66+
shared-module/bitmapfilter/__init__.c \
6367
shared-module/bitmaptools/__init__.c \
6468
shared-module/displayio/area.c \
6569
shared-module/displayio/Bitmap.c \
6670
shared-module/displayio/ColorConverter.c \
67-
shared-module/displayio/ColorConverter.c \
71+
shared-module/displayio/Palette.c \
6872
shared-module/jpegio/__init__.c \
6973
shared-module/jpegio/JpegDecoder.c \
7074
shared-module/os/getenv.c \

py/circuitpy_defns.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ endif
144144
ifeq ($(CIRCUITPY_BITMAPTOOLS),1)
145145
SRC_PATTERNS += bitmaptools/%
146146
endif
147+
ifeq ($(CIRCUITPY_BITMAPFILTER),1)
148+
SRC_PATTERNS += bitmapfilter/%
149+
endif
147150
ifeq ($(CIRCUITPY_BITOPS),1)
148151
SRC_PATTERNS += bitops/%
149152
endif
@@ -609,6 +612,7 @@ SRC_SHARED_MODULE_ALL = \
609612
bitbangio/SPI.c \
610613
bitbangio/__init__.c \
611614
bitmaptools/__init__.c \
615+
bitmapfilter/__init__.c \
612616
bitops/__init__.c \
613617
board/__init__.c \
614618
adafruit_bus_device/__init__.c \

py/circuitpy_mpconfig.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ CFLAGS += -DCIRCUITPY_BITBANG_APA102=$(CIRCUITPY_BITBANG_APA102)
147147
CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD)
148148
CFLAGS += -DCIRCUITPY_BITBANGIO=$(CIRCUITPY_BITBANGIO)
149149

150+
# bitmapfilter also depends on displayio, but is disabled by default
151+
CIRCUITPY_BITMAPFILTER ?= 0
152+
CFLAGS += -DCIRCUITPY_BITMAPFILTER=$(CIRCUITPY_BITMAPFILTER)
153+
150154
CIRCUITPY_BITOPS ?= 0
151155
CFLAGS += -DCIRCUITPY_BITOPS=$(CIRCUITPY_BITOPS)
152156

@@ -236,7 +240,7 @@ CFLAGS += -DCIRCUITPY_DOTCLOCKFRAMEBUFFER=$(CIRCUITPY_DOTCLOCKFRAMEBUFFER)
236240
CIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION ?= 1
237241
CFLAGS += -DCIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION=$(CIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION)
238242

239-
# bitmaptools and framebufferio rely on displayio
243+
# bitmaptools and framebufferio rely on displayio and are not on small boards
240244
CIRCUITPY_BITMAPTOOLS ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_DISPLAYIO))
241245
CIRCUITPY_FRAMEBUFFERIO ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_DISPLAYIO))
242246
CIRCUITPY_VECTORIO ?= $(CIRCUITPY_DISPLAYIO)

0 commit comments

Comments
 (0)