| 771 | } |
| 772 | |
| 773 | void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comdetect) { |
| 774 | sendCommand(SETPRECHARGE); //0xD9 |
| 775 | sendCommand(precharge); //0xF1 default, to lower the contrast, put 1-1F |
| 776 | sendCommand(SETCONTRAST); |
| 777 | sendCommand(contrast); // 0-255 |
| 778 | sendCommand(SETVCOMDETECT); //0xDB, (additionally needed to lower the contrast) |
| 779 | sendCommand(comdetect); //0x40 default, to lower the contrast, put 0 |
| 780 | sendCommand(DISPLAYALLON_RESUME); |
| 781 | sendCommand(NORMALDISPLAY); |
| 782 | sendCommand(DISPLAYON); |
| 783 | } |
| 784 | |
| 785 | void OLEDDisplay::setBrightness(uint8_t brightness) { |
| 786 | uint8_t contrast = brightness; |
nothing calls this directly
no outgoing calls
no test coverage detected