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: drivers/UARTSerial.h
- Revision:
- 170:e95d10626187
- Parent:
- 169:a7c7b631e539
- Child:
- 171:3a7713b1edbc
diff -r a7c7b631e539 -r e95d10626187 drivers/UARTSerial.h --- a/drivers/UARTSerial.h Fri Jun 22 15:38:59 2018 +0100 +++ b/drivers/UARTSerial.h Thu Sep 06 13:39:34 2018 +0100 @@ -42,7 +42,7 @@ /** \addtogroup drivers */ /** Class providing buffered UART communication functionality using separate circular buffer for send and receive channels - * + * * @ingroup drivers */ @@ -81,7 +81,7 @@ * @param length The number of bytes to write * @return The number of bytes written, negative error on failure */ - virtual ssize_t write(const void* buffer, size_t length); + virtual ssize_t write(const void *buffer, size_t length); /** Read the contents of a file into a buffer * @@ -95,7 +95,7 @@ * @param length The number of bytes to read * @return The number of bytes read, 0 at end of file, negative error on failure */ - virtual ssize_t read(void* buffer, size_t length); + virtual ssize_t read(void *buffer, size_t length); /** Close a file * @@ -201,7 +201,7 @@ * @param parity The parity used (None, Odd, Even, Forced1, Forced0; default = None) * @param stop_bits The number of stop bits (1 or 2; default = 1) */ - void set_format(int bits=8, Parity parity=UARTSerial::None, int stop_bits=1); + void set_format(int bits = 8, Parity parity = UARTSerial::None, int stop_bits = 1); #if DEVICE_SERIAL_FC // For now use the base enum - but in future we may have extra options @@ -219,7 +219,7 @@ * @param flow1 the first flow control pin (RTS for RTS or RTSCTS, CTS for CTS) * @param flow2 the second flow control pin (CTS for RTSCTS) */ - void set_flow_control(Flow type, PinName flow1=NC, PinName flow2=NC); + void set_flow_control(Flow type, PinName flow1 = NC, PinName flow2 = NC); #endif private: