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

Method _putc

Code/Arduino_libraries/SSD1306/OLEDDisplay.cpp:942–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940
941#ifdef __MBED__
942int OLEDDisplay::_putc(int c) {
943
944 if (!fontData)
945 return 1;
946 if (!logBufferSize) {
947 uint8_t textHeight = pgm_read_byte(fontData + HEIGHT_POS);
948 uint16_t lines = this->displayHeight / textHeight;
949 uint16_t chars = 2 * (this->displayWidth / textHeight);
950
951 if (this->displayHeight % textHeight)
952 lines++;
953 if (this->displayWidth % textHeight)
954 chars++;
955 setLogBuffer(lines, chars);
956 }
957
958 return this->write((uint8_t)c);
959}
960#endif
961
962// Private functions

Callers

nothing calls this directly

Calls 2

writeMethod · 0.95
pgm_read_byteFunction · 0.85

Tested by

no test coverage detected