[PARPORT] application over PARPORT

From: veeren (veeren@multitech.co.in)
Date: Tue Oct 08 2002 - 13:11:38 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] application over PARPORT"

    Hi,
    Here I Am using parallel port to communicate to the remote target.
    in parport_pc.c I wrote my own receive and transmit routines,
    and I insmod parport_pc.o with irq=7.
    In order to test my rx and tx routines, I Am calling them
    from the parport interrupt routine in the same file(parport_pc.c)
    and invoking the interrupt routine with an external interrupt pulse.
    (on pin S6n-Ack). and my Test results are good. I Am able to send
    and receive data from remote target.

    Now I want to write an application in such a way, i should be able to
    invoke the parport rx and tx routines with their function parameters.
    ( it seems parport driver is unlike to other device drivers in linux)
        any guidelines pls.

    Thanks and regards
    veeru.

    Dave Strauss wrote:

    > On Tue, 08 Oct 2002 11:51:21 +0100, Shaun<shaun@traderman.co.uk> wrote:
    > >
    > > Hi
    > >
    > > I have been trying to get redhat 7.2 to recognise my parport in ECP mode
    > > so that I can run some dongle enabled software under VMWare. For this I
    > > need VMWare to have a bidirectional parallel port.
    > >
    > > The port is recognised by linux but the only mode available is PCSPP
    > >
    > > The bios supports standard, bi-directional,ECP and EPP but all of these
    > > give the same result.
    > >
    > > I have tried the suggested workaround from the people.redhat site for
    > > VMWare and I have upgraded to VMWare 3.2 but this makes no difference.
    > >
    > > Shaun Coughlin
    > >
    >
    > RedHat 7.2 is shipped with ECP support turned off. To turn it on, you
    > need to (at a minimum) rebuild and install the parport_pc.o module
    > with CONFIG_PARPORT_PC_FIFO enabled (CONFIG_PARPORT_PC_FIFO=y in the
    > config). Then you also have to put the magic incantation into
    > /etc/modules.conf to tell the module to use ECP mode and the FIFO.
    > Usually the easiest way to do this is the following (as root):
    >
    > cd /usr/src/linux-2.4
    > cp configs/<whatever the appropriate config for your system is> .config
    > make xconfig
    > click on "Parallel port support"
    > set "Use FIFO/DMA if available (EXPERIMENTAL)" to "y"
    > click on "Main Menu"
    > click on "Save and Exit"
    > make dep
    > make bzImage
    > make modules
    >
    > *Don't* do "make install" or "make modules-install" unless you really
    > want to install your newly built kernel and/or modules. Instead, you
    > can just replace the one module you're really interested in:
    >
    > cd /lib/modules/<your kernel version number>/kernel/drivers/parport
    > mv parport_pc.o parport_pc.o.orig
    > cp -p /usr/src/linux-2.4/drivers/parport/parport_pc.o parport_pc.o.new
    > cp -p parport_pc.o.new parport_pc.o
    >
    > [ Note that this preserves the original parport_pc.o modules in case you don't
    > like the new one ]
    >
    > Then add the following to /etc/modules.conf:
    >
    > options parport_pc irq=auto dma=auto (this line if you want to use DMA)
    > options parport_pc irq=auto dma=none (this line if you don't want to use DMA)
    >
    > Then unload your parport-related modules so the new one will load next
    > time you try to use it:
    >
    > rmmod lp parport_pc parport
    >
    > But then as Tim Waugh notes you don't need ECP mode to have a bidirectional
    > port.
    >
    > -- Dave Strauss
    >
    > -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    > -- with the single word "unsubscribe" in the body of the message. --

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Tue Oct 08 2002 - 13:11:32 EDT