[ntp:questions] Re: PPS API
Rodolfo Giometti
giometti at linux.it
Sat Apr 16 16:58:58 UTC 2005
Sorry for delay...
On Fri, Apr 08, 2005 at 02:39:55PM +0200, Ulrich Windl wrote:
> What I undertstood is that this is simply still all in kernel space; right?
> What should be the benefits from your point of view?
The benefits are:
* by using the netlink layer we can divide the PPSAPI from a
particular driver (you don't need to modify the serial driver so
heavy).
* the PPSAPI can be the same for all PPS source (currently in
PPSkit-light-PPSAPI-alpha-1610m-2.6.5 there are duplicated functions
whose do the same things: do_clock_gettime(), pps_update_event(),
etc.)
* by using the exported kernel symbols we can manage the PPS source
with few and simple functions calls. For example, once you register a
PPS source into the kernel with:
static struct linuxpps_source_info_s linuxpps_ktimer_info = {
name : "my PPS source",
mode : PPS_CAPTUREASSERT|PPS_OFFSETASSERT|PPS_ECHOASSERT| \
PPS_CANWAIT|PPS_TSFMT_TSPEC,
echo : linuxpps_ktimer_echo,
};
...
source = linuxpps_register_source(&linuxpps_ktimer_info, ...);
you can signal an assert event (for example in the interrupt handler
routine) just using:
linuxpps_event(source, PPS_CAPTUREASSERT);
The same function may also runs the defined echo function
(linuxpps_ktimer_echo()) if the user asked for that... etc.
I'm just working on it and I hope to be able to post some alpha
version of my code as soon as possible, so you can see it and give me
back some suggestions.
Thanks,
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://lists.ntp.org/pipermail/questions/attachments/20050416/ef7f63b1/attachment.pgp>
More information about the questions
mailing list