Add epd7in3e display driver component
Ports Waveshare's official EPD_7in3e.c register/refresh sequence (the panel has no public datasheet, so their reference driver is the source of truth) to an ESP-IDF component using spi_master + gpio instead of the bcm2835/RPi hardware abstraction the reference targets. Unlike the reference driver, which toggles CS around every single byte, this holds CS low for each logical command/data phase and DMAs pixel data in 4KB chunks -- sending ~192,000 individual one-byte SPI transactions would make a full refresh impractically slow. Exposes a streaming API (epd_display_stream, pulling chunks from a caller-supplied read_fn) so the eventual HTTP fetch path can feed the panel without holding a full ~192KB frame in RAM, plus an in-memory convenience wrapper (epd_display_buffer) for cases like the upcoming QR code screen where buffering the whole frame is fine. Wired into wifi_provisioning_start() as an init + white-clear for now, to prove the driver builds/links/runs at the right point in the boot sequence ahead of the actual QR code content.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
#include "epd7in3e.h"
|
||||
#include "wifi_provisioning.h"
|
||||
|
||||
#define NVS_NAMESPACE "frame_cfg"
|
||||
@@ -370,11 +371,19 @@ void wifi_provisioning_start(void)
|
||||
char ap_password[FRAME_AP_PASSWORD_LEN + 1];
|
||||
ap_identity_get(ap_ssid, sizeof(ap_ssid), ap_password, sizeof(ap_password));
|
||||
|
||||
/* TODO(step 5): draw the WiFi-join QR code + plaintext password on the
|
||||
* e-ink panel here, before the AP goes up, so the join instructions are
|
||||
* always visible by the time the network is joinable. */
|
||||
ESP_LOGI(TAG, "Provisioning AP: SSID='%s' password='%s'", ap_ssid, ap_password);
|
||||
|
||||
/* Bring up the display before the AP so join instructions are on-screen
|
||||
* by the time the network is joinable.
|
||||
* TODO(step 5): replace this clear with the WiFi-join QR code +
|
||||
* plaintext password. */
|
||||
esp_err_t epd_err = epd_init();
|
||||
if (epd_err == ESP_OK) {
|
||||
epd_clear(EPD_COLOR_WHITE);
|
||||
} else {
|
||||
ESP_LOGW(TAG, "EPD init failed (%s), continuing without display", esp_err_to_name(epd_err));
|
||||
}
|
||||
|
||||
esp_netif_create_default_wifi_ap();
|
||||
wifi_init_softap(ap_ssid, ap_password);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user