127 ERMCH1115(int16_t oledwidth, int16_t oledheight , int8_t rst, int8_t dc, int8_t cs, int8_t sclk, int8_t din);
129 ERMCH1115(int16_t oledwidth, int16_t oledheight , int8_t rst, int8_t dc);
132 virtual void drawPixel(int16_t x, int16_t y, uint8_t colour)
override;
137 void OLEDBufferScreen(int16_t x, int16_t y, uint8_t w, uint8_t h, std::span<uint8_t> data);
141 void OLEDBitmap(int16_t x, int16_t y, uint8_t w, uint8_t h,
const std::span<const uint8_t> data);
Graphics based functions for bicolor display.
class to drive the ERMCh1115 OLED
Definition ERM1_CH1115_OLED_RDL.hpp:23
static constexpr uint8_t ERMCH1115_PRECHARGE_DATA_SET
Definition ERM1_CH1115_OLED_RDL.hpp:65
static constexpr uint8_t ERMCH1115_ENTIRE_DISPLAY_OFF
Definition ERM1_CH1115_OLED_RDL.hpp:30
int _spiFlags
Definition ERM1_CH1115_OLED_RDL.hpp:104
void OLEDscrollSetup(uint8_t Timeinterval=ERMCH1115_TIME_SET, uint8_t Direction=ERMCH1115_SCROLL_SETUP, uint8_t mode=ERMCH1115_SET_SCROLL_MODE)
Sets up Horizontal Scroll.
Definition ERM1_CH1115_OLED_RDL.cpp:458
static constexpr uint8_t ERMCH1115_PRECHARGE_MODE_SET
Definition ERM1_CH1115_OLED_RDL.hpp:64
static constexpr uint8_t ERMCH1115_ACTIVATE_SCROLL
Definition ERM1_CH1115_OLED_RDL.hpp:79
static constexpr uint8_t ERMCH1115_DC_MODE_SET
Definition ERM1_CH1115_OLED_RDL.hpp:53
void SoftwareSPIShiftOut(uint8_t val)
used in software SPI mode to shift out data
Definition ERM1_CH1115_OLED_RDL.cpp:322
int _spiBaud
Definition ERM1_CH1115_OLED_RDL.hpp:103
static constexpr uint8_t ERMCH1115_TIME_SET
Definition ERM1_CH1115_OLED_RDL.hpp:75
bool _sleep
Definition ERM1_CH1115_OLED_RDL.hpp:113
void OLEDinit(void)
Called from OLEDbegin carries out Power on sequence and register init.
Definition ERM1_CH1115_OLED_RDL.cpp:340
static constexpr uint8_t ERMCH1115_SEG_SET_REMAP
Definition ERM1_CH1115_OLED_RDL.hpp:49
static constexpr uint8_t ERMCH1115_OSC_FREQ_DATA_SET
Definition ERM1_CH1115_OLED_RDL.hpp:63
int8_t _Display_RST
Definition ERM1_CH1115_OLED_RDL.hpp:93
uint16_t _OLEDHighFreqDelay
Definition ERM1_CH1115_OLED_RDL.hpp:105
static constexpr uint8_t ERMCH1115_COM_LEVEL_MODE_SET
Definition ERM1_CH1115_OLED_RDL.hpp:66
rdlib::Return_Codes_e OLEDupdate(void)
updates the OLED i.e. writes buffer to the screen
Definition ERM1_CH1115_OLED_RDL.cpp:674
int _spiDev
Definition ERM1_CH1115_OLED_RDL.hpp:101
static constexpr uint8_t ERMCH1115_SET_DISPLAY_START_LINE
Definition ERM1_CH1115_OLED_RDL.hpp:42
static constexpr uint8_t ERMCH1115_CONTRAST_CONTROL
Definition ERM1_CH1115_OLED_RDL.hpp:35
static constexpr uint8_t ERMCH1115_IREF_REG
Definition ERM1_CH1115_OLED_RDL.hpp:47
static constexpr uint8_t ERMCH1115_SET_COLADD_LSB
Definition ERM1_CH1115_OLED_RDL.hpp:40
static constexpr uint8_t ERMCH1115_SPAGE_ADR_SET
Definition ERM1_CH1115_OLED_RDL.hpp:74
void OLEDFillPage(uint8_t page_num, uint8_t pixels)
Fill the chosen page(0-7) with a datapattern.
Definition ERM1_CH1115_OLED_RDL.cpp:576
static constexpr uint8_t ERMCH1115_SET_PAGEADD
Definition ERM1_CH1115_OLED_RDL.hpp:39
uint16_t OLEDHighFreqDelayGet(void)
Freq delay used in SW SPI getter, uS delay used in SW SPI method.
Definition ERM1_CH1115_OLED_RDL.cpp:791
std::span< uint8_t > _OLEDbuffer
Definition ERM1_CH1115_OLED_RDL.hpp:112
static constexpr uint8_t ERMCH1115_SET_COLADD_MSB
Definition ERM1_CH1115_OLED_RDL.hpp:41
static constexpr uint8_t ERMCH1115_COM_LEVEL_DATA_SET
Definition ERM1_CH1115_OLED_RDL.hpp:67
void OLEDHighFreqDelaySet(uint16_t)
Freq delay used in SW SPI setter, uS delay used in SW SPI method.
Definition ERM1_CH1115_OLED_RDL.cpp:797
static constexpr uint8_t ERMCH1115_HORIZONTAL_A_SCROLL_SETUP
Definition ERM1_CH1115_OLED_RDL.hpp:70
void OLEDfadeEffect(uint8_t bits=ERMCH1115_BREATHEFFECT_DATA)
Turns on fade effect.
Definition ERM1_CH1115_OLED_RDL.cpp:532
static constexpr uint8_t ERMCH1115_DISPLAY_ON
Definition ERM1_CH1115_OLED_RDL.hpp:31
static constexpr uint8_t ERMCH1115_OFFSET_DATA_SET
Definition ERM1_CH1115_OLED_RDL.hpp:57
static constexpr uint8_t ERMCH1115_BREATHEFFECT_SET
Definition ERM1_CH1115_OLED_RDL.hpp:58
uint8_t _OLED_PAGE_NUM
Definition ERM1_CH1115_OLED_RDL.hpp:111
void OLEDscroll(uint8_t bits)
Turns on Horizontal scroll.
Definition ERM1_CH1115_OLED_RDL.cpp:481
static constexpr uint8_t ERMCH1115_OFFSET_MODE_SET
Definition ERM1_CH1115_OLED_RDL.hpp:56
int8_t _Display_DC
Definition ERM1_CH1115_OLED_RDL.hpp:92
int _GpioHandle
Definition ERM1_CH1115_OLED_RDL.hpp:97
static constexpr uint8_t ERMCH1115_HORIZONTAL_A_SCROLL_SET_ECOL
Definition ERM1_CH1115_OLED_RDL.hpp:72
int8_t _Display_SCLK
Definition ERM1_CH1115_OLED_RDL.hpp:94
int _spiHandle
Definition ERM1_CH1115_OLED_RDL.hpp:100
void OLEDEnable(uint8_t on)
Turns On Display.
Definition ERM1_CH1115_OLED_RDL.cpp:427
static constexpr uint8_t ERMCH1115_COMMON_SCAN_DIR
Definition ERM1_CH1115_OLED_RDL.hpp:55
static constexpr uint8_t ERMCH1115_CONTRAST_DATA_DEFAULT
Definition ERM1_CH1115_OLED_RDL.hpp:36
static constexpr uint8_t ERMCH1115_DISPLAY_NORMAL
Definition ERM1_CH1115_OLED_RDL.hpp:33
void OLEDBufferScreen(int16_t x, int16_t y, uint8_t w, uint8_t h, std::span< uint8_t > data)
Draw a bitmap to the screen.
Definition ERM1_CH1115_OLED_RDL.cpp:716
bool OLEDIsSleeping(void)
getting for _sleep member . is OLED in sleep mode
Definition ERM1_CH1115_OLED_RDL.cpp:450
static constexpr uint8_t ERMCH1115_HORIZONTAL_A_SCROLL_SET_SCOL
Definition ERM1_CH1115_OLED_RDL.hpp:71
int8_t _Display_CS
Definition ERM1_CH1115_OLED_RDL.hpp:91
static constexpr uint8_t ERMCH1115_SET_SCROLL_MODE
Definition ERM1_CH1115_OLED_RDL.hpp:77
static constexpr uint8_t ERMCH1115_SET_PUMP_REG
Definition ERM1_CH1115_OLED_RDL.hpp:45
uint8_t _OLEDcontrast
Definition ERM1_CH1115_OLED_RDL.hpp:114
static constexpr uint8_t ERMCH1115_DISPLAY_OFF
Definition ERM1_CH1115_OLED_RDL.hpp:32
static constexpr uint8_t ERMCH1115_DC_ONOFF_SET
Definition ERM1_CH1115_OLED_RDL.hpp:54
int8_t _OLED_mode
Definition ERM1_CH1115_OLED_RDL.hpp:106
void OLEDReset(void)
Resets OLED in a four wire setup called at start.
Definition ERM1_CH1115_OLED_RDL.cpp:413
static constexpr uint8_t ERMCH1115_DEACTIVATE_SCROLL
Definition ERM1_CH1115_OLED_RDL.hpp:78
static constexpr uint8_t ERMCH1115_EPAGE_ADR_SET
Definition ERM1_CH1115_OLED_RDL.hpp:76
static constexpr uint8_t ERMCH1115_SEG_SET_PADS
Definition ERM1_CH1115_OLED_RDL.hpp:50
void send_data(uint8_t data)
Send data byte with SPI to ERMCH1115.
Definition ERM1_CH1115_OLED_RDL.cpp:649
uint8_t _OLED_WIDTH
Definition ERM1_CH1115_OLED_RDL.hpp:109
static constexpr uint8_t ERMCH1115_MULTIPLEX_DATA_SET
Definition ERM1_CH1115_OLED_RDL.hpp:52
static constexpr uint8_t ERMCH1115_SET_PUMP_SET
Definition ERM1_CH1115_OLED_RDL.hpp:46
void OLEDInvert(uint8_t on)
invert the display
Definition ERM1_CH1115_OLED_RDL.cpp:548
rdlib::Return_Codes_e OLEDbegin(uint8_t contrast, int gpioDev)
begin Method initialise OLED for software SPI
Definition ERM1_CH1115_OLED_RDL.cpp:131
void OLEDFillScreen(uint8_t pixel)
Fill the screen NOT the buffer with a datapattern.
Definition ERM1_CH1115_OLED_RDL.cpp:563
void OLEDPowerDown(void)
Power down function.
Definition ERM1_CH1115_OLED_RDL.cpp:296
uint8_t _OLED_HEIGHT
Definition ERM1_CH1115_OLED_RDL.hpp:110
void OLEDBitmap(int16_t x, int16_t y, uint8_t w, uint8_t h, const std::span< const uint8_t > data)
Draw a bitmap to the screen.
Definition ERM1_CH1115_OLED_RDL.cpp:617
virtual void drawPixel(int16_t x, int16_t y, uint8_t colour) override
Draws a Pixel to the screen , overides the graphics library.
Definition ERM1_CH1115_OLED_RDL.cpp:754
static constexpr uint8_t ERMCH1115_DISPLAY_INVERT
Definition ERM1_CH1115_OLED_RDL.hpp:34
int _DeviceNumGpioChip
Definition ERM1_CH1115_OLED_RDL.hpp:96
rdlib::Return_Codes_e OLEDSetBufferPtr(uint8_t width, uint8_t height, std::span< uint8_t > buffer)
sets the buffer pointer to the users screen data buffer
Definition ERM1_CH1115_OLED_RDL.cpp:192
void OLEDContrast(uint8_t contrast=ERMCH1115_CONTRAST_DATA_DEFAULT)
Adjusts contrast.
Definition ERM1_CH1115_OLED_RDL.cpp:496
rdlib::Return_Codes_e OLEDSPIoff(void)
stops HW spi operations
Definition ERM1_CH1115_OLED_RDL.cpp:218
void OLEDFlip(uint8_t on)
Rotates the display vertically, A 180 degree 'flip'.
Definition ERM1_CH1115_OLED_RDL.cpp:511
void send_command(uint8_t command, uint8_t value)
Sends a command to the display.
Definition ERM1_CH1115_OLED_RDL.cpp:403
int8_t _Display_SDATA
Definition ERM1_CH1115_OLED_RDL.hpp:95
rdlib::Return_Codes_e OLEDclearBuffer(void)
clears the buffer memory i.e. does NOT write to the screen
Definition ERM1_CH1115_OLED_RDL.cpp:695
static constexpr uint8_t ERMCH1115_IREF_SET
Definition ERM1_CH1115_OLED_RDL.hpp:48
static constexpr uint8_t ERMCH1115_MULTIPLEX_MODE_SET
Definition ERM1_CH1115_OLED_RDL.hpp:51
int8_t GetCommMode(void)
Checks if software SPI is on.
Definition ERM1_CH1115_OLED_RDL.cpp:314
static constexpr uint8_t ERMCH1115_OSC_FREQ_MODE_SET
Definition ERM1_CH1115_OLED_RDL.hpp:62
int _spiChan
Definition ERM1_CH1115_OLED_RDL.hpp:102
static constexpr uint8_t ERMCH1115_BREATHEFFECT_DATA
Definition ERM1_CH1115_OLED_RDL.hpp:59
static constexpr uint8_t ERMCH1115_SCROLL_SETUP
Definition ERM1_CH1115_OLED_RDL.hpp:73
static constexpr uint8_t ERMCH1115_ENTIRE_DISPLAY_ON
Definition ERM1_CH1115_OLED_RDL.hpp:29
Graphics class to hold graphic related functions for 1-bit displays.
Definition bicolor_graphics_RDL.hpp:21
int16_t width(void) const
Gets the width of the display (per current _rotation)
Definition bicolor_graphics_RDL.cpp:560
int16_t height(void) const
Gets the height of the display (per current _rotation)
Definition bicolor_graphics_RDL.cpp:566
Return_Codes_e
Definition common_data_RDL.hpp:22
Struct to hold delay values used in driver.
Definition ERM1_CH1115_OLED_RDL.hpp:84
static constexpr uint16_t RST_DELAY1
Definition ERM1_CH1115_OLED_RDL.hpp:86
static constexpr uint16_t INITDELAY
Definition ERM1_CH1115_OLED_RDL.hpp:85
static constexpr uint16_t RST_DELAY2
Definition ERM1_CH1115_OLED_RDL.hpp:87