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
Bookmarks