HardFOC Core
API reference
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Isf15acp4Handler Class Reference

Unified handler for ISF15ACP4 SmartDisplay modules. More...

#include <Isf15acp4Handler.h>

Public Member Functions

 Isf15acp4Handler (BaseSpi &spi, BaseGpio &cs, BaseGpio &dc, BaseGpio &reset, const Isf15acp4HandlerConfig &config={}, BaseGpio *vcc_enable=nullptr, BaseGpio *switch_in=nullptr, bool switch_active_low=true) noexcept
 
 Isf15acp4Handler (const Isf15acp4Handler &)=delete
 
Isf15acp4Handler & operator= (const Isf15acp4Handler &)=delete
 
 Isf15acp4Handler (Isf15acp4Handler &&)=delete
 
Isf15acp4Handler & operator= (Isf15acp4Handler &&)=delete
 
bool EnsureInitialized () noexcept
 
bool EnsureDeinitialized () noexcept
 
bool Deinitialize () noexcept
 
bool IsInitialized () const noexcept
 
bool DisplayOn () noexcept
 
bool DisplayOff () noexcept
 
bool FillScreen (isf15acp4::Color565 color) noexcept
 Fill the panel with a packed RGB565 color.
 
bool Present (const isf15acp4::GraphicsContext &gfx) noexcept
 Blit the graphics context to the panel.
 
isf15acp4::GraphicsContext CreateGraphicsContext () const noexcept
 Canvas matching the configured variant and graphics backend.
 
bool IsPressed () const noexcept
 
template<typename Fn >
bool visitDriver (Fn &&fn) noexcept
 
isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > * GetDriver () noexcept
 
const isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > * GetDriver () const noexcept
 
isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > * GetDisplay () noexcept
 
uint16_t GetErrorFlags () const noexcept
 
void ClearErrorFlags (uint16_t mask=0xFFFF) noexcept
 
void DumpDiagnostics () const noexcept
 

Private Member Functions

bool ensureInitializedUnlocked () noexcept
 
void deinitializeUnlocked () noexcept
 

Private Attributes

BaseSpi & spi_ref_
 
BaseGpio & cs_ref_
 
BaseGpio & dc_ref_
 
BaseGpio & reset_ref_
 
BaseGpio * vcc_enable_
 
BaseGpio * switch_in_
 
bool switch_active_low_
 
Isf15acp4HandlerConfig config_
 
std::unique_ptr< HalIsf15acp4SpiAdapter > adapter_
 
std::unique_ptr< isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > > display_
 
RtosMutex handler_mutex_
 
bool initialized_ {false}
 

Detailed Description

Unified handler for ISF15ACP4 SmartDisplay modules.

Parameters
spiHost SPI.
csSoftware chip-select GPIO.
dcData/command GPIO.
resetPanel reset GPIO.
configProduct variant and graphics backend.
vcc_enableOptional VCC enable GPIO.
switch_inOptional switch sense GPIO.
switch_active_lowTrue when the switch input is active-low.

Constructor & Destructor Documentation

◆ Isf15acp4Handler() [1/3]

Isf15acp4Handler::Isf15acp4Handler ( BaseSpi &  spi,
BaseGpio &  cs,
BaseGpio &  dc,
BaseGpio &  reset,
const Isf15acp4HandlerConfig &  config = {},
BaseGpio *  vcc_enable = nullptr,
BaseGpio *  switch_in = nullptr,
bool  switch_active_low = true 
)
noexcept

◆ Isf15acp4Handler() [2/3]

Isf15acp4Handler::Isf15acp4Handler ( const Isf15acp4Handler &  )
delete

◆ Isf15acp4Handler() [3/3]

Isf15acp4Handler::Isf15acp4Handler ( Isf15acp4Handler &&  )
delete

Member Function Documentation

◆ ClearErrorFlags()

void Isf15acp4Handler::ClearErrorFlags ( uint16_t  mask = 0xFFFF)
noexcept

◆ CreateGraphicsContext()

isf15acp4::GraphicsContext Isf15acp4Handler::CreateGraphicsContext ( ) const
noexcept

