Lab 1 Program C

Dependents:   Lab1C

Fork of mbed by -deleted-

Revision:
27:7110ebee3484
Parent:
19:e6be4cd80aad
Child:
43:aff670d0d510
--- a/DigitalIn.h	Fri Feb 11 10:33:02 2011 +0000
+++ b/DigitalIn.h	Tue Nov 29 14:59:27 2011 +0000
@@ -1,6 +1,5 @@
 /* mbed Microcontroller Library - DigitalIn
- * Copyright (c) 2006-2009 ARM Limited. All rights reserved.
- * sford
+ * Copyright (c) 2006-2011 ARM Limited. All rights reserved.
  */ 
  
 #ifndef MBED_DIGITALIN_H
@@ -54,7 +53,11 @@
      *      0 for logical 0 and 1 for logical 1
      */
     int read() {
+#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
         return ((_gpio->FIOPIN & _mask) ? 1 : 0);
+#elif defined(TARGET_LPC11U24)
+        return ((LPC_GPIO->PIN[_index] & _mask) ? 1 : 0);
+#endif
     }
 
 
@@ -84,7 +87,11 @@
 protected:
 
     PinName             _pin;
+#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
     LPC_GPIO_TypeDef    *_gpio;
+#elif defined(TARGET_LPC11U24)
+    int _index;
+#endif
     uint32_t            _mask;
 
 };