Skip to content

Commit dd729d8

Browse files
committed
Documentation updates
1 parent af93817 commit dd729d8

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

shared-bindings/is31fl3741/FrameBuffer.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@
3838
#include "shared-bindings/busio/I2C.h"
3939

4040
//| class IS31FL3741_FrameBuffer:
41-
//| """Displays an in-memory framebuffer to a IS31FL3741 drive display."""
41+
//| """Creates an in-memory framebuffer for a IS31FL3741 device."""
4242
//|
43-
4443
//| def __init__(self, *, width: int) -> None:
45-
//| """Create a IS31FL3741 object with the given attributes.
44+
//| """Create a IS31FL3741_FrameBuffer object with the given attributes.
4645
//|
4746
//| The framebuffer is in "RGB888" format using 4 bytes per pixel.
4847
//| Bits 24-31 are ignored. The format is in RGB order.

shared-bindings/is31fl3741/IS31FL3741.c

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
#include "shared-bindings/busio/I2C.h"
3636

3737
//| class IS31FL3741:
38-
//| """Driver for a IS31FL3741 device."""
38+
//| """Driver for an IS31FL3741 device."""
3939
//|
40-
4140
//| def __init__(self, *, width: int) -> None:
4241
//| """Create a IS31FL3741 object with the given attributes.
4342
//|
@@ -79,20 +78,34 @@ STATIC mp_obj_t is31fl3741_IS31FL3741_deinit(mp_obj_t self_in) {
7978
}
8079
STATIC MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_IS31FL3741_deinit_obj, is31fl3741_IS31FL3741_deinit);
8180

81+
//| def reset(self) -> None:
82+
//| """Resets the IS31FL3741 chip."""
83+
//| ...
84+
//|
8285
STATIC mp_obj_t is31fl3741_IS31FL3741_reset(mp_obj_t self_in) {
8386
is31fl3741_IS31FL3741_obj_t *self = MP_OBJ_TO_PTR(self_in);
8487
common_hal_is31fl3741_send_reset(self);
8588
return mp_const_none;
8689
}
8790
MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_IS31FL3741_reset_obj, is31fl3741_IS31FL3741_reset);
8891

92+
//| def enable(self) -> None:
93+
//| """Enables the IS31FL3741 chip."""
94+
//| ...
95+
//|
8996
STATIC mp_obj_t is31fl3741_IS31FL3741_enable(mp_obj_t self_in) {
9097
is31fl3741_IS31FL3741_obj_t *self = MP_OBJ_TO_PTR(self_in);
9198
common_hal_is31fl3741_send_enable(self);
9299
return mp_const_none;
93100
}
94101
MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_IS31FL3741_enable_obj, is31fl3741_IS31FL3741_enable);
95102

103+
//| def set_global_current(self, current: int) -> None:
104+
//| """Sets the global current of the IS31FL3741 chip.
105+
//|
106+
//| :param int current: global current value 0x00 to 0xFF"""
107+
//| ...
108+
//|
96109
STATIC mp_obj_t is31fl3741_IS31FL3741_set_global_current(mp_obj_t self_in, mp_obj_t value) {
97110
is31fl3741_IS31FL3741_obj_t *self = MP_OBJ_TO_PTR(self_in);
98111
mp_int_t current = mp_obj_get_int(value);
@@ -101,6 +114,16 @@ STATIC mp_obj_t is31fl3741_IS31FL3741_set_global_current(mp_obj_t self_in, mp_ob
101114
}
102115
MP_DEFINE_CONST_FUN_OBJ_2(is31fl3741_IS31FL3741_set_global_current_obj, is31fl3741_IS31FL3741_set_global_current);
103116

117+
//| def set_led(self, led: int, value: int, page: int) -> None:
118+
//| """Resets the IS31FL3741 chip."""
119+
//|
120+
//| :param int led: which LED to set
121+
//| :param int value: value to set the LED to 0x00 to 0xFF
122+
//| :param int page: page to write to 0 or 2. If the LED is a >= 180
123+
//| the routine will automatically write to page 1 or 3 (instead
124+
//| of 0 ot 2)"""
125+
//| ...
126+
//|
104127
STATIC mp_obj_t is31fl3741_IS31FL3741_set_led(size_t n_args, const mp_obj_t *args) {
105128
is31fl3741_IS31FL3741_obj_t *self = MP_OBJ_TO_PTR(args[0]);
106129
mp_int_t led = mp_obj_get_int(args[1]);
@@ -111,7 +134,7 @@ STATIC mp_obj_t is31fl3741_IS31FL3741_set_led(size_t n_args, const mp_obj_t *arg
111134
}
112135
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(is31fl3741_IS31FL3741_set_led_obj, 4, 4, is31fl3741_IS31FL3741_set_led);
113136

114-
//| def is31fl3741_write(mapping: Tuple[int, ...], buf: ReadableBuffer) -> None:
137+
//| def write(mapping: Tuple[int, ...], buf: ReadableBuffer) -> None:
115138
//| """Write buf out on the I2C bus to the IS31FL3741.
116139
//|
117140
//| :param ~Tuple[int, ...] mapping: map the pixels in the buffer to the order addressed by the driver chip

0 commit comments

Comments
 (0)