3434#include "shared-bindings/vectorio/VectorShape.h"
3535#endif
3636
37- static void check_rom (displayio_group_t * self ) {
37+ static void check_readonly (displayio_group_t * self ) {
3838 if (self -> readonly ) {
3939 mp_raise_RuntimeError (MP_ERROR_TEXT ("Read-only" ));
4040 }
@@ -53,7 +53,7 @@ void common_hal_displayio_group_set_hidden(displayio_group_t *self, bool hidden)
5353 if (self -> hidden == hidden ) {
5454 return ;
5555 }
56- check_rom (self );
56+ check_readonly (self );
5757 self -> hidden = hidden ;
5858 if (self -> hidden_by_parent ) {
5959 return ;
@@ -87,7 +87,7 @@ void displayio_group_set_hidden_by_parent(displayio_group_t *self, bool hidden)
8787 if (self -> hidden_by_parent == hidden ) {
8888 return ;
8989 }
90- check_rom (self );
90+ check_readonly (self );
9191 self -> hidden_by_parent = hidden ;
9292 // If we're already hidden, then we're done.
9393 if (self -> hidden ) {
@@ -216,7 +216,7 @@ void common_hal_displayio_group_set_scale(displayio_group_t *self, uint32_t scal
216216 if (self -> scale == scale ) {
217217 return ;
218218 }
219- check_rom (self );
219+ check_readonly (self );
220220 uint8_t parent_scale = self -> absolute_transform .scale / self -> scale ;
221221 self -> absolute_transform .dx = self -> absolute_transform .dx / self -> scale * scale ;
222222 self -> absolute_transform .dy = self -> absolute_transform .dy / self -> scale * scale ;
@@ -233,7 +233,7 @@ void common_hal_displayio_group_set_x(displayio_group_t *self, mp_int_t x) {
233233 if (self -> x == x ) {
234234 return ;
235235 }
236- check_rom (self );
236+ check_readonly (self );
237237 if (self -> absolute_transform .transpose_xy ) {
238238 int16_t dy = self -> absolute_transform .dy / self -> scale ;
239239 self -> absolute_transform .y += dy * (x - self -> x );
@@ -254,7 +254,7 @@ void common_hal_displayio_group_set_y(displayio_group_t *self, mp_int_t y) {
254254 if (self -> y == y ) {
255255 return ;
256256 }
257- check_rom (self );
257+ check_readonly (self );
258258 if (self -> absolute_transform .transpose_xy ) {
259259 int8_t dx = self -> absolute_transform .dx / self -> scale ;
260260 self -> absolute_transform .x += dx * (y - self -> y );
@@ -267,7 +267,7 @@ void common_hal_displayio_group_set_y(displayio_group_t *self, mp_int_t y) {
267267}
268268
269269static void _add_layer (displayio_group_t * self , mp_obj_t layer ) {
270- check_rom (self );
270+ check_readonly (self );
271271 #if CIRCUITPY_VECTORIO
272272 const vectorio_draw_protocol_t * draw_protocol = mp_proto_get (MP_QSTR_protocol_draw , layer );
273273 if (draw_protocol != NULL ) {
@@ -305,7 +305,7 @@ static void _add_layer(displayio_group_t *self, mp_obj_t layer) {
305305}
306306
307307static void _remove_layer (displayio_group_t * self , size_t index ) {
308- check_rom (self );
308+ check_readonly (self );
309309 mp_obj_t layer ;
310310 displayio_area_t layer_area ;
311311 bool rendered_last_frame = false;
0 commit comments