Skip to content

Commit acc4ee9

Browse files
authored
Merge pull request #8319 from jepler/document-rgbmatrix-8283
RGBMatrix: document constructor arguments
2 parents 283889b + c1dce99 commit acc4ee9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

shared-bindings/rgbmatrix/RGBMatrix.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,21 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
186186
//| flicker during updates.
187187
//|
188188
//| A RGBMatrix is often used in conjunction with a
189-
//| `framebufferio.FramebufferDisplay`."""
189+
//| `framebufferio.FramebufferDisplay`.
190+
//|
191+
//| :param int width: The overall width of the whole matrix in pixels. For a matrix with multiple panels in row, this is the width of a single panel times the number of panels across.
192+
//| :param int tile: In a multi-row matrix, the number of rows of panels
193+
//| :param int bit_depth: The color depth of the matrix. A value of 1 gives 8 colors, a value of 2 gives 64 colors, and so on. Increasing bit depth increases the CPU and RAM usage of the RGBMatrix, and may lower the panel refresh rate. The framebuffer is always in RGB565 format regardless of the bit depth setting
194+
//| :param bool serpentine: In a multi-row matrix, True when alternate rows of panels are rotated 180°, which can reduce wiring length
195+
//| :param Sequence[digitalio.DigitalInOut] rgb_pins: The matrix's RGB pins
196+
//| :param Sequence[digitalio.DigitalInOut] addr_pins: The matrix's address pins
197+
//| :param digitalio.DigitalInOut clock_pin: The matrix's clock pin
198+
//| :param digitalio.DigitalInOut latch_pin: The matrix's latch pin
199+
//| :param digitalio.DigitalInOut output_enable_pin: The matrix's output enable pin
200+
//| :param bool doublebuffer: True if the output is double-buffered
201+
//| :param Optional[WriteableBuffer] framebuffer: A pre-allocated framebuffer to use. If unspecified, a framebuffer is allocated
202+
//| :param int height: The optional overall height of the whole matrix in pixels. This value is not required because it can be calculated as described above.
203+
//| """
190204

191205
STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
192206
enum { ARG_width, ARG_bit_depth, ARG_rgb_list, ARG_addr_list,

shared-bindings/rgbmatrix/__init__.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131

3232
#include "shared-bindings/rgbmatrix/RGBMatrix.h"
3333

34-
//| """Low-level routines for bitbanged LED matrices"""
34+
//| """Low-level routines for bitbanged LED matrices
35+
//|
36+
//| For more information about working with RGB matrix panels in CircuitPython, see
37+
//| `the dedicated learn guide <https://learn.adafruit.com/rgb-led-matrices-matrix-panels-with-circuitpython>`_.
38+
//| """
3539

3640
STATIC const mp_rom_map_elem_t rgbmatrix_module_globals_table[] = {
3741
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rgbmatrix) },

0 commit comments

Comments
 (0)