Re: [PARPORT] ecp on compaq armada

From: Donnchadh Ó Donnabháin (d_odonnabhain@vistech.ie)
Date: Tue Apr 18 2000 - 12:29:51 EDT

  • Next message: zhu qun ying: "Re: [PARPORT] base address?"

    Joseph Eggleston wrote:
    >
    > I'm trying to get a Webcam II working on a Compaq Armada 7800 (laptop).
    > Currently the cpia driver for the webcam requires the parallel port to
    > use ecp mode. The armada's bios calls the parallel port an "ECP Printer
    > Port" but the parallel port driver doesn't seem to recognize it as such.
    > I'm using the kernel version 2.2.14-5. Here's the relevant log info:

     Here's some code I used on a Compaq Armada 1530. Don't if if it will
    work
     on a 7800.

        Donnchadh

    /*
     * Compaq parallel port setup
     */

    inline void ppmode_begin__cf(unsigned char x)
    {
      outb(x, 0xFB);
    }

    inline void ppmode_end__cf(unsigned char x)
    {
      outb(x, 0xF9);
    }

    static void ppmode__c(unsigned char x, unsigned char y)
    {
      ppmode_begin__cf(y);
      outb(x, 0xE2);
      outb(y, 0xE3);
      ppmode_end__cf(y);
    }

    static void ppmode__f(unsigned char x, unsigned char y)
    {
      unsigned char z;
      ppmode_begin__cf(y);
      outb(x, 0xE2);
      z = inb(0xE3);
      ppmode_end__cf(z);
    }

    void set_port_mode(unsigned char x)
    {
      ppmode__c(0x07,0x03);
      ppmode__f(0xF0, x);
      ppmode__c(0x07, 0x07);
    }

    #define CPQ_PP_MODE_COMPAT 0x04
    #define CPQ_PP_MODE_BI 0x00
    #define CPQ_PP_MODE_EPP 0x01
    #define CPQ_PP_MODE_ECP 0x02

    -- 
    

    // Donnchadh Ó Donnabháin mailto:d_odonnabhain@vistech.ie // Vistech Software http://www.vistechsoftware.com // Inchvale House, Douglas West, Cork, Ireland // Ph. +353-21-918166 Fax +353-21-896142

    -- 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 Apr 18 2000 - 12:35:38 EDT