BERTL library, Kevin Heinrich

Dependents:   BertlPingPong_UEbung3_EB

Revision:
1:01bc0c86f111
Parent:
0:f40ab7184c3f
Child:
2:d9f2452ba88d
--- a/bertl14.h	Mon Jan 18 09:44:28 2016 +0000
+++ b/bertl14.h	Mon Jan 25 11:44:13 2016 +0000
@@ -1,4 +1,32 @@
 #include <mbed.h>
+//LED-Defines
+#define LED_FL_WHITE 0x01       // 0b0000 0001, BERTL FORWARD Left-Side WHITE-LED
+#define LED_FL_YELLOW 0x02      // 0b0000 0010, BERTL FORWARD Left-Side YELLOW-LED
+#define LED_FR_WHITE 0x04       // 0b0000 0100, BERTL FORWARD Right-Side WHITE-LED
+#define LED_FR_YELLOW 0x08      // 0b0000 1000, BERTL FORWARD Right-Side YELLOW-LED
+#define LED_BL_RED 0x10         // 0b0001 0000, BERTL BACKWARD Left-Side RED-LED
+#define LED_BL_YELLOW 0x20      // 0b0010 0000, BERTL BACKWARD Left-Side YELLOW-LED
+#define LED_BR_RED 0x40         // 0b0100 0000, BERTL BACKWARD Right-Side RED-LED
+#define LED_BR_YELLOW 0x80      // 0b1000 0000, BERTL BACKWARD Right-Side YELLOW-LED
 
+// Define PC9555 Routines
+#define PC9555_ADDR 0x40 //A2 = A1 = A0 = 0
+#define PC9555_FREQUENCY 100000 // fI2C in Hz
+// PC9555 Commands
+#define PC9555_PORT0_IN (0)
+#define PC9555_PORT1_IN (1)
+#define PC9555_PORT0_OUT (2)
+#define PC9555_PORT1_OUT (3)
+#define PC9555_PORT0_INV (4)
+#define PC9555_PORT1_INV (5)
+#define PC9555_PORT0_DIRCONFIG (6)
+#define PC9555_PORT1_DIRCONFIG (7)
+
+// Motor Routines
 void bertl_engine(int left, int right);
-void bertl_engine_test();
\ No newline at end of file
+void bertl_engine_test();
+
+// PC9555 routines
+void bertl_PC9555_init();
+void bertl_PC9555_leds(unsigned char leds);
+unsigned char bertl_PC9555_switches();
\ No newline at end of file