wois[(P_MULTI_HEIGHT1-P_MULTI_WOI)+0]=(((wois[(P_MULTI_HEIGHT1-P_MULTI_WOI)+0]/dv)&~1)+X313_MARGINS)*dv;// include margins into individual sensor WOI-sizes, make even number of output lines
wois[(P_MULTI_HEIGHT1-P_MULTI_WOI)+0]=(((wois[(P_MULTI_HEIGHT1-P_MULTI_WOI)+0]/dv)&~1)+(2*COLOR_MARGINS))*dv;// include margins into individual sensor WOI-sizes, make even number of output lines
@@ -1005,10 +1010,15 @@ int multisensor_pgm_detectsensor (int sensor_port, ///< sensor p
// Try to read chip version from each of the 3 possible sensors
printk("removing MRST from the sensor\n");
//
CCAM_NEGRST;// set negative MRST polarity
CCAM_TRIG_INT;
CCAM_MRST_OFF;
CCAM_ARST_OFF;
sensio_ctl.d32=0;
sensio_ctl.mrst=1;
sensio_ctl.mrst_set=1;
sensio_ctl.arst=1;
sensio_ctl.arst_set=1;
x393_sensio_ctrl(sensio_ctl,sensor_port);
camsync_mode.trig=0;
camsync_mode.trig_set=1;
x393_camsync_mode(camsync_mode);
udelay(100);
GLOBALPARS(sensor_port,G_SENS_AVAIL)|=1<<(GLOBALPARS(sensor_port,G_SENS_AVAIL));// temporary to indicate sensor detection functions that they need to initialize multisensor registers
...
...
@@ -1142,9 +1152,10 @@ Now overwrite sensor functions with it's own (originals (physical sensor ones) a
SETFRAMEPARS_SET(P_MULTI_HEIGHT2,1940);
SETFRAMEPARS_SET(P_MULTI_HEIGHT3,1940);
#ifdef NC353
CCAM_RESET_MCONTR_ON;// Set mode that resets memory controller pointers after each frame sync. TODO: Later - make it work without?
CCAM_ENDFRAMES_EN;// Enable ending frame being compressed if no more data will be available (frame ended before specified number of blocks compressed)
#endif
if(nupdate)setFramePars(sensor_port,thispars,nupdate,pars_to_update);// save changes to sensor register shadows
returnthis_sensor_type;
}
...
...
@@ -1295,7 +1306,7 @@ int multisensor_pgm_multisens (int sensor_port, ///< sensor port n
intmulti_frame=0;
if(composite&&SENSOR_IN_SEQ_EN(1,sequence,sensor_mask)){// specified in sequence is enabled
/** @brief Contains read and write pointers along with IRQ number for a single channel*/
structjpeg_ptr_t{
volatileu32frame;///< Absolute frame number
volatileintjpeg_wp;///< JPEG write pointer in 32 bit words
volatileintjpeg_rp;///< JPEG read pointer in 32 bit words
volatileintfpga_cntr_prev;///< This field contains previous value of the FPGA transfer counter which is used to find out if it has changed. This pointer is in 32 bit words.
...
...
@@ -252,7 +253,10 @@ static inline int updateIRQJPEG_wp(struct jpeg_ptr_t *jptr)
void*virt_addr;
// int prev_dword;
intxferred;// number of 32-byte chunks transferred since compressor was reset
putlong_meta_raw_irq(sensor_port,get_imageParamsThis(sensor_port,P_WOI_LEFT)|(get_imageParamsThis(sensor_port,P_WOI_WIDTH)<<16),maker_offset+32);//No Past
putlong_meta_raw_irq(sensor_port,get_imageParamsThis(sensor_port,P_WOI_TOP)|(get_imageParamsThis(sensor_port,P_WOI_HEIGHT)<<16),maker_offset+36);//No Past
((get_imageParamsThis(sensor_port,P_PORTRAIT)&1)<<7)|// No past!
(get_imageParamsThis(sensor_port,P_CORING_INDEX)<<16),maker_offset+52);// No past!
putlong_meta_raw_irq(sensor_port,get_globalParam(sensor_port,G_TEMPERATURE01),maker_offset+56);// data should be provided by a running daemon // No past!
putlong_meta_raw_irq(sensor_port,get_globalParam(sensor_port,G_TEMPERATURE23),maker_offset+60);// No past!
///NOTE: If profiling is enabled (TASKLET_CTL_ENPROF is set in G_TASKLET_CTL) - save current time in 2 of the 32-bit locations that can be read as pastpars (i.e. from PHP)