[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: irda.h: present but cannot be compiled (at ./configure)

From: Marcel Holtmann
Subject: Re: irda.h: present but cannot be compiled (at ./configure)
Date: 17 Jun 2003 11:52:31 +0200

Hi Pawel,

> What else I'd like to do is:
> mv include/devices/unixirda.h include/devices/irda.h
> mv common/devices/unixirda.c include/devices/irda.c
> I think IrDA implementation is not common across unix systems
> (in contrary to serial support).
> In configure script, I would check only for the system we use.
> currently we support only Linux. In the future we would extend
> the list to win32, MacOS X, whatever-will-support-irda. When
> we'll add such support, we would need to rewrite/split (unix)irda.c

a long time ago I wrote this hardware abstraction layer for serial and
IrDA devices. And my idea behind it, was to have common io funtion names
for different transport layers. In the first time this was serial, irda
and tekram. And so the functions are prefixed serial_*, irda_* and
tekram_*. Now we also have tcp_* and bluetooth_*. The underlaying os
specific implementation was done in different *.[ch] files which was
choosen on compile time. Only one of the os files is compiled and
provide the generic functions.

If you take a look a unixserial.c and winserial.c you will see that the
code didn't share anything important. This is the same for IrDA and
Bluetooth. The tekram.c is the only special, because it uses only serial
functions. If you found two UNIX systems, which implement for example
IrDA in two complete differnt ways, we may have to use linuxirda.c and
for example sunosirda.c and compile in only one of them. But until you
didn't found such implementation I would leave it as it is.

All os specific function share the same name, and so the include files
for the different transport layers can be the same.


And the linuxirda.h should be moved to common/devices/ because it can
only be included by unixirda.c (on a Linux system).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]