Serial port classes moved to Gitorious

When I first published this article about using serial port with C++ I didn’t expect it to become one of the main reasons people visit my website. Over time, thanks to many comments, bug reports and suggestion, the serial port classes have been modified significantly, to the point that releasing them in a .tar.gz file is no longer a good idea.

I’ve therefore decided to create a git repository at where you can get the latest version of my serial port classes.

About these ads

3 Responses to “Serial port classes moved to Gitorious”

  1. bluehash Says:

    Thanks for your work:)

  2. James Says:

    Thanks very much for your excellent and most useful classes =]
    I just have a question regarding the callback version. I am currently having issues getting multithreaded mutexs to work as I would like, and I have just visited the original article again and noticed that you said “This is why proper mutexing for synchronization might be required.”
    Are there any code examples showing proper implementation with mutexs? Just FYI, I am implementing the serial to communicate with a microcontroller, but I already have a second thread, depended on the results of communication.

  3. fedetft Says:

    I don’t have code examples, but the idea is that the callback is called from a backgroud thread, so if the callback modifies some data structures in your code, such as doing a push_back() of the received data in a vector to store received lines, you have to lock a mutex in the callback (and also in the code from your main thread that accesses that vector) to prevent race conditions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: