Skip to content

Deprecate Stream and Serial #5655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion drivers/Serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ class Serial : public SerialBase, public Stream, private NonCopyable<Serial> {
virtual void unlock();

PlatformMutex _mutex;
};
}
MBED_DEPRECATED_SINCE("mbed-os-5.8",
"Use UARTSerial instead - it provides buffering, better blocking, and correct POSIX-like FileHandle semantics. "
"Use fdopen on a UARTSerial object to get a FILE * for <stdio.h> calls.");

} // namespace mbed

Expand Down
5 changes: 4 additions & 1 deletion platform/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ class Stream : public FileLike, private NonCopyable<Stream> {
virtual void unlock() {
// Stub
}
};
}
MBED_DEPRECATED_SINCE("mbed-os-5.8",
"Stream does not conform to current POSIX-like FileHandle semantics - implement FileHandle directly. "
"Users of FileHandles can use fdopen() to get a FILE * for <stdio.h> calls.");
/**@}*/

/**@}*/
Expand Down