On Sat, 2020-04-11 at 22:07 +0200, Wolfram Sang wrote: > > Make sure that all buffers are empty after opening (on all supported > systems). > > Signed-off-by: Wolfram Sang <w...@the-dreams.de> > --- > > This came up while debugging bug #1025. It doesn't fix the bug but I > think it is still nice to have. Opinions?
I agree to the idea of flushing RX and TX when a serial port got opened. Just got a few comments on the implementation: Is it intended that potential sp_flush() errors get ignored? (Assuming that DEBUG() is silent in regular applications. And at most only results in output but won't affect the return code.) Notice that sigrok grew support for several types of serial communication. Libserialport is one of them, but no longer is the only one (HID and BT got implemented, network support and others could get added). Given that libserialport is used in other projects outside of the sigrok environment, is it worth adjusting both the libsp open routine as well as libsigrok's common serial abstraction layer? virtually yours Gerhard Sittig -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel