|
ISF15ACP4 Driver 1.0.0
API reference
|
High-level driver for NKK SSD1331-based SmartDisplay modules. More...
#include <isf15acp4.hpp>
Public Member Functions | |
| SmartDisplay (SpiType *bus, const SmartDisplayConfig &config) noexcept | |
| Construct with explicit configuration (variant + graphics backend). | |
| SmartDisplay (SpiType *bus, ProductVariant variant=ProductVariant::Isf15acp4) noexcept | |
| Construct a SmartDisplay driver (defaults to ISF15ACP4 + BuiltinCanvas). | |
| bool | Initialize (bool enable_vcc=true) noexcept |
| Perform power-up, reset, and SSD1331 initialization. | |
| bool | IsInitialized () const noexcept |
| Returns true after successful Initialize(). | |
| bool | Reset (bool enable_vcc=true) noexcept |
| Hardware reset pulse and full re-initialization. | |
| bool | DisplayOn () noexcept |
| Turn display on (normal mode, command AFH). | |
| bool | DisplayOff () noexcept |
| Turn display off / sleep (command AEH). | |
| bool | DisplayDim () noexcept |
| Enter dim mode (command ACH). | |
| bool | SetMasterCurrent (uint8_t level) noexcept |
| Set master current while display is off (command 87H). | |
| bool | SetWindow (const Rect &rect) noexcept |
| Configure the active GRAM download window. | |
| bool | SetFullWindow () noexcept |
| Configure full-panel memory window for the active variant. | |
| bool | WritePixels (const uint8_t *data, std::size_t byte_len) noexcept |
| Stream raw pixel bytes to the controller GRAM, unchanged. | |
| bool | WriteColors (const Color565 *colors, std::size_t count) noexcept |
| Stream Color565 pixels to the controller GRAM in the SSD1331 65k-colour byte order. | |
| bool | DrawCanvas (const Canvas &canvas) noexcept |
| Upload an entire canvas framebuffer. | |
| bool | Present (const GraphicsContext &gfx) noexcept |
| Present any graphics backend to the panel. | |
| GraphicsContext | CreateGraphicsContext () noexcept |
| Create a graphics context matching this display configuration. | |
| GraphicsContext | CreateGraphicsContext () const noexcept |
| Create an unbound graphics context matching this display configuration. | |
| void | ConfigurePresenter (GraphicsContext &gfx) noexcept |
Register presenter hooks for HardwareDirect backend (bind this display to gfx). | |
| GraphicsBackend | GetGraphicsBackend () const noexcept |
| Active graphics backend selected at construction. | |
| const SmartDisplayConfig & | GetConfig () const noexcept |
| Active driver configuration. | |
| bool | DrawPixel (uint8_t x, uint8_t y, Color565 color) noexcept |
| Draw one RGB565 pixel at (x,y). | |
| bool | FillScreen (Color565 color) noexcept |
| Fill the panel with a solid color. | |
| bool | DrawLine (const Point &start, const Point &end, Color565 color) noexcept |
| Draw a hardware-accelerated line (command 21H), in display coordinates. | |
| bool | DrawRectangle (const Rect &rect, Color565 color, bool filled=false) noexcept |
| Draw a hardware rectangle outline (command 22H), in display coordinates. | |
| bool | ClearWindow (const Rect &rect) noexcept |
| Clear a rectangular window via controller command 25H, in display coordinates. | |
| bool | IsPressed () const noexcept |
| Read momentary switch state when wired to SpiInterface::CtrlPin::Switch. | |
| 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. | |
| bool | StopScroll () noexcept |
| Stop hardware scrolling (2EH). | |
| bool | StopScroll (const GraphicsContext &gfx) noexcept |
Stop hardware scrolling (2EH), then rewrite the display RAM with Present(gfx). | |
| uint16_t | GetErrorFlags () const noexcept |
| bool | HasError (Error e) const noexcept |
| void | ClearErrorFlags (uint16_t mask=0xFFFF) noexcept |
| Error | GetLastError () const noexcept |
| const DisplayGeometry & | Geometry () const noexcept |
| ProductVariant | Variant () const noexcept |
Static Public Member Functions | |
| static constexpr const char * | GetDriverVersion () noexcept |
| static constexpr uint8_t | GetDriverVersionMajor () noexcept |
| static constexpr uint8_t | GetDriverVersionMinor () noexcept |
| static constexpr uint8_t | GetDriverVersionPatch () noexcept |
Private Member Functions | |
| void | setError (Error e) noexcept |
| bool | sendCommand (uint8_t cmd, const uint8_t *data, uint8_t len) noexcept |
| bool | sendCommandByte (uint8_t cmd, uint8_t data) noexcept |
| bool | sendCommandOnly (uint8_t cmd) noexcept |
| void | pulseReset () noexcept |
| bool | runInitTable () noexcept |
| Rect | toRam (const Rect &rect) const noexcept |
Static Private Member Functions | |
| static void | colorToSsd1331 (Color565 color, uint8_t out[3]) noexcept |
Private Attributes | |
| SpiType * | bus_ |
| SmartDisplayConfig | config_ |
| ProductVariant | variant_ |
| DisplayGeometry | geometry_ |
| Rect | window_ {} |
| bool | initialized_ {false} |
| Error | last_error_ {Error::None} |
| uint16_t | error_flags_ {0} |
High-level driver for NKK SSD1331-based SmartDisplay modules.
Supports ISF15ACP4 (96x64 frameless pushbutton), ISC15ANP4 (64x48), and ISC01P (52x36 display). Communication uses SPI with separate D/C and SS lines.
| SpiType | Platform adapter implementing SpiInterface CRTP contract. |
|
noexcept |
Construct with explicit configuration (variant + graphics backend).
|
noexcept |
Construct a SmartDisplay driver (defaults to ISF15ACP4 + BuiltinCanvas).
| bus | Pointer to platform SPI/GPIO adapter. |
| variant | Product variant initialization table selector. |
|
inlinenoexcept |
|
noexcept |
Clear a rectangular window via controller command 25H, in display coordinates.
|
staticprivatenoexcept |
|
noexcept |
Register presenter hooks for HardwareDirect backend (bind this display to gfx).
|
noexcept |
Set up hardware scrolling and optionally start it.
Always stops scrolling first (2EH), then sends the setup (27H) and, when activate is true, starts it (2FH): the SSD1331 must not get new scroll parameters while scrolling runs (rev 1.2 Table 10, 27H note 2). With activate false the scroll stays stopped; rewrite the display RAM afterwards (see StopScroll()).
|
noexcept |
Create an unbound graphics context matching this display configuration.
A const display cannot bind itself: for HardwareDirect, call ConfigurePresenter() on the result.
|
noexcept |
Create a graphics context matching this display configuration.
With GraphicsBackend::HardwareDirect the returned context is already bound to this display (ConfigurePresenter()), so its shapes go to the panel at once. The display must outlive the context.
|
noexcept |
Enter dim mode (command ACH).
|
noexcept |
Turn display off / sleep (command AEH).
|
noexcept |
Turn display on (normal mode, command AFH).
|
noexcept |
Upload an entire canvas framebuffer.
|
noexcept |
Draw a hardware-accelerated line (command 21H), in display coordinates.
|
noexcept |
Draw one RGB565 pixel at (x,y).
|
noexcept |
Draw a hardware rectangle outline (command 22H), in display coordinates.
|
noexcept |
Fill the panel with a solid color.
|
inlinenoexcept |
|
inlinenoexcept |
Active driver configuration.
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Active graphics backend selected at construction.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
Perform power-up, reset, and SSD1331 initialization.
Sequence:
| enable_vcc | When true, asserts VccEnable after reset. |
|
inlinenoexcept |
Returns true after successful Initialize().
|
noexcept |
Read momentary switch state when wired to SpiInterface::CtrlPin::Switch.
|
noexcept |
Present any graphics backend to the panel.
|
privatenoexcept |
|
noexcept |
Hardware reset pulse and full re-initialization.
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
noexcept |
Configure full-panel memory window for the active variant.
|
noexcept |
Set master current while display is off (command 87H).
| level | 0x00 (min) to 0x0F (max brightness). |
|
noexcept |
Configure the active GRAM download window.
| rect | Inclusive pixel rectangle in display coordinates (0..width-1, 0..height-1). The driver adds the variant's RAM column/row offset (DisplayGeometry::column_start / row_start). |
|
noexcept |
Stop hardware scrolling (2EH).
The display RAM stays shifted: the SSD1331 needs it rewritten after 2EH (rev 1.2 Table 10). Prefer StopScroll(const GraphicsContext&), or redraw yourself.
|
noexcept |
Stop hardware scrolling (2EH), then rewrite the display RAM with Present(gfx).
|
privatenoexcept |
|
inlinenoexcept |
|
noexcept |
Stream Color565 pixels to the controller GRAM in the SSD1331 65k-colour byte order.
Each pixel is converted to the panel's colour order (ssd1331::ToPanelPixel(): blue in the high bits) and goes out high byte first (SSD1331 rev 1.2 section 7.5.2, Table 9), whatever the CPU's byte order, in one data transaction. Use this instead of WritePixels() for Color565 buffers.
| colors | Pixel buffer. |
| count | Number of pixels (not bytes). |
|
noexcept |
Stream raw pixel bytes to the controller GRAM, unchanged.
The bytes must already be in the panel's 65k-colour format: two bytes per pixel, high byte first, blue in bits 15..11 and red in bits 4..0 (see ssd1331::ToPanelPixel()). For Color565 buffers use WriteColors().
| data | Pixel buffer (two bytes per pixel). |
| byte_len | Number of bytes (must be even). |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |