CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
cdc::hal::IDisplay Class Referenceabstract

#include <IDisplay.h>

Inheritance diagram for cdc::hal::IDisplay:
cdc::core::IService cdc::hal::EpaperDisplay

Public Member Functions

virtual ~IDisplay ()=default
virtual void clear ()=0
virtual void flush (RefreshMode mode=RefreshMode::PARTIAL)=0
virtual void flushSync (RefreshMode mode=RefreshMode::PARTIAL)=0
virtual bool isBusy () const =0
virtual uint16_t getWidth () const =0
virtual uint16_t getHeight () const =0
virtual void setBacklight (uint16_t level)=0
virtual void saveBacklight ()=0
virtual uint16_t getBacklight () const =0
virtual bool isBacklightOn () const =0
virtual void backlightOn ()=0
virtual void backlightOff ()=0
virtual void * getNativeHandle ()=0
virtual void showSplash (const char *subtitle=nullptr)=0
virtual void drawPixel (int16_t x, int16_t y, uint16_t color)=0
virtual void drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)=0
virtual void drawRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)=0
virtual void fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)=0
virtual void setCursor (int16_t x, int16_t y)=0
virtual void setTextColor (uint16_t color)=0
virtual void setTextSize (uint8_t size)=0
virtual void setFont (const void *font)=0
virtual void print (const char *text)=0
virtual void printf (const char *fmt,...)=0
Public Member Functions inherited from cdc::core::IService
virtual ~IService ()=default
virtual bool init ()=0
virtual bool start ()=0
virtual void stop ()=0
virtual ServiceState getState () const =0
virtual const char * getName () const =0

Detailed Description

Display interface for E-Paper and other displays

Definition at line 20 of file IDisplay.h.

Constructor & Destructor Documentation

◆ ~IDisplay()

virtual cdc::hal::IDisplay::~IDisplay ( )
virtualdefault

Member Function Documentation

◆ backlightOff()

virtual void cdc::hal::IDisplay::backlightOff ( )
pure virtual

Turn backlight off (preserves saved level)

Implemented in cdc::hal::EpaperDisplay.

◆ backlightOn()

virtual void cdc::hal::IDisplay::backlightOn ( )
pure virtual

Turn backlight on (restores saved level)

Implemented in cdc::hal::EpaperDisplay.

◆ clear()

virtual void cdc::hal::IDisplay::clear ( )
pure virtual

Clear the display buffer

Implemented in cdc::hal::EpaperDisplay.

◆ drawLine()

virtual void cdc::hal::IDisplay::drawLine ( int16_t x0,
int16_t y0,
int16_t x1,
int16_t y1,
uint16_t color )
pure virtual

Draw a line

Implemented in cdc::hal::EpaperDisplay.

◆ drawPixel()

virtual void cdc::hal::IDisplay::drawPixel ( int16_t x,
int16_t y,
uint16_t color )
pure virtual

Draw a single pixel

Implemented in cdc::hal::EpaperDisplay.

◆ drawRect()

virtual void cdc::hal::IDisplay::drawRect ( int16_t x,
int16_t y,
int16_t w,
int16_t h,
uint16_t color )
pure virtual

Draw a rectangle outline

Implemented in cdc::hal::EpaperDisplay.

◆ fillRect()

virtual void cdc::hal::IDisplay::fillRect ( int16_t x,
int16_t y,
int16_t w,
int16_t h,
uint16_t color )
pure virtual

Draw a filled rectangle

Implemented in cdc::hal::EpaperDisplay.

◆ flush()

virtual void cdc::hal::IDisplay::flush ( RefreshMode mode = RefreshMode::PARTIAL)
pure virtual

Flush buffer to display (async)

Parameters
modeRefresh mode

Implemented in cdc::hal::EpaperDisplay.

References cdc::hal::PARTIAL.

◆ flushSync()

virtual void cdc::hal::IDisplay::flushSync ( RefreshMode mode = RefreshMode::PARTIAL)
pure virtual

Flush buffer to display (blocking)

Parameters
modeRefresh mode

Implemented in cdc::hal::EpaperDisplay.

References cdc::hal::PARTIAL.

◆ getBacklight()

virtual uint16_t cdc::hal::IDisplay::getBacklight ( ) const
pure virtual

Get current backlight level

Implemented in cdc::hal::EpaperDisplay.

◆ getHeight()

virtual uint16_t cdc::hal::IDisplay::getHeight ( ) const
pure virtual

Implemented in cdc::hal::EpaperDisplay.

◆ getNativeHandle()

virtual void * cdc::hal::IDisplay::getNativeHandle ( )
pure virtual

Get native display handle (for direct GFX access) Returns Gdey029T94* for the CDC Badge

Implemented in cdc::hal::EpaperDisplay.

◆ getWidth()

virtual uint16_t cdc::hal::IDisplay::getWidth ( ) const
pure virtual

Get display dimensions

Implemented in cdc::hal::EpaperDisplay.

◆ isBacklightOn()

virtual bool cdc::hal::IDisplay::isBacklightOn ( ) const
pure virtual

Check if backlight is on (level > 0)

Implemented in cdc::hal::EpaperDisplay.

◆ isBusy()

virtual bool cdc::hal::IDisplay::isBusy ( ) const
pure virtual

Check if display is busy (refreshing)

Implemented in cdc::hal::EpaperDisplay.

◆ print()

virtual void cdc::hal::IDisplay::print ( const char * text)
pure virtual

Print text at current cursor

Implemented in cdc::hal::EpaperDisplay.

◆ printf()

virtual void cdc::hal::IDisplay::printf ( const char * fmt,
... )
pure virtual

Print formatted text

Implemented in cdc::hal::EpaperDisplay.

◆ saveBacklight()

virtual void cdc::hal::IDisplay::saveBacklight ( )
pure virtual

Save current backlight level to NVS Call this when the user confirms the brightness setting

Implemented in cdc::hal::EpaperDisplay.

◆ setBacklight()

virtual void cdc::hal::IDisplay::setBacklight ( uint16_t level)
pure virtual

Set backlight level (0-1023) Note: E-Paper typically has frontlight, not backlight Does NOT persist to NVS - call saveBacklight() to persist

Implemented in cdc::hal::EpaperDisplay.

◆ setCursor()

virtual void cdc::hal::IDisplay::setCursor ( int16_t x,
int16_t y )
pure virtual

Set text cursor position

Implemented in cdc::hal::EpaperDisplay.

◆ setFont()

virtual void cdc::hal::IDisplay::setFont ( const void * font)
pure virtual

Set font (nullptr = built-in 6x8)

Implemented in cdc::hal::EpaperDisplay.

◆ setTextColor()

virtual void cdc::hal::IDisplay::setTextColor ( uint16_t color)
pure virtual

Set text color

Implemented in cdc::hal::EpaperDisplay.

◆ setTextSize()

virtual void cdc::hal::IDisplay::setTextSize ( uint8_t size)
pure virtual

Set text size multiplier

Implemented in cdc::hal::EpaperDisplay.

◆ showSplash()

virtual void cdc::hal::IDisplay::showSplash ( const char * subtitle = nullptr)
pure virtual

Show boot splash screen

Implemented in cdc::hal::EpaperDisplay.


The documentation for this class was generated from the following file: