Add inverted mode.
TheFeaRhq opened this issue · 1 comments
TheFeaRhq commented
Hi! great library! thank you.
it would be great if you add inverted text mode.
since i dont use graphic mode i made changes only to text mode..
void lcd_putc(char c){
........
else if(charMode == INVERTED){
i2c_start(LCD_I2C_ADR << 1);
i2c_byte(0x40);
for (uint8_t i = 0; i < sizeof(FONT[0]); i++)
{
// print font to ram, print 6 columns
i2c_byte(~(pgm_read_byte(&(FONT[(uint8_t)c][i]))));
}
i2c_stop();
cursorPosition.x += sizeof(FONT[0]);
}
simply adding "~" bitwise NOT operation in i2c_byte.
and defining INVERTED as 3 in lcd.h
thank you.
Sylaina commented
If you want inverted textmode call
lcd_inverted();
in your source-code. This will switch lcd to an inverted textmode.