Graphics based functions for bicolor display.
static constexpr int defaultFormat()
Called from vector & string template , Get the default format for a given type.
Definition print_data_RDL.hpp:206
class to control OLED and define buffer
Definition SH110X_OLED_RDL.hpp:22
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 SH110X_OLED_RDL.cpp:69
rdlib::Return_Codes_e OLEDclearBuffer(void)
clears the buffer memory i.e. does NOT write to the screen
Definition SH110X_OLED_RDL.cpp:439
static constexpr uint8_t SH110X_DISPLAYON
Definition SH110X_OLED_RDL.hpp:112
static constexpr uint8_t SH110X_SETVCOMDETECT
Definition SH110X_OLED_RDL.hpp:121
std::span< uint8_t > _OLEDbuffer
Definition SH110X_OLED_RDL.hpp:87
static constexpr uint8_t SH110X_DCDC
Definition SH110X_OLED_RDL.hpp:110
void OLEDContrast(uint8_t OLEDcontrast)
Adjusts contrast.
Definition SH110X_OLED_RDL.cpp:326
static constexpr uint8_t SH110X_PAGEADDR
Definition SH110X_OLED_RDL.hpp:99
rdlib::Return_Codes_e OLEDupdate(void)
updates the buffer i.e. writes it to the screen
Definition SH110X_OLED_RDL.cpp:420
static constexpr uint8_t SH110X_SETDISPLAYCLOCKDIV
Definition SH110X_OLED_RDL.hpp:118
static constexpr uint8_t SH110X_SETCONTRAST
Definition SH110X_OLED_RDL.hpp:101
uint8_t _I2C_ErrorRetryNum
Definition SH110X_OLED_RDL.hpp:80
void SH1107_begin(void)
Init routine for SH1107 OLED.
Definition SH110X_OLED_RDL.cpp:268
static constexpr uint8_t SH110X_SETCOMPINS
Definition SH110X_OLED_RDL.hpp:120
uint8_t _OLED_PAGE_NUM
Definition SH110X_OLED_RDL.hpp:85
void OLEDI2CErrorTimeoutSet(uint16_t)
Sets the I2C timeout, in the event of an I2C write error.
Definition SH110X_OLED_RDL.cpp:528
static constexpr uint8_t SH110X_SETHIGHCOLUMN
Definition SH110X_OLED_RDL.hpp:125
int _OLEDI2CDevice
Definition SH110X_OLED_RDL.hpp:76
void OLEDReset(void)
Handles OLED reset, if reset pin present on device.
Definition SH110X_OLED_RDL.cpp:202
int _OLEDI2CFlags
Definition SH110X_OLED_RDL.hpp:77
static constexpr uint8_t SH110X_COLUMNADDR
Definition SH110X_OLED_RDL.hpp:98
static constexpr uint8_t SH110X_MEMORYMODE
Definition SH110X_OLED_RDL.hpp:97
static constexpr uint8_t SH110X_COMSCANDEC
Definition SH110X_OLED_RDL.hpp:116
uint8_t _OLED_WIDTH
Definition SH110X_OLED_RDL.hpp:83
static constexpr uint8_t SH110X_COMMAND_BYTE
Definition SH110X_OLED_RDL.hpp:128
static constexpr uint8_t SH110X_SEGREMAP
Definition SH110X_OLED_RDL.hpp:102
void OLEDinit(void)
Called from OLEDbegin carries out Power on sequence and register init.
Definition SH110X_OLED_RDL.cpp:182
uint8_t _OLED_HEIGHT
Definition SH110X_OLED_RDL.hpp:84
static constexpr uint8_t SH110X_COMSCANINC
Definition SH110X_OLED_RDL.hpp:115
int _DeviceNumGpioChip
Definition SH110X_OLED_RDL.hpp:93
uint8_t OLEDI2CErrorRetryNumGet(void)
Gets the I2C error retry attempts, used in the event of an I2C write error.
Definition SH110X_OLED_RDL.cpp:545
void OLEDEnable(uint8_t on)
Turns On Display.
Definition SH110X_OLED_RDL.cpp:316
void OLEDPowerDown(void)
Disables OLED Call when powering down.
Definition SH110X_OLED_RDL.cpp:173
static constexpr uint8_t SH110X_DISPLAYOFF
Definition SH110X_OLED_RDL.hpp:111
static constexpr uint8_t SH110X_DISPLAYALLON
Definition SH110X_OLED_RDL.hpp:106
uint16_t _I2C_ErrorDelay
Definition SH110X_OLED_RDL.hpp:79
int _I2C_ErrorFlag
Definition SH110X_OLED_RDL.hpp:81
uint8_t pageStartOffset
Definition SH110X_OLED_RDL.hpp:67
static constexpr uint8_t SH110X_SETMULTIPLEX
Definition SH110X_OLED_RDL.hpp:109
int _OLEDI2CHandle
Definition SH110X_OLED_RDL.hpp:78
rdlib::Return_Codes_e OLEDbegin(OLED_IC_type_e=SH1106_IC, int8_t ResetPin=-1, int gpioDev=0)
begin Method initialise OLED
Definition SH110X_OLED_RDL.cpp:32
void OLEDI2CErrorRetryNumSet(uint8_t)
Sets the I2C error retry attempts used in the event of an I2C write error.
Definition SH110X_OLED_RDL.cpp:552
void OLEDInvert(bool on)
invert the display
Definition SH110X_OLED_RDL.cpp:337
void SH1106_begin(void)
Init routine for SH1106 OLED.
Definition SH110X_OLED_RDL.cpp:217
static constexpr uint8_t SH110X_SETDISPLAYOFFSET
Definition SH110X_OLED_RDL.hpp:117
rdlib::Return_Codes_e OLED_I2C_OFF(void)
End I2C operations. This closes the I2C device.
Definition SH110X_OLED_RDL.cpp:124
void OLEDFillScreen(uint8_t pixel, uint8_t mircodelay)
Fill the screen NOT the buffer with a datapattern.
Definition SH110X_OLED_RDL.cpp:348
static constexpr uint8_t SH110X_DISPLAYALLON_RESUME
Definition SH110X_OLED_RDL.hpp:104
uint16_t OLEDI2CErrorTimeoutGet(void)
Gets the I2C timeout, used in the event of an I2C write error.
Definition SH110X_OLED_RDL.cpp:538
int8_t _Display_RST
Definition SH110X_OLED_RDL.hpp:92
static constexpr uint8_t SH110X_INVERTDISPLAY
Definition SH110X_OLED_RDL.hpp:108
static constexpr uint8_t SH110X_CHARGEPUMP
Definition SH110X_OLED_RDL.hpp:100
rdlib::Return_Codes_e OLED_I2C_ON(int I2C_device, int I2C_addr, int I2C_flags)
Start I2C operations.
Definition SH110X_OLED_RDL.cpp:94
static constexpr uint8_t SH110X_DATA_BYTE
Definition SH110X_OLED_RDL.hpp:129
static constexpr uint8_t SH110X_SETPAGEADDR
Definition SH110X_OLED_RDL.hpp:113
static constexpr uint8_t SH110X_SETLOWCOLUMN
Definition SH110X_OLED_RDL.hpp:124
static constexpr uint8_t SH110X_NORMALDISPLAY
Definition SH110X_OLED_RDL.hpp:107
void OLEDFillPage(uint8_t page_num, uint8_t pixels, uint8_t delay)
Fill the chosen page with a data pattern.
Definition SH110X_OLED_RDL.cpp:370
virtual void drawPixel(int16_t x, int16_t y, uint8_t color) override
Draws a Pixel to the screen overrides the graphics lib.
Definition SH110X_OLED_RDL.cpp:482
static constexpr uint8_t SH110X_SETPRECHARGE
Definition SH110X_OLED_RDL.hpp:119
OLED_IC_type_e
Definition SH110X_OLED_RDL.hpp:31
@ SH1107_IC
Definition SH110X_OLED_RDL.hpp:33
@ SH1106_IC
Definition SH110X_OLED_RDL.hpp:32
static constexpr uint8_t SH110X_SETSTARTLINE
Definition SH110X_OLED_RDL.hpp:126
int OLEDCheckConnection(void)
checks if OLED on I2C bus
Definition SH110X_OLED_RDL.cpp:562
int _OLEDI2CAddress
Definition SH110X_OLED_RDL.hpp:75
OLED_IC_type_e _OLED_IC_type
Definition SH110X_OLED_RDL.hpp:89
const uint8_t SH110X_RDL_ADDR
Definition SH110X_OLED_RDL.hpp:27
void I2CWriteByte(uint8_t value=0x00, uint8_t DataOrCmd=SH110X_COMMAND_BYTE)
Writes a byte to I2C address,command or data, used internally.
Definition SH110X_OLED_RDL.cpp:390
int _GpioHandle
Definition SH110X_OLED_RDL.hpp:94
uint8_t OLEDI2CErrorGet(void)
get I2C error Flag
Definition SH110X_OLED_RDL.cpp:521
void OLEDBufferScreen(uint8_t w, uint8_t h, std::span< uint8_t > buffer)
Draw the buffer to screen directly to the screen.
Definition SH110X_OLED_RDL.cpp:458
static constexpr uint8_t SH110X_SETDISPSTARTLINE
Definition SH110X_OLED_RDL.hpp:122
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