[LinuxPPS] parallel PPS

Rodolfo Giometti giometti at enneenne.com
Fri Feb 29 21:47:13 CET 2008


On Fri, Feb 29, 2008 at 03:44:41PM +0100, Remco den Besten wrote:
> 
> However, I want to try the ACK pin of the parallel port too (for some 
> reasons).
> When I read the LinuxPPS wiki I can'f figure out how to use the parallel 
> port.
> 
> I made the 'character devices' pps0 and 1 via mknod /dev/pps0 c 254 0 or 1 
> (so not 253 ?!)

The major number is defined here:

giometti at jeeg:~$ grep pps /proc/devices 
253 pps

> and from what I understand are these devices are 'activated' as soon as one 
> of the serial ports is
> placed into the 'hardpps' mode, as can be seen with 'tree /sys/class/pps'
>
> But.. how to assign the parallel port /dev/pps0 or 1 ?

This is done by the system. Just load the parport module (avoiding the
polling mode) and one of its clients (lp or ppdev) and look into
sysfs:

giometti at jeeg:~$ sudo modprobe parport_pc irq=7 io=0x378
giometti at jeeg:~$ sudo modprobe lp
giometti at jeeg:~$ tree /sys/class/pps/
/sys/class/pps/
`-- pps0
    |-- assert
    |-- clear
    |-- dev
    |-- device -> ../../../devices/platform/parport_pc.888
    |-- echo
    |-- mode
    |-- name
    |-- path
    |-- power
    |   `-- wakeup
    |-- subsystem -> ../../../class/pps
    `-- uevent

4 directories, 9 files
giometti at jeeg:~$ cat /sys/class/pps/pps0/{name,path}
parport0
/dev/lp0

Please report your test for parallel port (it was very poor tested...)

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