The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
172:65be27845400
Parent:
170:e95d10626187
--- a/platform/Stream.h	Thu Nov 08 11:45:42 2018 +0000
+++ b/platform/Stream.h	Wed Feb 20 20:53:29 2019 +0000
@@ -1,5 +1,6 @@
 /* mbed Microcontroller Library
  * Copyright (c) 2006-2013 ARM Limited
+ * SPDX-License-Identifier: Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +21,7 @@
 #include "platform/FileLike.h"
 #include "platform/FileHandle.h"
 #include "platform/NonCopyable.h"
+#include "mbed_toolchain.h"
 #include <cstdio>
 #include <cstdarg>
 
@@ -32,8 +34,6 @@
  */
 
 extern void mbed_set_unbuffered_stream(std::FILE *_file);
-extern int mbed_getc(std::FILE *_file);
-extern char *mbed_gets(char *s, int size, std::FILE *_file);
 
 /** File stream
  *
@@ -49,10 +49,10 @@
     int puts(const char *s);
     int getc();
     char *gets(char *s, int size);
-    int printf(const char *format, ...);
-    int scanf(const char *format, ...);
-    int vprintf(const char *format, std::va_list args);
-    int vscanf(const char *format, std::va_list args);
+    int printf(const char *format, ...) MBED_PRINTF_METHOD(1, 2);
+    int scanf(const char *format, ...) MBED_SCANF_METHOD(1, 2);
+    int vprintf(const char *format, std::va_list args) MBED_PRINTF_METHOD(1, 0);
+    int vscanf(const char *format, std::va_list args) MBED_SCANF_METHOD(1, 0);
 
     operator std::FILE *()
     {