summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2017-05-04 02:26:55 +0100
committerVasil Zlatanov <v@skozl.com>2017-05-04 02:26:55 +0100
commit89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6 (patch)
tree2f990e6e09d2e0a460ae8aa102fef18e0158a95f /src
parent539e0e1e974825f1d60975d6c5352d1b1927c22b (diff)
downloade2-switch-89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6.tar.gz
e2-switch-89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6.tar.bz2
e2-switch-89e4d40bbb35b1786d9b7bd0e40aeb0ef50901a6.zip
Move start screen before interrupt init
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp7
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;