Private functions
| 961 | |
| 962 | // Private functions |
| 963 | void 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 | |
| 991 | void OLEDDisplay::sendInitCommands(void) { |
| 992 | if (geometry == GEOMETRY_RAWMODE) |
nothing calls this directly
no outgoing calls
no test coverage detected