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.
Diff: RawSerial.h
- Revision:
- 122:f9eeca106725
- Parent:
- 75:dc225afb6914
--- a/RawSerial.h Wed May 25 16:44:06 2016 +0100 +++ b/RawSerial.h Thu Jul 07 14:34:11 2016 +0100 @@ -32,6 +32,8 @@ * Can be used for Full Duplex communication, or Simplex by specifying * one pin as NC (Not Connected) * + * @Note Synchronization level: Not protected + * * Example: * @code * // Send a char to the PC @@ -81,6 +83,16 @@ int puts(const char *str); int printf(const char *format, ...); + +protected: + + /** Acquire exclusive access to this serial port + */ + virtual void lock(void); + + /** Release exclusive access to this serial port + */ + virtual void unlock(void); }; } // namespace mbed