| 940 | |
| 941 | #ifdef __MBED__ |
| 942 | int 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 |
nothing calls this directly
no test coverage detected