diff options
author | Vasil Zlatanov <v@skozl.com> | 2017-05-04 02:26:55 +0100 |
---|---|---|
committer | Vasil Zlatanov <v@skozl.com> | 2017-05-04 02:26:55 +0100 |
commit | 89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6 (patch) | |
tree | 2f990e6e09d2e0a460ae8aa102fef18e0158a95f | |
parent | 539e0e1e974825f1d60975d6c5352d1b1927c22b (diff) | |
download | e2-switch-89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6.tar.gz e2-switch-89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6.tar.bz2 e2-switch-89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6.zip |
Move start screen before interrupt init
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index aa1b3b7..bd942f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,6 +27,10 @@ Adafruit_SSD1306_Spi oled(gSpi, D_DC_PIN, D_RST_PIN, D_CS_PIN, 64, 128); int main(void) { + oled.setRotation(2); + oled.printf("%ux%u Group Ay08-04\r\n", oled.width(), oled.height()); + wait(0.5); + // Enable ISR for the switch rising edge for (int i = 0; i < 3; ++i) { switch_position[i] = new Counter(switch_pin[i]); @@ -35,9 +39,6 @@ int main(void) //Attach switch sampling timer ISR to the timer instance with the required period timer.attach_us(&tout, SW_PERIOD); - oled.setRotation(2); - oled.printf("%ux%u OLED Display\r\n", oled.width(), oled.height()); - for (;;) { if (update) { update = 0; |