Doc and KW_REQ changes

This commit is contained in:
gamblor21 2022-01-28 14:12:05 -06:00
parent 6916307e76
commit 19660ec66d
2 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@
//| class IS31FL3741_FrameBuffer:
//| """Creates an in-memory framebuffer for a IS31FL3741 device."""
//|
//| def __init__(self, is31: is31fl3741.IS31FL3741, width: int, height: int, mapping: Tuple[int, ...], *,
//| def __init__(self, *, is31: is31fl3741.IS31FL3741, width: int, height: int, mapping: Tuple[int, ...],
//| framebuffer: Optional[WriteableBuffer] = None, scale: bool = False, gamma: bool = False) -> None:
//| """Create a IS31FL3741_FrameBuffer object with the given attributes.
//|
@ -64,13 +64,13 @@
//| ...
//|
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) {
enum { ARG_is31, ARG_width, ARG_height, ARG_framebuffer, ARG_mapping, ARG_scale, ARG_gamma };
enum { ARG_is31, ARG_width, ARG_height, ARG_mapping, ARG_framebuffer, ARG_scale, ARG_gamma };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_is31, MP_ARG_OBJ | MP_ARG_REQUIRED | MP_ARG_KW_ONLY },
{ MP_QSTR_width, MP_ARG_INT | MP_ARG_REQUIRED | MP_ARG_KW_ONLY },
{ MP_QSTR_height, MP_ARG_INT | MP_ARG_REQUIRED | MP_ARG_KW_ONLY },
{ MP_QSTR_is31, MP_ARG_OBJ | MP_ARG_REQUIRED },
{ MP_QSTR_width, MP_ARG_INT | MP_ARG_REQUIRED },
{ MP_QSTR_height, MP_ARG_INT | MP_ARG_REQUIRED },
{ MP_QSTR_mapping, MP_ARG_OBJ | MP_ARG_REQUIRED },
{ MP_QSTR_framebuffer, MP_ARG_OBJ | MP_ARG_KW_ONLY, { .u_obj = mp_const_none } },
{ MP_QSTR_mapping, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED },
{ MP_QSTR_scale, MP_ARG_BOOL | MP_ARG_KW_ONLY, { .u_bool = false } },
{ MP_QSTR_gamma, MP_ARG_BOOL | MP_ARG_KW_ONLY, { .u_bool = false } },
};

View File

@ -125,7 +125,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(is31fl3741_IS31FL3741_set_global_current_obj, is31fl37
//| :param int value: value to set the LED to 0x00 to 0xFF
//| :param int page: page to write to 0 or 2. If the LED is a >= 180
//| the routine will automatically write to page 1 or 3 (instead
//| of 0 ot 2)"""
//| of 0 or 2)"""
//| ...
//|
STATIC mp_obj_t is31fl3741_IS31FL3741_set_led(size_t n_args, const mp_obj_t *args) {