BERTL library, Kevin Heinrich

Dependents:   BertlPingPong_UEbung3_EB

Revision:
4:066936e2c097
Parent:
3:4326e2654adb
--- a/bertl14.cpp	Mon Feb 01 10:48:40 2016 +0000
+++ b/bertl14.cpp	Mon Apr 04 12:17:24 2016 +0000
@@ -42,17 +42,17 @@
 
 unsigned char bertl_PC9555_switches()
 {
-    int taster;
+    char taster[1];
     
     pc9555.start();                     // Start PC9555 to write the Adress
         pc9555.write(PC9555_ADDR_W);    // Write the WRITE-Adress
         pc9555.write(0x01);             // To define the Switches => 0x02: LEDs
     pc9555.start();                     // Start PC9555 again to read the Values
         pc9555.write(PC9555_ADDR_R);    // Set the READ_bit
-        taster = pc9555.read(0);        // Read the Value of the Switches
+        taster[0] = pc9555.read(0);        // Read the Value of the Switches (HEX_MASK)
     pc9555.stop();                      // Stop the I2C
     
-    return (taster);                    // Return the value
+    return (taster[0]);                    // Return the value
     
 }
 // END PC9555 Routines