if(rp>prev_p)nz--;// rolled through zero - make sure we'll not stuck in this loop forever
}
dev_dbg(g_dev_ptr,"LSEEK_CIRC_FIRST or LSEEK_CIRC_SCND: finish stepping back through frames, number of frames = %d, rp = 0x%x, fvld = %d, len32 = 0x%x",nf,rp,fvld,len32);
@@ -19,6 +19,7 @@ int initMultiPars (int sensor_port); /// initialize structures for individu
voidinitFramePars(intsensor_port);///initialize all parameters, set thisFrameNumber to frame8 (read from hardware, usually 0 after resetting i2c and cmd_seq)
voidresetFrameNumber(intsensor_port,u32aframe,inthreset);/// reset this frame number (called from initFramePars(), also can be used to avoid frame number integer overflow)
/// TODO: There still is a possibility, that there are compressor commands in the hardware que. Should we stop the hardware sequencer here (and restart it later)?
#endif /* TEST_DISABLE_CODE */
image_acq_priv.jpeg_ptr[chn].jpeg_wp=0;
image_acq_priv.jpeg_ptr[chn].jpeg_rp=0;
image_acq_priv.jpeg_ptr[chn].fpga_cntr_prev=0;
image_acq_priv.jpeg_ptr[chn].flags=0;
//update_irq_circbuf(jptr);
local_irq_restore(flags);
}
/**
* @brief Camera interrupts on/off (currently both in the FPGA and in the CPU)
* @param on 1 - enable, 0 - disable interrupts
*/
voidcamera_interrupts(inton){
inti;
x393_cmprs_interrupts_tirq_ctrl;
//MDF2(printk ("camera_interrupts(%d)\n",on));
dev_dbg(NULL,"set camera interrupts status: %d\n",on);
#ifdef TEST_DISABLE_CODE
if(on){
EN_INTERRUPT(SMART);
}else{
DIS_INTERRUPTS;
}
/// clear smart interrupt circuitry in any case
port_csp0_addr[X313_WA_SMART_IRQ]=0x8000;
reg_intr_vect_rw_maskintr_mask;
intr_mask=REG_RD(intr_vect,regi_irq,rw_mask);
intr_mask.ext=on?1:0;
REG_WR(intr_vect,regi_irq,rw_mask,intr_mask);
#endif /* TEST_DISABLE_CODE */
irq_ctrl.interrupt_cmd=on?IRQ_ENABLE:IRQ_DISABLE;
for(i=0;i<IMAGE_CHN_NUM;i++){
x393_cmprs_interrupts(irq_ctrl,i);
}
}
/**
* @brief sensor_common driver probing function
* @param[in] pdev pointer to \b platform_device structure
* @return 0 on success or negative error code otherwise
*/
//static int image_acq_init(struct platform_device *pdev)