# HG changeset patch # User Ethan Zonca # Date 2014-09-25 20:38:13 # Node ID aa0d40ec2a0a0e4a5c771fd882a399bef9370b9e # Parent 227e0d971bff4a4b26d1794d1c4d017f58896397 Flip display diff --git a/ssd1306.c b/ssd1306.c --- a/ssd1306.c +++ b/ssd1306.c @@ -39,8 +39,10 @@ void ssd1306_Init(void) WriteCommand(0x14); //10 or 14 if not externalvcc WriteCommand(0x20); WriteCommand(0x00); - WriteCommand(0xA0 | 0x1); // segremap - WriteCommand(0xC8); // comscandep +// WriteCommand(0xA0 | 0x1); // segremap (normal) + WriteCommand(0xA0); // segremap (flip) +// WriteCommand(0xC8); // comscandec (normal) + WriteCommand(0xC0); // comscandec (flip) WriteCommand(0xDA); // setcompins WriteCommand(0x02); WriteCommand(0x81); // contrast @@ -52,6 +54,7 @@ void ssd1306_Init(void) WriteCommand(0xA4); // dispalyallon_resume WriteCommand(0xA6); // normaldisplay + WriteCommand(0xAF); // display on }