[riot-notifications] [RIOT-OS/RIOT] black/white e-Paper/e-Ink display driver (#12509)

Silke Hofstra notifications at github.com
Wed May 19 18:38:33 CEST 2021


@silkeh commented on this pull request.



> +void epd_bw_spi_wait(epd_bw_spi_params_t *p, uint32_t usec)
+{
+    if (p->busy_pin != GPIO_UNDEF) {
+        DEBUG("[epd_bw_spi] wait: for busy bin\n");
+        while (gpio_read(p->busy_pin)) {}
+    }
+    else {
+        DEBUG("[epd_bw_spi] wait: for %" PRIu32 " microseconds\n", usec);
+        xtimer_usleep(usec);
+    }
+}
+
+int epd_bw_spi_init(epd_bw_spi_t *dev,
+                    const epd_bw_spi_params_t *params,
+                    const epd_bw_spi_controller_t *controller,
+                    uint8_t size_x, uint16_t size_y,

Sure, that would work as well.

>From a usability perspective I wonder if it wouldn't be nicer to have definitions for the display/controller combinations. A user usually has a 1.54inch waveshare display, and while that actually is a 200x200 display connected to a IL3829 controller, it requires some digging to know this. For boards with included displays that isn't really an issue, but I think usage probably skews towards user-connected displays. So maybe instead of adding it to the params directly, it might be nicer to combine the controller and display parameters in a `epd_bw_spi_display_t`?

> And from the controller struct, remove size_x and size_y attributes.

The `size_x` and `size_y` of the controller are properties of the controller (the maximum supported resolution), not the resolution of the display. I don't think there are any displays out there where a 16-bit controller is used while the resolution of the connected display fits in 8 bits, but having them as separate parameters allows for that possibility.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12509#discussion_r635410565
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210519/4071d9d5/attachment-0001.htm>


More information about the notifications mailing list