Przeglądaj źródła

Add misssing leds and button ids

DricomDragon 5 lat temu
rodzic
commit
dac443a816
2 zmienionych plików z 16 dodań i 0 usunięć
  1. 8 0
      prog/sources/dev-board-io.cpp
  2. 8 0
      prog/sources/dev-board-io.h

+ 8 - 0
prog/sources/dev-board-io.cpp

@@ -2,9 +2,17 @@
 
 static void setupIO (INIT_MODE) {
 	pinMode (L0_LED, DigitalMode::OUTPUT);
+	pinMode (L1_LED, DigitalMode::OUTPUT);
+	pinMode (L2_LED, DigitalMode::OUTPUT);
+	pinMode (L3_LED, DigitalMode::OUTPUT);
+	pinMode (L4_LED, DigitalMode::OUTPUT);
 	pinMode (TEENSY_LED, DigitalMode::OUTPUT);
 
 	pinMode (P0_PUSH_BUTTON, DigitalMode::INPUT_PULLUP);
+	pinMode (P1_PUSH_BUTTON, DigitalMode::INPUT_PULLUP);
+	pinMode (P2_PUSH_BUTTON, DigitalMode::INPUT_PULLUP);
+	pinMode (P3_PUSH_BUTTON, DigitalMode::INPUT_PULLUP);
+	pinMode (P4_PUSH_BUTTON, DigitalMode::INPUT_PULLUP);
 
 	// Start teensy led
 	digitalWrite (TEENSY_LED, true);

+ 8 - 0
prog/sources/dev-board-io.h

@@ -3,8 +3,16 @@
 #include "teensy-3-6-digital-io.h"
 
 static const DigitalPort L0_LED = DigitalPort::D3 ;
+static const DigitalPort L1_LED = DigitalPort::D4 ;
+static const DigitalPort L2_LED = DigitalPort::D5 ;
+static const DigitalPort L3_LED = DigitalPort::D6 ;
+static const DigitalPort L4_LED = DigitalPort::D7 ;
 
 static const DigitalPort P0_PUSH_BUTTON = DigitalPort::D8 ;
+static const DigitalPort P1_PUSH_BUTTON = DigitalPort::D9 ;
+static const DigitalPort P2_PUSH_BUTTON = DigitalPort::D10 ;
+static const DigitalPort P3_PUSH_BUTTON = DigitalPort::D11 ;
+static const DigitalPort P4_PUSH_BUTTON = DigitalPort::D12 ;
 
 static const DigitalPort TEENSY_LED = DigitalPort::D13;