Skip to content

RGBMatrix: document constructor arguments #8319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion shared-bindings/rgbmatrix/RGBMatrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,21 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
//| flicker during updates.
//|
//| A RGBMatrix is often used in conjunction with a
//| `framebufferio.FramebufferDisplay`."""
//| `framebufferio.FramebufferDisplay`.
//|
//| :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.
//| :param int tile: In a multi-row matrix, the number of rows of panels
//| :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
//| :param bool serpentine: In a multi-row matrix, True when alternate rows of panels are rotated 180°, which can reduce wiring length
//| :param Sequence[digitalio.DigitalInOut] rgb_pins: The matrix's RGB pins
//| :param Sequence[digitalio.DigitalInOut] addr_pins: The matrix's address pins
//| :param digitalio.DigitalInOut clock_pin: The matrix's clock pin
//| :param digitalio.DigitalInOut latch_pin: The matrix's latch pin
//| :param digitalio.DigitalInOut output_enable_pin: The matrix's output enable pin
//| :param bool doublebuffer: True if the output is double-buffered
//| :param Optional[WriteableBuffer] framebuffer: A pre-allocated framebuffer to use. If unspecified, a framebuffer is allocated
//| :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.
//| """

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) {
enum { ARG_width, ARG_bit_depth, ARG_rgb_list, ARG_addr_list,
Expand Down
6 changes: 5 additions & 1 deletion shared-bindings/rgbmatrix/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@

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

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

STATIC const mp_rom_map_elem_t rgbmatrix_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rgbmatrix) },
Expand Down