mbed library sources
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Superseded
This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Diff: targets/hal/TARGET_NXP/TARGET_LPC176X/serial_api.c
- Revision:
- 108:4cb9db2ced35
- Parent:
- 64:7b352733b00a
- Child:
- 109:bc5f94f2a67f
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/serial_api.c Thu Feb 27 09:45:07 2014 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/serial_api.c Mon Mar 03 11:15:08 2014 +0000 @@ -364,12 +364,10 @@ } int serial_writable(serial_t *obj) { - int isWritable = 1; if (NC != uart_data[obj->index].sw_cts.pin) - isWritable = gpio_read(&uart_data[obj->index].sw_cts) == 0; - if (isWritable) - isWritable = obj->uart->LSR & 0x40; - return isWritable; + return (gpio_read(&uart_data[obj->index].sw_cts) == 0) && (obj->uart->LSR & 0x40); //If flow control: writable if CTS low + UART done + else + return obj->uart->LSR & 0x20; //No flow control: writable if space in holding register } void serial_clear(serial_t *obj) {