49 lcd_registerGpioEvent(
getDc(), onDcChange,
this);
60 lcd_unregisterGpioEvent(
getDc());
98 m_buffer[m_data_size] = data;
100 if ( m_data_size ==
sizeof(m_buffer) )
128 virtual void transferToHw(
const uint8_t *buffer, uint16_t size) = 0;
150 uint16_t m_data_size = 0;
153 static void onDcChange(
void *arg)
void forceTransfer()
Call this method to transfer data to hardware.
int8_t getDc()
Returns number of D/C pin if used, or -1.
virtual void transferToHw(const uint8_t *buffer, uint16_t size)=0
This function must implement actual sending of data to hardware interface.
virtual void start()
Starts communication with the display over custom interface.
virtual ~_ICustom()
Destroys instance of custom basic interface.
This is basic class for custom user-defined interfaces This is template, which accepts maximum number...
_ICustom(int8_t dc=-1)
Creates instance of custom basic interface.
virtual void end()
Deinitializes basic class for custom interface.
virtual void stop()
Ends communication with the display over custom interface.
void sendBuffer(const uint8_t *buffer, uint16_t size)
Sends bytes to custom interface.
void send(uint8_t data)
Sends byte to custom interface.
virtual void begin()
Initializes basic class for custom interface.