MCPcopy Create free account
hub / github.com/PricelessToolkit/MailBoxGuard / setGeometry

Method setGeometry

Code/Arduino_libraries/SSD1306/OLEDDisplay.cpp:963–989  ·  view source on GitHub ↗

Private functions

Source from the content-addressed store, hash-verified

961
962// Private functions
963void OLEDDisplay::setGeometry(OLEDDISPLAY_GEOMETRY g, uint16_t width, uint16_t height) {
964 this->geometry = g;
965
966 switch (g) {
967 case GEOMETRY_128_64:
968 this->displayWidth = 128;
969 this->displayHeight = 64;
970 break;
971 case GEOMETRY_128_32:
972 this->displayWidth = 128;
973 this->displayHeight = 32;
974 break;
975 case GEOMETRY_64_48:
976 this->displayWidth = 64;
977 this->displayHeight = 48;
978 break;
979 case GEOMETRY_64_32:
980 this->displayWidth = 64;
981 this->displayHeight = 32;
982 break;
983 case GEOMETRY_RAWMODE:
984 this->displayWidth = width > 0 ? width : 128;
985 this->displayHeight = height > 0 ? height : 64;
986 break;
987 }
988 this->displayBufferSize = displayWidth * displayHeight / 8;
989}
990
991void OLEDDisplay::sendInitCommands(void) {
992 if (geometry == GEOMETRY_RAWMODE)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected