Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of bertl14 by
Diff: bertl14.cpp
- Revision:
- 5: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