diff --git a/ssd1306.c b/ssd1306.c --- a/ssd1306.c +++ b/ssd1306.c @@ -635,6 +635,60 @@ void setStartColumn(unsigned char d) // Default => 0x10 } + +const uint8_t row[4][32] = { + + +{0x00,0x00,0x01,0x03,0x07,0x0F,0x1E,0x3C,0x3C,0x7C,0x7C,0x7C,0xFC,0xFF,0xFF,0xFC,0xFC,0xFC,0xFC,0xFF,0x7F,0x7F,0x7F,0x3C,0x3C,0x1C,0x0C,0x06,0x03,0x01,0x00,0x00}, + +{0x0F,0x7F,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x3F,0x3F,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x7F,0x0F}, + +{0xF0,0xFE,0xFF,0xFF,0xFF,0xC7,0x00,0x00,0x00,0x00,0x87,0xC7,0xC7,0xFF,0xFF,0x00,0x00,0x00,0x00,0x87,0x87,0xC7,0xC3,0x03,0x07,0x07,0x0F,0x7F,0xFF,0xFF,0xFE,0xF0}, + +{0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFC,0xFC,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF,0x1F,0x1F,0x1F,0x1F,0xFF,0xFE,0xFE,0xFE,0xFC,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00}, + + + + +}; + +void ssd1306_test() +{ + uint8_t i = 0; + setStartPage(3); + setStartColumn(0); + for(i = 0; i<32; i++) + { + WriteData(row[0][i]); + } + + WriteData(0x00); + + setStartPage(2); + setStartColumn(0); + for(i = 0; i<32; i++) + { + WriteData(row[1][i]); + } + WriteData(0x00); + + setStartPage(1); + setStartColumn(0); + for(i = 0; i<32; i++) + { + WriteData(row[2][i]); + } + WriteData(0x00); + + setStartPage(0); + setStartColumn(0); + for(i = 0; i<32; i++) + { + WriteData(row[3][i]); + } + WriteData(0x00); +} + /* Print a single character from font.cpp */ void ssd1306_DrawChar(char ascii, unsigned char row, unsigned char xPos) {