[Prev][Next][Index][Thread]

qclose hack



I was seeing some strange stuff with my fiddling.  I could
get it working once, then have to reboot to try again.  Seems
that the port was being locked somehow, and that the shutdown
code in xqcam wasn't cleaning me up.  I hacked out the relevant
portions and made a qclose to help me out.

I probably don't need all these includes, but it is just a hack.

-Brent

/*******************
qclose hack (slam the port shut darnit!)
*****************/
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/time.h>
#include <unistd.h>

/** QuickCam include files */
#include "qcam.h"
#include "qcam-os.h"
 
void main()
{
struct qcam *q;

  q=qc_init();

/* change this value to the location of your port, 378, 278, or 3bc */

  q->port=0x378;

  /* Release IO privileges */
  qc_close(q);
}