///TODO: init framepars (zero parameters) before initscripts (not when detecting the sensors) - then initscript will be able to overwrite some
voidinit_framepars_ptr(intsensor_port);
intinitSequencers(intsensor_port);///Move to sensorcommon? currently it is used through frameparsall file (lseek)
voidinitGlobalPars(intsensor_port);/// resets all global parameters but debug mask (if ELPHEL_DEBUG)
intinitMultiPars(intsensor_port);/// initialize structures for individual per-sensor parameters. Now only works for sensor registers using G_MULTI_REGSM. Should be called aftre/during sensor detection
voidinitFramePars(intsensor_port);///initialize all parameters, set thisFrameNumber to frame16 (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)
@@ -150,17 +150,21 @@ const unsigned long ahead_tab[]=
/// For Micron sensors limitfps should have the same latency as changing window height, otherwise when WOI_HEIGHT 0x3c0->0x790 and next frame VBLANK 0x13e->0x284
/// sensor waits till the counter overflows (>10 seconds) without any frame sync pulses
onchange_limitfps,0,2,1,1,1,0,/// check compressor will keep up, limit sensor FPS if needed
onchange_compmode,0,0,1,1,1,0,/// program compressor modes
// onchange_trigseq, 1, 0, 0, 0, 0, 0, /// program sequencer (int/ext) NOTE:needs >24 bit data, too much for sequencer
onchange_trigseq,1,2,1,1,1,0,/// program sequencer (int/ext) NOTE:needs >24 bit data, too much for sequencer. Should be not later than onchange_triggermode and limitfps
// onchange_trigseq, 1, 2, 1, 1, 1, 0, /// program sequencer (int/ext) NOTE:needs >24 bit data, too much for sequencer. Should be not later than onchange_triggermode and limitfps
onchange_trigseq,0,2,1,1,1,0,/// NC393: OK to program through the sequencer (full 32 bits)
onchange_irq,0,0,0,0,0,0,/// program smart IRQ mode
onchange_comprestart,0,0,0,0,0,0,/// restart after changing geometry (recognizes ASAP and programs memory channel 2 then)
/// onchange_compstop should have the same latency as onchange_window
structframepars_tfunc2call;///< func2call.pars[] - each parameter has a 32-bit mask of what pgm_function to call - other fields not used
unsignedlongglobalPars[NUM_GPAR];///< parameters that are not frame-related, their changes do not initiate any actions so they can be mmaped for both R/W
...
...
@@ -997,6 +1001,32 @@ struct framepars_all_t {
unsignedlongmultiSensRvrsIndex[P_MAX_PAR_ROUNDUP];///< reverse index (to parent) for the multiSensIndex in lower 16 bits, high 16 bits - sensor number
};
/// Parameters, common for all channels (trigger mode)
structcommon_pars_t{
unsignedlongmaster_chn;///< Master channel (controlparameters through this channel) ([0] - value, [1] - frame)