ccd.c File Reference

#include <linux/config.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/types.h>
#include <linux/major.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/fcntl.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/devpts_fs.h>
#include <linux/file.h>
#include <linux/console.h>
#include <linux/timer.h>
#include <linux/ctype.h>
#include <linux/kd.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include "ccd.h"
#include "dbgstuff.h"

Go to the source code of this file.


#define CCD_VERSION   "V0.1 (C) P.Zahl 2000"
#define my_iounmap(x, b)   (((long)x<0x100000)?0:vfree ((void*)x))
#define capable(x)   suser()
#define queue_task   queue_task_irq_off
#define tty_flip_buffer_push(tty)   queue_task(&tty->flip.tqueue, &tq_timer)
#define signal_pending(current)   (current->signal & ~current->blocked)
#define schedule_timeout(to)   do {current->timeout = jiffies + (to);schedule ();} while (0)
#define test_and_set_bit(nr, addr)   set_bit(nr, addr)
#define test_and_clear_bit(nr, addr)   clear_bit(nr, addr)
#define ASYNC_SPD_SHI   -1
#define ASYNC_SPD_WARP   -1
#define driver_name   name
#define TTY_HW_COOK_OUT   14
#define TTY_HW_COOK_IN   15
#define TIMEOUT_TICKS   19
#define JIFFIES_SEM   2
#define MAXWAKEUPS_SEM   10


static void timeout (unsigned long ignore)
void mysleep (unsigned long myjiffies)
static ssize_t ccd_read (struct file *, char *, size_t, loff_t *)
static int ccd_ioctl (struct inode *, struct file *, unsigned int, unsigned long)
int ccd_initialize (void)
void ccd_quit (void)
int init_module (void)
void cleanup_module (void)
static int ccd_open (struct inode *inode, struct file *f)
static int ccd_release (struct inode *inode, struct file *f)


static int ccd_major
static int opened
static ccd_parport ccd_parport_io
static ccd_parportccd_io
static struct wait_queue * waitq = NULL
file_operations ccd_fops

Define Documentation

#define ASYNC_SPD_SHI   -1

Definition at line 92 of file ccd.c.

#define ASYNC_SPD_WARP   -1

Definition at line 93 of file ccd.c.

#define capable  )     suser()

Definition at line 80 of file ccd.c.

#define CCD_VERSION   "V0.1 (C) P.Zahl 2000"

Definition at line 38 of file ccd.c.

#define driver_name   name

Definition at line 101 of file ccd.c.

#define JIFFIES_SEM   2

Definition at line 127 of file ccd.c.

#define MAXWAKEUPS_SEM   10

Definition at line 128 of file ccd.c.

#define my_iounmap x,
 )     (((long)x<0x100000)?0:vfree ((void*)x))

Definition at line 78 of file ccd.c.

#define queue_task   queue_task_irq_off

Definition at line 82 of file ccd.c.

#define schedule_timeout to   )     do {current->timeout = jiffies + (to);schedule ();} while (0)

Definition at line 85 of file ccd.c.

#define signal_pending current   )     (current->signal & ~current->blocked)

Definition at line 84 of file ccd.c.

Referenced by dspsim_thread().

#define test_and_clear_bit nr,
addr   )     clear_bit(nr, addr)

Definition at line 89 of file ccd.c.

#define test_and_set_bit nr,
addr   )     set_bit(nr, addr)

Definition at line 88 of file ccd.c.

#define TIMEOUT_TICKS   19

Definition at line 126 of file ccd.c.

#define tty_flip_buffer_push tty   )     queue_task(&tty->flip.tqueue, &tq_timer)

Definition at line 83 of file ccd.c.

#define TTY_HW_COOK_IN   15

Definition at line 105 of file ccd.c.

#define TTY_HW_COOK_OUT   14

Definition at line 104 of file ccd.c.

Function Documentation

int ccd_initialize void   ) 

static int ccd_ioctl struct inode *  ,
struct file *  ,
unsigned  int,
unsigned  long

Definition at line 192 of file ccd.c.

References CCD_CMD_CLEAR, CCD_CMD_EXPOSURE, CCD_CMD_GETPIXEL, CCD_CMD_INITLESEN, CCD_CMD_MONITORENABLE, ccd_io, CCD_Lesen, CCD_Monitoring, CCD_Move2Mem, CCD_Next, CCD_PixWert, CCD_Sammeln, and mysleep().

static int ccd_open struct inode *  inode,
struct file *  f

Definition at line 177 of file ccd.c.

References KDEBUG, and opened.

void ccd_quit void   )  [inline]

static ssize_t ccd_read struct file *  ,
char *  ,
size_t  ,
loff_t * 

Definition at line 163 of file ccd.c.

static int ccd_release struct inode *  inode,
struct file *  f

Definition at line 185 of file ccd.c.

References KDEBUG, and opened.

void cleanup_module void   ) 

int init_module void   ) 

void mysleep unsigned long  myjiffies  ) 

static void timeout unsigned long  ignore  )  [static]

Definition at line 145 of file ccd.c.

References KDEBUG_L3, waitq, and wakeups.

Variable Documentation

struct file_operations ccd_fops

Initial value:


Definition at line 304 of file ccd.c.

ccd_parport* ccd_io [static]

Definition at line 117 of file ccd.c.

int ccd_major [static]

Definition at line 112 of file ccd.c.

ccd_parport ccd_parport_io [static]

Definition at line 116 of file ccd.c.

int opened [static]

Definition at line 113 of file ccd.c.

struct wait_queue* waitq = NULL [static]

Definition at line 120 of file ccd.c.

Referenced by BoxEmpty(), BoxFull(), ChanneltronCounts(), get_dport_range(), mysleep(), and timeout().

Generated on Sat Apr 1 09:04:44 2006 for GXSM by  doxygen 1.4.6