[LinuxPPS] LinuxPPS 5.0.0-rc1
Rodolfo Giometti
giometti at enneenne.com
Fri Aug 10 10:00:35 CEST 2007
On Thu, Aug 09, 2007 at 11:58:22PM -0600, clemens at dwf.com wrote:
> This seems like another arbitrary change to the interface.
If you meant between 4.x and 5.x you are right, but 5.x is PPSAPI
compatible, even if we'll never have a device which is both a GPS data
source and a PPS data source.
The trick was here (thanks to Frank)! :)
> As it has stood up to now, linking both the GPS data and the PPS data to
> the same device was just fine.
Yes, this is allowed by the PPS API, but this not a "must".
> It is quite common with ntp (and the oncore driver) to put the following
> in the dev file
>
> ln -s /dev/oncore.serial.0 /dev/ttyS0
> ln -s /dev/oncore.pps,0 /dev/ttyS0
>
> linking BOTH the serial and the pps devices used by the code to the
> same device. This could equally well read
>
> ln -s /dev/oncore.serial.0 /dev/ttyS0
> ln -s /dev/oncore.pps.0 /dev/lp0
>
> if the parallel interface were being used for the PPS signal,
> the code expects it will be able to open these two devices.
Yes! In LinuxPPS you should do instead:
ln -s /dev/oncore.serial.0 /dev/ttyS0
ln -s /dev/oncore.pps.0 /dev/pps0
> For a standard GPS unit, with the PPS on the DCD line what am I
> supposed to do with this new interface?
> (a) open it once, and use it for both GPS and PPS data?
> (b) open it twice and use one each for GPS and PPS data? (as I do currently)
No, you should do:
gps_fd = open("/dev/oncore.serial.0", ...);
pps_fd = open("/dev/oncore.pps.0", ...);
time_pps_create(pps_fd, &handle);
and then using gps_fd for standard operations with GPS data, and
handle for PPS management. Again, the link /dev/oncore.pps.0 points to
/dev/pps0 or /dev/pps1, etc. (you can use sysfs files to discover
which is the right source.).
> I guess I just dont understand your words/example, but it appears to be
> a significant change from what we have had in the past and have in
> the previous linuxPPS.
Yes, you are right! That's why I'm sure we can get _both_ NTP and
kernel inclusion!
I'm just updating the wiki for the new 5.x series... please refere to
it in order to have further info.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the LinuxPPS
mailing list