[PARPORT] writing data to the parallel port

From: Nordic Boy (jklaas@cs.albany.edu)
Date: Wed May 03 2000 - 18:26:05 EDT

  • Next message: stef: "[PARPORT] Superio-4 for Linux-2.3-99pre6, some tests"

    I am having problems writing to the parallel port from my driver. I would
    like to be able to write characters to the parallel port (and thus the
    printer). What I am doing specifically is the following:

        mydevice[0]->port->ops->frob_control \
          (mydevice[0]->port, PARPORT_CONTROL_SELECT, 0);
            . /* send commands to tell the parallel port switch
            . to switch. Basically a buch of write_data commands */
        mydevice[0]->port->ops->frob_control \

        for ( i = 0; ((i < BUFSIZE) && (curcount < count)) ; i++)
          if( get_user(chunk, buf + curcount))
                return -EFAULT;
          mydevice[0]->port->ops->write_data(mydevice[0]->port, chunk);
            /* write the data from the user to the port */
          curcount ++;

    Do I need to frob_control the port back to init or something?

    James Klaas

    -- 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 : Wed May 03 2000 - 18:29:17 EDT