diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-01-18 17:04:18 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-01-18 17:04:18 -0800 |
| commit | b41d386d02f26e81dc1f234826fde7d24b020531 (patch) | |
| tree | 89f3898b5dcfeaefb52a1d6a35ad2e00b423bdac /shared-bindings | |
| parent | edc8383e2297156134a58067899eefacd5764802 (diff) | |
simplify arg checking for display
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/displayio/Display.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 4de6c2b24..d61732f6f 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -104,11 +104,6 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a mp_obj_t display_bus = args[ARG_display_bus].u_obj; - mp_int_t width = args[ARG_width].u_int; - mp_int_t height = args[ARG_height].u_int; - if (width == -1 || height == -1) { - mp_raise_ValueError(translate("Width and height kwargs required")); - } mp_buffer_info_t bufinfo; mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ); @@ -125,7 +120,7 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a } self->base.type = &displayio_display_type; common_hal_displayio_display_construct(self, - display_bus, width, height, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, + display_bus, args[ARG_width].u_int, args[ARG_height].u_int, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, args[ARG_color_depth].u_int, args[ARG_set_column_command].u_int, args[ARG_set_row_command].u_int, args[ARG_write_ram_command].u_int, bufinfo.buf, bufinfo.len); |
