8000 Revert "rgbmatrix: Avoid leaving an incompletely configured display bus" · adafruit/circuitpython@57169fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 57169fc

Browse files
authored
Revert "rgbmatrix: Avoid leaving an incompletely configured display bus"
1 parent 6232e87 commit 57169fc

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,3 @@ CIRCUITPY_GIFIO = 0
1616
CIRCUITPY_JPEGIO = 0
1717

1818
CIRCUITPY_BITBANG_APA102 = 1
19-
20-
# We don't have room for the fonts for terminalio for certain languages,
21-
# so turn off terminalio, and if it's off and displayio is on,
22-
# force a clean build.
23-
# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an
24-
# ifeq, because it's not set yet.
25-
ifneq (,$(filter $(TRANSLATION),ja ko ru))
26-
CIRCUITPY_TERMINALIO = 0
27-
RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO)
28-
endif

shared-bindings/rgbmatrix/RGBMatrix.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ static void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
116116
#endif
117117
}
118118

119-
typedef struct {
120-
nlr_jump_callback_node_t callback;
121-
mp_obj_base_t *base_ptr;
122-
} nlr_jump_callback_node_clear_displaybus_t;
123-
124-
static void clear_display_bus(void *node_in) {
125-
nlr_jump_callback_node_clear_displaybus_t *node = node_in;
126-
node->base_ptr->type = &mp_type_NoneType;
127-
}
128-
129119
//| def __init__(
130120
//| self,
131121
//| *,
@@ -227,13 +217,6 @@ static mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
227217
rgbmatrix_rgbmatrix_obj_t *self = &allocate_display_bus_or_raise()->rgbmatrix;
228218
self->base.type = &rgbmatrix_RGBMatrix_type;
229219

230-
// If an exception is thrown, ensure the display bus object's type is set
231-
// back to the uninitialized/deinitialied type. **note that all other resource
232-
// deallocations must be handled by the shared-module code**
233-
nlr_jump_callback_node_clear_displaybus_t node;
234-
node.base_ptr = &self->base;
235-
nlr_push_jump_callback(&node.callback, clear_display_bus);
236-
237220
uint8_t rgb_count, addr_count;
238221
uint8_t rgb_pins[MP_ARRAY_SIZE(self->rgb_pins)];
239222
uint8_t addr_pins[MP_ARRAY_SIZE(self->addr_pins)];
@@ -271,6 +254,7 @@ static mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
271254
clock_pin, latch_pin, output_enable_pin,
272255
args[ARG_doublebuffer].u_bool,
273256
args[ARG_framebuffer].u_obj, tile, args[ARG_serpentine].u_bool, NULL);
257+
274258
claim_and_never_reset_pins(args[ARG_rgb_list].u_obj);
275259
claim_and_never_reset_pins(args[ARG_addr_list].u_obj);
276260
claim_and_never_reset_pin(args[ARG_clock_pin].u_obj);

0 commit comments

Comments
 (0)
0