10 years ago.

Flow Control for platforms with 2 pin UART

Hello All, I was happy to see that RTS/CTS flow control was added to MBED::Serial. However, I recently tried building a small app using this for a Freescale KL46Z and was slightly surprised to see the build fail (class "MBED::Serial" has no member "set_flow_control"). It seems that DEVICE_SERIAL_FC is not defined in the MBED lib for this platform. I'd assume that is because the KL46Z doesn't have 4 pin UARTs supporting hardware flow control.

So, it's great to see HW FC added for the platforms that support it in hardware, but there seem to be quite a few that don't as well. My co-workers and I have written up a couple of classes that implement a serial class on top of MBED::Serial. Our serial class uses 2 GPIO pins for RTS/CTS and has a software buffer on top of the hardware buffer.

It would be nice to see something like this included in the MBED::Serial class, so that all platforms can behave the same way in this area. Our code is available at http://mbed.org/teams/Multi-Hackers/code/SocketModem/file/efc4db23a564/io.

Any chance we could get something analogous to this added to MBED::Serial?

-Mike

Question relating to:

Be the first to answer this question.