[Tinyos Core WG] Serial Control Interface
Martin Leopold
leopold at diku.dk
Wed Feb 7 16:23:37 PST 2007
Hi All.
Before x-mas we talked about a serial control interface, and I was
suppose to come up with a suggestion. I believe that many UARTs are
similar enough to try and come up with a joint interface. I don't have
any particular preference, but here is one suggestion (an alternative
would be doing it the posix way and stuffing all the configurations into
a struct). Any comments would be appreciated.
On a different note I noticed one thing looking at TEP113 and TEP117 -
as far as I can tell both claim to be "the UART HIL" without mentioning
the other. Is this by intention to have two high level UART interfaces
in different TEPs?
enum ser_rate_t {
B50,
B75,
...
};
enum ser_parity_t {
...
enum ser_data_bits_t {
...
enum ser_stop_bits_t {
...
interface SerialControl {
async command error_t setFlow(bool f);
async command bool getFlow();
async command error_t setRate(ser_rate_t b);
async command ser_rate_t getRate();
async command error_t setParity(ser_parity_t);
async command ser_parity_t getParity();
async command error_t setDataBits(ser_data_bits_t);
async command ser_data_bits_t getDataBits();
async command error_t setStopBits(ser_stop_bits_t);
async command ser_stop_bits_t getStopBits();
}
--
Regards Martin Leopold.
Dept. of Computer Science, University of Copenhagen
http://www.diku.dk/~leopold
More information about the Tinyos-2.0wg
mailing list