/* THESE ARE SOME HELPER FUNCTIONS TO GRAB THE IMAGE AND SUMM THE NUMBER OF BYTES FROM THE ROW TO PRINT OUT THE SUM USED FOR INITIAL TESTING ONLY */ void sumup(){ int i, result = 0; /* set the control register to live video */ writeb(0x91, ps_data.mem + 0x2000); wmb(); mdelay(500); /* set the control register to read from te 0th line */ writeb(0, ps_data.mem + 0x2002); mb(); for(i=0;i<511;i++){ result += readb(ps_data.mem + i); mb(); } printk(KERN_CRIT "sum : %i\n",result); }