[ntp:hackers] PPS API
Rodolfo Giometti
giometti at linux.it
Fri Apr 1 01:07:03 PST 2005
Hello,
I'm trying to manage a PPS signal connected to an interrupt line on a
MPC8xx (PPC) board so I decided to do a little modification to the
PPSkit-light-PPSAPI-alpha-1610m-2.6.5.diff.gz patch since it keeps the
microseconds kernel time resolution.
I'd like to propose to this list my idea in order to have some usefull
feedback. :)
I think is better to divide the serial port code (and parallel port
one) from the PPS API and this can be achieved by moving the
userspace<->kernelspece data exchange to a generic netlink layer.
In the kernel space we can use the following functions:
int register_pps_source(int pps_id, char *name);
who gets a descriptive name and returns a PPS source ID (> 0) or -1 on
errors. Parameter "pps_id" can be used to force a specific ID (use 0
to ask the kernel to choose one for us).
int unregister_pps_source(int pps_id);
removes the PPS source pointed by "pps_id".
void pps_update_event(int pps_id, unsigned int status, struct timespec *ts);
update the PPS event data for source pointed by "pps_id". In "status"
we signal the ASSERT or CLEAR event and in "ts" we put the event
timestamp.
It could be a reasonable solution? Do you think there will be some
drawback?
Thanks in advance,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at linux.it
Linux Device Driver giometti at enneenne.com
Embedded Systems home page: giometti.enneenne.com
UNIX programming phone: +39 349 2432127
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://support.ntp.org/pipermail/hackers/attachments/20050401/820b544d/attachment.bin
More information about the hackers
mailing list