Skip to content

Commit d8a7fa0

Browse files
committed
Documentation fixes 2
1 parent dd729d8 commit d8a7fa0

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

shared-bindings/is31fl3741/FrameBuffer.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
//| class IS31FL3741_FrameBuffer:
4141
//| """Creates an in-memory framebuffer for a IS31FL3741 device."""
4242
//|
43-
//| def __init__(self, *, width: int) -> None:
43+
//| def __init__(self, is31: ~is31fl3741.IS31FL3741, width: int, height: int, mapping: Tuple[int, ...], *,
44+
//| framebuffer: Optional[WriteableBuffer] = None, scale: bool = false, gamma: bool = false) -> None:
4445
//| """Create a IS31FL3741_FrameBuffer object with the given attributes.
4546
//|
4647
//| The framebuffer is in "RGB888" format using 4 bytes per pixel.
@@ -51,7 +52,16 @@
5152
//| by passing the Is31fl3741 object to memoryview().
5253
//|
5354
//| A Is31fl3741 is often used in conjunction with a
54-
//| `framebufferio.FramebufferDisplay`."""
55+
//| `framebufferio.FramebufferDisplay`.
56+
//|
57+
//| :param ~is31fl3741.IS31FL3741 is31: base IS31FL3741 instance to drive the framebuffer
58+
//| :param int width: width of the display
59+
//| :param int height: height of the display
60+
//| :param Tuple[int, ...] mapping: mapping of matrix locations to LEDs
61+
//| :param Optional[WriteableBuffer] framebuffer: Optional buffer to hold the display
62+
//| :param bool scale: if True display is scaled down by 3 when displayed
63+
//| :param bool gamma: if True apply gamma correction to all LEDs"""
64+
//| ...
5565
//|
5666
STATIC mp_obj_t is31fl3741_FrameBuffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
5767
enum { ARG_is31, ARG_width, ARG_height, ARG_framebuffer, ARG_mapping, ARG_scale, ARG_gamma };

shared-bindings/is31fl3741/IS31FL3741.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@
3737
//| class IS31FL3741:
3838
//| """Driver for an IS31FL3741 device."""
3939
//|
40-
//| def __init__(self, *, width: int) -> None:
40+
//| def __init__(self, i2c: busio.I2C, *, addr: int = 0x30) -> None:
4141
//| """Create a IS31FL3741 object with the given attributes.
4242
//|
4343
//| Designed to work low level or passed to and object such as
44-
//| `is31fl3741.IS31FL3741_FrameBuffer`."""
44+
//| :class:`~is31fl3741.IS31FL3741_FrameBuffer`.
45+
//|
46+
//| :param ~busio.I2C i2c: I2C bus the IS31FL3741 is on
47+
//| :param int addr: device address"""
48+
//| ...
4549
//|
4650
STATIC mp_obj_t is31fl3741_IS31FL3741_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
4751
enum { ARG_i2c, ARG_addr };
@@ -115,7 +119,7 @@ STATIC mp_obj_t is31fl3741_IS31FL3741_set_global_current(mp_obj_t self_in, mp_ob
115119
MP_DEFINE_CONST_FUN_OBJ_2(is31fl3741_IS31FL3741_set_global_current_obj, is31fl3741_IS31FL3741_set_global_current);
116120

117121
//| def set_led(self, led: int, value: int, page: int) -> None:
118-
//| """Resets the IS31FL3741 chip."""
122+
//| """Resets the IS31FL3741 chip.
119123
//|
120124
//| :param int led: which LED to set
121125
//| :param int value: value to set the LED to 0x00 to 0xFF

0 commit comments

Comments
 (0)