Hi,
I'm porting some Linux software to the mbed controller and am looking for some suggestions for the software design on mbed.
The software has some high-level 'business' logic that is straightforward to port since it's plain C/C++.
But dealing with the various peripherals is what is what I need some suggestions for. Here are the 'peripherals' I need to support:
- A serial port that sends data periodically. In Linux I just had a thread reading from it and blocking when that was no data.
- A serial port that I need to periodically communicate over. I send a request and wait for the response. In Linux I had a gain used a thread for that.
- A serial port that needs to present an interface to the user. This is a simple terminal where I print some stuff and listen for user input.
- A web server on Ethernet where I present a few webpages with data.
- A Ethernet I need to listen on a specific port for incoming commands.
All these things by themselves are easy to code for mbed using code that I see available for import. But it is not clear to me if I can use it. For instance the HTTPServer's bind() method blocks according the the description. And if I use classes like Ticker, I cannot use tasks the block, can I?
Can anyone give me some suggestions on how to set up a software framework for this?
Thanks.
Paul
Hi,
I'm porting some Linux software to the mbed controller and am looking for some suggestions for the software design on mbed.
The software has some high-level 'business' logic that is straightforward to port since it's plain C/C++.
But dealing with the various peripherals is what is what I need some suggestions for. Here are the 'peripherals' I need to support:
- A serial port that sends data periodically. In Linux I just had a thread reading from it and blocking when that was no data.
- A serial port that I need to periodically communicate over. I send a request and wait for the response. In Linux I had a gain used a thread for that.
- A serial port that needs to present an interface to the user. This is a simple terminal where I print some stuff and listen for user input.
- A web server on Ethernet where I present a few webpages with data.
- A Ethernet I need to listen on a specific port for incoming commands.
All these things by themselves are easy to code for mbed using code that I see available for import. But it is not clear to me if I can use it. For instance the HTTPServer's bind() method blocks according the the description. And if I use classes like Ticker, I cannot use tasks the block, can I?
Can anyone give me some suggestions on how to set up a software framework for this?
Thanks.
Paul