Results 1 to 20 of 32

Thread: Parallel Interface

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Nov 2007
    Posts
    27
    Thanks
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Parallel Interface

    I tried the parapin drivers and it works good as root.
    When using the parapin-kernel-driver i can access the port from user-space.
    Do anybody know how to implement the kerneldriver with qt.
    I am looking for something very similar "QParaport.zip" from "high_flyer".

    I able to open the parapindriver with:
    (set pins is also possible:
    int kparappWidget::pushButtonOpen_clicked()
    {
    pardevice = open("/dev/ppdrv_device", 0);
    if (pardevice < 0) {
    fprintf(stderr, "pardevice open failed\n");
    exit(-1);
    }
    return 0;
    }

    but when i call the close function, all widgets on the application mainWin
    disappear and i only can close (kill) the app.

    int kparappWidget::pushButtonClose_clicked()
    {
    close(pardevice);
    return 0;
    }

    here is the code for setting pins:

    void kparappWidget::pushButtonSetPins_clicked()
    {
    ioctl(pardevice, PPDRV_IOC_PINMODE_OUT, LP_PIN02);

    ioctl(pardevice, PPDRV_IOC_PINSET, LP_PIN02 | LP_PIN03 | LP_PIN04 | LP_PIN05 | LP_PIN06 | LP_PIN07 | LP_PIN08 | LP_PIN09);
    }

    cheers wally
    Last edited by wallyqt; 13th November 2007 at 12:03. Reason: tried to removed disturbing smiles

Similar Threads

  1. C++ Interface ..???
    By joseph in forum General Programming
    Replies: 3
    Last Post: 28th May 2008, 09:27
  2. Interface composition and QObject
    By brcain in forum Qt Programming
    Replies: 9
    Last Post: 20th November 2006, 17:56
  3. User Interface with QTableView
    By Brandybuck in forum Qt Programming
    Replies: 1
    Last Post: 22nd March 2006, 23:24
  4. Qt interface running extremely slowly...
    By jazztpt in forum Qt Programming
    Replies: 1
    Last Post: 4th February 2006, 11:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.