17#include "isf15acp4_version.h"
30template <
typename SpiType>
58 bool Initialize(
bool enable_vcc =
true)
noexcept;
64 bool Reset(
bool enable_vcc =
true) noexcept;
100 bool WritePixels(const uint8_t* data, std::
size_t byte_len) noexcept;
163 [[nodiscard]]
bool IsPressed() const noexcept;
172 bool ConfigureScroll(uint8_t h_offset, uint8_t start_row, uint8_t scroll_rows,
173 uint8_t v_offset, uint8_t interval_code,
bool activate) noexcept;
196 static constexpr const char*
GetDriverVersion() noexcept {
return HF_ISF15ACP4_VERSION_STRING; }
212 bool sendCommand(uint8_t cmd,
const uint8_t* data, uint8_t len)
noexcept;
225#define ISF15ACP4_HEADER_INCLUDED
226#include "../src/isf15acp4.ipp"
227#undef ISF15ACP4_HEADER_INCLUDED
CPU-side RGB565 framebuffer with basic drawing operations.
Definition isf15acp4_canvas.hpp:22
Owns the active graphics backend selected at construction time.
Definition isf15acp4_graphics_context.hpp:42
High-level driver for NKK SSD1331-based SmartDisplay modules.
Definition isf15acp4.hpp:31
bool ClearWindow(const Rect &rect) noexcept
Clear a rectangular window via controller command 25H, in display coordinates.
Definition isf15acp4.ipp:386
void setError(Error e) noexcept
Definition isf15acp4.ipp:46
ProductVariant variant_
Definition isf15acp4.hpp:204
bool sendCommand(uint8_t cmd, const uint8_t *data, uint8_t len) noexcept
Definition isf15acp4.ipp:62
bool StopScroll() noexcept
Stop hardware scrolling (2EH).
Definition isf15acp4.ipp:418
bool DrawLine(const Point &start, const Point &end, Color565 color) noexcept
Draw a hardware-accelerated line (command 21H), in display coordinates.
Definition isf15acp4.ipp:348
GraphicsBackend GetGraphicsBackend() const noexcept
Active graphics backend selected at construction.
Definition isf15acp4.hpp:139
Error GetLastError() const noexcept
Definition isf15acp4.hpp:191
static constexpr const char * GetDriverVersion() noexcept
Definition isf15acp4.hpp:196
bool IsPressed() const noexcept
Read momentary switch state when wired to SpiInterface::CtrlPin::Switch.
Definition isf15acp4.ipp:393
bool runInitTable() noexcept
Definition isf15acp4.ipp:97
void ConfigurePresenter(GraphicsContext &gfx) noexcept
Register presenter hooks for HardwareDirect backend (bind this display to gfx).
Definition isf15acp4.ipp:305
bool DrawRectangle(const Rect &rect, Color565 color, bool filled=false) noexcept
Draw a hardware rectangle outline (command 22H), in display coordinates.
Definition isf15acp4.ipp:359
Rect toRam(const Rect &rect) const noexcept
Definition isf15acp4.ipp:205
bool DisplayOn() noexcept
Turn display on (normal mode, command AFH).
Definition isf15acp4.ipp:151
bool SetWindow(const Rect &rect) noexcept
Configure the active GRAM download window.
Definition isf15acp4.ipp:175
bool IsInitialized() const noexcept
Returns true after successful Initialize().
Definition isf15acp4.hpp:61
bool DisplayDim() noexcept
Enter dim mode (command ACH).
Definition isf15acp4.ipp:161
DisplayGeometry geometry_
Definition isf15acp4.hpp:205
bool DisplayOff() noexcept
Turn display off / sleep (command AEH).
Definition isf15acp4.ipp:156
const DisplayGeometry & Geometry() const noexcept
Definition isf15acp4.hpp:193
bool initialized_
Definition isf15acp4.hpp:207
bool SetMasterCurrent(uint8_t level) noexcept
Set master current while display is off (command 87H).
Definition isf15acp4.ipp:166
bool HasError(Error e) const noexcept
Definition isf15acp4.hpp:187
static constexpr uint8_t GetDriverVersionMajor() noexcept
Definition isf15acp4.hpp:197
bool DrawCanvas(const Canvas &canvas) noexcept
Upload an entire canvas framebuffer.
Definition isf15acp4.ipp:279
void pulseReset() noexcept
Definition isf15acp4.ipp:52
ProductVariant Variant() const noexcept
Definition isf15acp4.hpp:194
bool DrawPixel(uint8_t x, uint8_t y, Color565 color) noexcept
Draw one RGB565 pixel at (x,y).
Definition isf15acp4.ipp:325
bool ConfigureScroll(uint8_t h_offset, uint8_t start_row, uint8_t scroll_rows, uint8_t v_offset, uint8_t interval_code, bool activate) noexcept
Set up hardware scrolling and optionally start it.
Definition isf15acp4.ipp:398
bool FillScreen(Color565 color) noexcept
Fill the panel with a solid color.
Definition isf15acp4.ipp:333
bool sendCommandByte(uint8_t cmd, uint8_t data) noexcept
Definition isf15acp4.ipp:87
static constexpr uint8_t GetDriverVersionMinor() noexcept
Definition isf15acp4.hpp:198
bool sendCommandOnly(uint8_t cmd) noexcept
Definition isf15acp4.ipp:92
static constexpr uint8_t GetDriverVersionPatch() noexcept
Definition isf15acp4.hpp:199
SmartDisplayConfig config_
Definition isf15acp4.hpp:203
bool WritePixels(const uint8_t *data, std::size_t byte_len) noexcept
Stream raw pixel bytes to the controller GRAM, unchanged.
Definition isf15acp4.ipp:211
uint16_t GetErrorFlags() const noexcept
Definition isf15acp4.hpp:186
bool Initialize(bool enable_vcc=true) noexcept
Perform power-up, reset, and SSD1331 initialization.
Definition isf15acp4.ipp:110
bool Present(const GraphicsContext &gfx) noexcept
Present any graphics backend to the panel.
Definition isf15acp4.ipp:317
Rect window_
Definition isf15acp4.hpp:206
void ClearErrorFlags(uint16_t mask=0xFFFF) noexcept
Definition isf15acp4.hpp:190
SpiType * bus_
Definition isf15acp4.hpp:202
static void colorToSsd1331(Color565 color, uint8_t out[3]) noexcept
Definition isf15acp4.ipp:340
bool SetFullWindow() noexcept
Configure full-panel memory window for the active variant.
Definition isf15acp4.ipp:200
const SmartDisplayConfig & GetConfig() const noexcept
Active driver configuration.
Definition isf15acp4.hpp:142
GraphicsContext CreateGraphicsContext() noexcept
Create a graphics context matching this display configuration.
Definition isf15acp4.ipp:296
uint16_t error_flags_
Definition isf15acp4.hpp:209
Error last_error_
Definition isf15acp4.hpp:208
bool WriteColors(const Color565 *colors, std::size_t count) noexcept
Stream Color565 pixels to the controller GRAM in the SSD1331 65k-colour byte order.
Definition isf15acp4.ipp:237
Software framebuffer and 2D drawing primitives for SmartDisplay OLEDs.
Runtime-selectable graphics backend for SmartDisplay applications.
CRTP-based SPI and GPIO interface for NKK SmartDisplay OLED drivers.
SSD1331 command constants and initialization tables for NKK SmartDisplay.
Shared types, constants, and color utilities for NKK SmartDisplay OLED drivers.
Definition isf15acp4.hpp:19
Error
Driver error flags (bitmask).
Definition isf15acp4_types.hpp:28
ProductVariant
Supported NKK SmartDisplay OLED product variants.
Definition isf15acp4_types.hpp:19
@ Isf15acp4
Frameless OLED pushbutton, 96x64 (ISF15ACP4)
uint16_t Color565
16-bit RGB565 color value (R5G6B5).
Definition isf15acp4_types.hpp:50
GraphicsBackend
Selectable graphics engine used by SmartDisplay and UI helpers.
Definition isf15acp4_graphics_surface.hpp:22
@ Reset
RES# reset input: Active = held in reset (pin low), Inactive = running (pin high)
Compile-time display geometry for a product variant.
Definition isf15acp4_types.hpp:53
2D point in display coordinates.
Definition isf15acp4_types.hpp:90
Axis-aligned rectangle in display coordinates (inclusive bounds).
Definition isf15acp4_types.hpp:96
Configuration for SmartDisplay construction.
Definition isf15acp4_button_ui.hpp:17
GraphicsBackend graphics
Definition isf15acp4_button_ui.hpp:19