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.
Dependents: cc3000_ping_demo_try_2
Fork of mbed by
Diff: DigitalIn.h
- Revision:
- 27:7110ebee3484
- Parent:
- 19:e6be4cd80aad
- Child:
- 43:e2ed12d17f06
diff -r 63bcd7ba4912 -r 7110ebee3484 DigitalIn.h
--- 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;
};
