diff --git a/ports/atmel-samd/common-hal/protomatter/Protomatter.c b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c similarity index 98% rename from ports/atmel-samd/common-hal/protomatter/Protomatter.c rename to ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c index c9e2b0ce1c..aef17f10ea 100644 --- a/ports/atmel-samd/common-hal/protomatter/Protomatter.c +++ b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.c @@ -26,7 +26,7 @@ #include -#include "common-hal/protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" #include "samd/timers.h" #include "timer_handler.h" diff --git a/ports/atmel-samd/common-hal/protomatter/Protomatter.h b/ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.h similarity index 100% rename from ports/atmel-samd/common-hal/protomatter/Protomatter.h rename to ports/atmel-samd/common-hal/rgbmatrix/RGBMatrix.h diff --git a/ports/atmel-samd/common-hal/protomatter/__init__.c b/ports/atmel-samd/common-hal/rgbmatrix/__init__.c similarity index 100% rename from ports/atmel-samd/common-hal/protomatter/__init__.c rename to ports/atmel-samd/common-hal/rgbmatrix/__init__.c diff --git a/ports/nrf/common-hal/protomatter/Protomatter.c b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.c similarity index 98% rename from ports/nrf/common-hal/protomatter/Protomatter.c rename to ports/nrf/common-hal/rgbmatrix/RGBMatrix.c index 45d75e9127..a04e14930b 100644 --- a/ports/nrf/common-hal/protomatter/Protomatter.c +++ b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.c @@ -26,7 +26,7 @@ #include -#include "common-hal/protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" #include "peripherals/nrf/timers.h" diff --git a/ports/nrf/common-hal/protomatter/Protomatter.h b/ports/nrf/common-hal/rgbmatrix/RGBMatrix.h similarity index 100% rename from ports/nrf/common-hal/protomatter/Protomatter.h rename to ports/nrf/common-hal/rgbmatrix/RGBMatrix.h diff --git a/ports/nrf/common-hal/protomatter/__init__.c b/ports/nrf/common-hal/rgbmatrix/__init__.c similarity index 100% rename from ports/nrf/common-hal/protomatter/__init__.c rename to ports/nrf/common-hal/rgbmatrix/__init__.c diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 9954121397..ad5a80dc7e 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -182,7 +182,7 @@ ifeq ($(CIRCUITPY_PIXELBUF),1) SRC_PATTERNS += _pixelbuf/% endif ifeq ($(CIRCUITPY_PROTOMATTER),1) -SRC_PATTERNS += protomatter/% +SRC_PATTERNS += rgbmatrix/% endif ifeq ($(CIRCUITPY_PULSEIO),1) SRC_PATTERNS += pulseio/% @@ -277,8 +277,8 @@ SRC_COMMON_HAL_ALL = \ nvm/ByteArray.c \ nvm/__init__.c \ os/__init__.c \ - protomatter/Protomatter.c \ - protomatter/__init__.c \ + rgbmatrix/RGBMatrix.c \ + rgbmatrix/__init__.c \ pulseio/PWMOut.c \ pulseio/PulseIn.c \ pulseio/PulseOut.c \ @@ -366,8 +366,8 @@ SRC_SHARED_MODULE_ALL = \ random/__init__.c \ socket/__init__.c \ network/__init__.c \ - protomatter/Protomatter.c \ - protomatter/__init__.c \ + rgbmatrix/RGBMatrix.c \ + rgbmatrix/__init__.c \ storage/__init__.c \ struct/__init__.c \ terminalio/Terminal.c \ @@ -417,7 +417,7 @@ ifeq ($(CIRCUITPY_PROTOMATTER),1) SRC_MOD += $(addprefix lib/protomatter/, \ core.c \ ) -$(BUILD)/lib/protomatter/core.o: CFLAGS += -include "shared-module/protomatter/allocator.h" -DCIRCUITPY -Wno-missing-braces +$(BUILD)/lib/protomatter/core.o: CFLAGS += -include "shared-module/rgbmatrix/allocator.h" -DCIRCUITPY -Wno-missing-braces endif # All possible sources are listed here, and are filtered by SRC_PATTERNS. diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 55e04b2936..7f1da2e30c 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -463,7 +463,7 @@ extern const struct _mp_obj_module_t pixelbuf_module; #if CIRCUITPY_PROTOMATTER extern const struct _mp_obj_module_t protomatter_module; -#define PROTOMATTER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_protomatter),(mp_obj_t)&protomatter_module }, +#define PROTOMATTER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&protomatter_module }, #else #define PROTOMATTER_MODULE #endif diff --git a/shared-bindings/framebufferio/__init__.c b/shared-bindings/framebufferio/__init__.c index 0f0823a25f..88f69bb2c3 100644 --- a/shared-bindings/framebufferio/__init__.c +++ b/shared-bindings/framebufferio/__init__.c @@ -38,7 +38,7 @@ //| The `framebufferio` module contains classes to manage display output //| including synchronizing with refresh rates and partial updating. //| It is used in conjunction with classes from `displayio` to actually -//| place items on the display; and classes like `Protomatter` to actually +//| place items on the display; and classes like `RGBMatrix` to actually //| drive the display. //| //| Libraries diff --git a/shared-bindings/protomatter/Protomatter.c b/shared-bindings/rgbmatrix/RGBMatrix.c similarity index 96% rename from shared-bindings/protomatter/Protomatter.c rename to shared-bindings/rgbmatrix/RGBMatrix.c index 4554c30bf0..c62b587bf2 100644 --- a/shared-bindings/protomatter/Protomatter.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -29,8 +29,8 @@ #include "py/runtime.h" #include "py/objarray.h" -#include "common-hal/protomatter/Protomatter.h" -#include "shared-bindings/protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/util.h" @@ -38,9 +38,9 @@ #include "shared-module/framebufferio/__init__.h" #include "shared-module/framebufferio/FramebufferDisplay.h" -//| .. currentmodule:: protomatter +//| .. currentmodule:: rgbmatrix //| -//| :class:`Protomatter` -- Driver for HUB75-style RGB LED matrices +//| :class:`RGBMatrix` -- Driver for HUB75-style RGB LED matrices //| ================================================================ //| @@ -133,11 +133,11 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ } } -//| :class:`~protomatter.Protomatter` displays an in-memory framebuffer to an LED matrix. +//| :class:`~rgbmatrix.RGBMatrix` displays an in-memory framebuffer to an LED matrix. //| -//| .. class:: Protomatter(width, bit_depth, rgb_pins, addr_pins, clock_pin, latch_pin, output_enable_pin, *, doublebuffer=True, framebuffer=None) +//| .. class:: RGBMatrix(width, bit_depth, rgb_pins, addr_pins, clock_pin, latch_pin, output_enable_pin, *, doublebuffer=True, framebuffer=None) //| -//| Create a Protomatter object with the given attributes. The height of +//| Create a RGBMatrix object with the given attributes. The height of //| the display is determined by the number of rgb and address pins: //| len(rgb_pins) // 3 * 2 ** len(address_pins). With 6 RGB pins and 4 //| address lines, the display will be 32 pixels tall. @@ -171,7 +171,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| If a framebuffer is not passed in, one is allocated internally. To //| retrieve it, pass the protomatter object to memoryview(). //| -//| A Protomatter framebuffer is often used in conjunction with a +//| A RGBMatrix is often used in conjunction with a //| `framebufferio.FramebufferDisplay`. //| @@ -464,7 +464,7 @@ STATIC mp_int_t protomatter_protomatter_get_buffer(mp_obj_t self_in, mp_buffer_i const mp_obj_type_t protomatter_Protomatter_type = { { &mp_type_type }, - .name = MP_QSTR_Protomatter, + .name = MP_QSTR_RGBMatrix, .buffer_p = { .get_buffer = protomatter_protomatter_get_buffer, }, .make_new = protomatter_protomatter_make_new, .protocol = &protomatter_protomatter_proto, diff --git a/shared-bindings/protomatter/Protomatter.h b/shared-bindings/rgbmatrix/RGBMatrix.h similarity index 98% rename from shared-bindings/protomatter/Protomatter.h rename to shared-bindings/rgbmatrix/RGBMatrix.h index 061c8de4e5..0f139abff2 100644 --- a/shared-bindings/protomatter/Protomatter.h +++ b/shared-bindings/rgbmatrix/RGBMatrix.h @@ -27,7 +27,7 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_PROTOMATTER_PROTOMATTER_H #define MICROPY_INCLUDED_SHARED_BINDINGS_PROTOMATTER_PROTOMATTER_H -#include "shared-module/protomatter/Protomatter.h" +#include "shared-module/rgbmatrix/RGBMatrix.h" #include "lib/protomatter/core.h" extern const mp_obj_type_t protomatter_Protomatter_type; diff --git a/shared-bindings/protomatter/__init__.c b/shared-bindings/rgbmatrix/__init__.c similarity index 84% rename from shared-bindings/protomatter/__init__.c rename to shared-bindings/rgbmatrix/__init__.c index 8f145d1968..4b16c0e499 100644 --- a/shared-bindings/protomatter/__init__.c +++ b/shared-bindings/rgbmatrix/__init__.c @@ -29,22 +29,22 @@ #include "py/obj.h" #include "py/runtime.h" -#include "shared-bindings/protomatter/Protomatter.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" -//| :mod:`protomatter` --- Low-level routines for bitbanged LED matrices +//| :mod:`rgbmatrix` --- Low-level routines for bitbanged LED matrices //| ===================================================================== //| -//| .. module:: protomatter +//| .. module:: rgbmatrix //| :synopsis: Low-level routines for bitbanged LED matrices //| //| .. toctree:: //| :maxdepth: 3 //| -//| Protomatter +//| RGBMatrix STATIC const mp_rom_map_elem_t protomatter_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_protomatter) }, - { MP_ROM_QSTR(MP_QSTR_Protomatter), MP_ROM_PTR(&protomatter_Protomatter_type) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rgbmatrix) }, + { MP_ROM_QSTR(MP_QSTR_RGBMatrix), MP_ROM_PTR(&protomatter_Protomatter_type) }, }; STATIC MP_DEFINE_CONST_DICT(protomatter_module_globals, protomatter_module_globals_table); diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index f5045b19a2..87c0d33568 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -36,7 +36,7 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/ParallelBus.h" -#include "shared-bindings/protomatter/Protomatter.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" typedef struct { union { diff --git a/shared-module/protomatter/Protomatter.c b/shared-module/rgbmatrix/RGBMatrix.c similarity index 98% rename from shared-module/protomatter/Protomatter.c rename to shared-module/rgbmatrix/RGBMatrix.c index e7fa4ba9ae..17049494d6 100644 --- a/shared-module/protomatter/Protomatter.c +++ b/shared-module/rgbmatrix/RGBMatrix.c @@ -32,9 +32,9 @@ #include "py/objproperty.h" #include "py/runtime.h" -#include "common-hal/protomatter/Protomatter.h" -#include "shared-module/protomatter/allocator.h" -#include "shared-bindings/protomatter/Protomatter.h" +#include "common-hal/rgbmatrix/RGBMatrix.h" +#include "shared-module/rgbmatrix/allocator.h" +#include "shared-bindings/rgbmatrix/RGBMatrix.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/util.h" diff --git a/shared-module/protomatter/Protomatter.h b/shared-module/rgbmatrix/RGBMatrix.h similarity index 100% rename from shared-module/protomatter/Protomatter.h rename to shared-module/rgbmatrix/RGBMatrix.h diff --git a/shared-module/protomatter/__init__.c b/shared-module/rgbmatrix/__init__.c similarity index 100% rename from shared-module/protomatter/__init__.c rename to shared-module/rgbmatrix/__init__.c diff --git a/shared-module/protomatter/__init__.h b/shared-module/rgbmatrix/__init__.h similarity index 100% rename from shared-module/protomatter/__init__.h rename to shared-module/rgbmatrix/__init__.h diff --git a/shared-module/protomatter/allocator.h b/shared-module/rgbmatrix/allocator.h similarity index 100% rename from shared-module/protomatter/allocator.h rename to shared-module/rgbmatrix/allocator.h