Skip to content

Commit b04f913

Browse files
committed
RGBMatrix: fix memoryview(matrix)
Typical test: ```python import displayio import rgbmatrix import board displayio.release_displays() matrix = rgbmatrix.RGBMatrix( width=128, bit_depth=4, rgb_pins=[board.GP0, board.GP1, board.GP2, board.GP3, board.GP4, board.GP5], addr_pins=[board.GP6, board.GP7, board.GP8, board.GP9], clock_pin=board.GP10, latch_pin=board.GP11, output_enable_pin=board.GP12) mem = memoryview(matrix) mem[0] = 65535 # OK mem[0] = 65536 # errors (out of range) ```
1 parent 155b61f commit b04f913

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shared-bindings/rgbmatrix/RGBMatrix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ STATIC mp_int_t rgbmatrix_rgbmatrix_get_buffer(mp_obj_t self_in, mp_buffer_info_
441441
return 1;
442442
}
443443
*bufinfo = self->bufinfo;
444+
bufinfo->typecode = 'H';
444445
return 0;
445446
}
446447

0 commit comments

Comments
 (0)