Platform drivers for Mbed.
Dependents: EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more
Diff: src/platform_support.cpp
- Revision:
- 11:a2dcf0ebb5b5
- Parent:
- 9:9e247b9c9abf
--- a/src/platform_support.cpp Wed Jun 17 14:54:14 2020 +0000 +++ b/src/platform_support.cpp Mon Aug 03 17:21:20 2020 +0530 @@ -24,16 +24,15 @@ /********************** Variables and User defined data types *****************/ /******************************************************************************/ - - /******************************************************************************/ /************************ Variable Declarations *******************************/ /******************************************************************************/ -// Configure and instantiate Serial object to access the stdin. +// Configure and instantiate UnbufferedSerial object to access the stdin. // The default mbed baud rate is 9600, unless is it overriden in the -// mbed_app.json file, or by creating another Serial object using the same pins. -static Serial port(USBTX, USBRX); +// mbed_app.json file, or by creating another UnbufferedSerial object using +// the same pins. +static UnbufferedSerial port(USBTX, USBRX); /******************************************************************************/ /************************ Functions Definitions *******************************/ @@ -50,7 +49,7 @@ // Return the character read from the serial port if (port.readable() > 0) { - rx_char = port.getc(); + port.read(&rx_char, 1); } return rx_char;