fix for mbed lib issue 3 (i2c problem) see also https://mbed.org/users/mbed_official/code/mbed/issues/3 affected implementations: LPC812, LPC11U24, LPC1768, LPC2368, LPC4088

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
emilmont
Date:
Wed Apr 24 15:11:33 2013 +0000
Parent:
6:6dfdb79ccc45
Child:
8:4e25b8576136
Commit message:
Prepare support for ARMCC 5.03 (mainline microlib)

Changed in this revision

cpp/stdio.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/cpp/stdio.cpp	Mon Mar 18 10:36:46 2013 +0000
+++ b/cpp/stdio.cpp	Wed Apr 24 15:11:33 2013 +0000
@@ -46,9 +46,17 @@
 
 using namespace mbed;
 
+#if defined(__MICROLIB) && (__ARMCC_VERSION>5030000)
+// Before version 5.03, we were using a patched version of microlib with proper names
+extern const char __stdin_name[]  = ":tt";
+extern const char __stdout_name[] = ":tt";
+extern const char __stderr_name[] = ":tt";
+
+#else
 extern const char __stdin_name[]  = "/stdin";
 extern const char __stdout_name[] = "/stdout";
 extern const char __stderr_name[] = "/stderr";
+#endif
 
 /* newlib has the filehandle field in the FILE struct as a short, so
  * we can't just return a Filehandle* from _open and instead have to