mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-23 05:24:46 +00:00

* chore: todo.txt
* chore: InkHUD documentation
Word salad for maintainers
* refactor: don't init system applets using onActivate
System applets cannot be deactivated, so we will avoid using onActivate / onDeactivate methods entirely.
* chore: update the example applets
* fix: SSD16XX reset pulse
Allow time for controller IC to wake. Aligns with manufacturer's suggestions.
T-Echo button timing adjusted to prevent bouncing as a result(?) of slightly faster refreshes.
* fix: allow timeout if display update fails
Result is not graceful, but avoids total display lockup requiring power cycle.
Typical cause of failure is poor wiring / power supply.
* fix: improve display health on shutdown
Two extra full refreshes, masquerading as a "shutting down" screen. One is drawn white-on-black, to really shake the pixels up.
* feat: driver for display HINK_E042A87
As of Feb. 2025, these panels are used for "WeActStudio 4.2in B&W" display modules.
* fix: inkhud rotation should default to 0
* Revert "chore: todo.txt"
This reverts commit bea7df44a7
.
* fix: more generous timeout for display updates
Previously this was tied to the expected duration of the update, but this didn't account for any delay if our polling thread got held up by an unrelated firmware task.
* fix: don't use the full shutdown screen during reboot
* fix: cooldown period during the display shutdown display sequence
Observed to prevent border pixels from being locked in place with some residual charge?
65 lines
2.3 KiB
C++
65 lines
2.3 KiB
C++
/*
|
|
|
|
E-Ink base class for displays based on SSD16XX
|
|
|
|
Most (but not all) SPI E-Ink displays use this family of controller IC.
|
|
Implementing new SSD16XX displays should be fairly painless.
|
|
See DEPG0154BNS800 and DEPG0290BNS800 for examples.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
|
|
|
#include "configuration.h"
|
|
|
|
#include "./EInk.h"
|
|
|
|
namespace NicheGraphics::Drivers
|
|
{
|
|
|
|
class SSD16XX : public EInk
|
|
{
|
|
public:
|
|
SSD16XX(uint16_t width, uint16_t height, UpdateTypes supported, uint8_t bufferOffsetX = 0);
|
|
virtual void begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst = -1);
|
|
virtual void update(uint8_t *imageData, UpdateTypes type) override;
|
|
|
|
protected:
|
|
virtual void wait(uint32_t timeout = 1000);
|
|
virtual void reset();
|
|
virtual void sendCommand(const uint8_t command);
|
|
virtual void sendData(const uint8_t data);
|
|
virtual void sendData(const uint8_t *data, uint32_t size);
|
|
virtual void configFullscreen(); // Select memory region on controller IC
|
|
virtual void configScanning() {} // Optional. First & last gates, scan direction, etc
|
|
virtual void configVoltages() {} // Optional. Manual panel voltages, soft-start, etc
|
|
virtual void configWaveform() {} // Optional. LUT, panel border, temperature sensor, etc
|
|
virtual void configUpdateSequence(); // Tell controller IC which operations to run
|
|
|
|
virtual void writeNewImage();
|
|
virtual void writeOldImage(); // Image which can be used at *next* update for "differential refresh"
|
|
|
|
virtual void detachFromUpdate();
|
|
virtual bool isUpdateDone() override;
|
|
virtual void finalizeUpdate() override;
|
|
|
|
protected:
|
|
uint8_t bufferOffsetX = 0; // In bytes. Panel x=0 does not always align with controller x=0. Quirky internal wiring?
|
|
uint8_t bufferRowSize = 0; // In bytes. Rows store 8 pixels per byte. Rounded up to fit (e.g. 122px would require 16 bytes)
|
|
uint32_t bufferSize = 0; // In bytes. Rows * Columns
|
|
uint8_t *buffer = nullptr;
|
|
UpdateTypes updateType = UpdateTypes::UNSPECIFIED;
|
|
|
|
uint8_t pin_dc = -1;
|
|
uint8_t pin_cs = -1;
|
|
uint8_t pin_busy = -1;
|
|
uint8_t pin_rst = -1;
|
|
SPIClass *spi = nullptr;
|
|
SPISettings spiSettings = SPISettings(4000000, MSBFIRST, SPI_MODE0);
|
|
};
|
|
|
|
} // namespace NicheGraphics::Drivers
|
|
|
|
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|