Canvas matching the configured variant and graphics backend.

Once initialized the context is bound to the panel (the driver's CreateGraphicsContext()), so GraphicsBackend::HardwareDirect draws reach it; before Initialize() it is unbound. The handler must outlive it.

◆ Deinitialize()

bool Isf15acp4Handler::Deinitialize ( )
noexcept

◆ deinitializeUnlocked()

void Isf15acp4Handler::deinitializeUnlocked ( )
privatenoexcept

◆ DisplayOff()

bool Isf15acp4Handler::DisplayOff ( )
noexcept

◆ DisplayOn()

bool Isf15acp4Handler::DisplayOn ( )
noexcept

◆ DumpDiagnostics()

void Isf15acp4Handler::DumpDiagnostics ( ) const
noexcept

◆ EnsureDeinitialized()

bool Isf15acp4Handler::EnsureDeinitialized ( )
noexcept

◆ EnsureInitialized()

bool Isf15acp4Handler::EnsureInitialized ( )
noexcept

◆ ensureInitializedUnlocked()

bool Isf15acp4Handler::ensureInitializedUnlocked ( )
privatenoexcept

◆ FillScreen()

bool Isf15acp4Handler::FillScreen ( isf15acp4::Color565  color)
noexcept

Fill the panel with a packed RGB565 color.

Parameters
color16-bit RGB565 value.

◆ GetDisplay()

isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > * Isf15acp4Handler::GetDisplay ( )
inlinenoexcept

◆ GetDriver() [1/2]

const isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > * Isf15acp4Handler::GetDriver ( ) const
inlinenoexcept

◆ GetDriver() [2/2]

isf15acp4::SmartDisplay< HalIsf15acp4SpiAdapter > * Isf15acp4Handler::GetDriver ( )
inlinenoexcept

◆ GetErrorFlags()

uint16_t Isf15acp4Handler::GetErrorFlags ( ) const
noexcept

◆ IsInitialized()

bool Isf15acp4Handler::IsInitialized ( ) const
inlinenoexcept
Returns
true after a successful EnsureInitialized.

◆ IsPressed()

bool Isf15acp4Handler::IsPressed ( ) const
noexcept

◆ operator=() [1/2]

Isf15acp4Handler & Isf15acp4Handler::operator= ( const Isf15acp4Handler &  )
delete

◆ operator=() [2/2]

Isf15acp4Handler & Isf15acp4Handler::operator= ( Isf15acp4Handler &&  )
delete

◆ Present()

bool Isf15acp4Handler::Present ( const isf15acp4::GraphicsContext &  gfx)
noexcept

Blit the graphics context to the panel.

Parameters
gfxCanvas produced by CreateGraphicsContext().

◆ visitDriver()

template<typename Fn >
bool Isf15acp4Handler::visitDriver ( Fn &&  fn)
inlinenoexcept

Member Data Documentation

◆ adapter_

std::unique_ptr<HalIsf15acp4SpiAdapter> Isf15acp4Handler::adapter_
private

◆ config_

Isf15acp4HandlerConfig Isf15acp4Handler::config_
private

◆ cs_ref_

BaseGpio& Isf15acp4Handler::cs_ref_
private

◆ dc_ref_

BaseGpio& Isf15acp4Handler::dc_ref_
private

◆ display_

std::unique_ptr<isf15acp4::SmartDisplay<HalIsf15acp4SpiAdapter> > Isf15acp4Handler::display_
private

◆ handler_mutex_

RtosMutex Isf15acp4Handler::handler_mutex_
mutableprivate

◆ initialized_

bool Isf15acp4Handler::initialized_ {false}
private

◆ reset_ref_

BaseGpio& Isf15acp4Handler::reset_ref_
private

◆ spi_ref_

BaseSpi& Isf15acp4Handler::spi_ref_
private

◆ switch_active_low_

bool Isf15acp4Handler::switch_active_low_
private

◆ switch_in_

BaseGpio* Isf15acp4Handler::switch_in_
private

◆ vcc_enable_

BaseGpio* Isf15acp4Handler::vcc_enable_
private

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