Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years ago.
Could SerialDriver inherit RawSerial rather than SerialBase ?
As far as I can see, SerialDriver is already compatible with RawSerial (getc, putc, puts). It would only take to change the inherited class. It would be great for compatibility with libraries using RawSerial base class. That way they would be compatible with SerialDriver without any changes.
Using SerialBase as base class is somehow less convenient because SerialBase is very low level and does not define getc and putc methods.
Question relating to:
1 Answer
9 years ago.
Well, why not? SerialDriver implements all methods of RawSerial, so it should be compatible. I have published an update. It works on LPC1768.
Can you tell me some "libraries using RawSerial base class" you are interested in?
Excellent, thank you. I was also asking because in SerialDriver.h you commented above the puts method "for compatibility with RawSerial".
RPC librairies (remote control of the mbed device) over serial may use your library. This one <https://developer.mbed.org/users/MichaelW/code/RPCInterface/> for instance (it's using Serial at the moment but your library could be a better drop-in replacement)
My library for real-time remote read/write of mbed variables is also using it. <https://developer.mbed.org/users/Overdrivr/code/DistantIO/>
Thank you a lot for the changes, Regards
posted by 30 Oct 2015Assigned to
9 years ago.This means that the question has been accepted and is being worked on.