@@ -25,10 +25,10 @@ int exif_enable_chn(int sensor_port, int en); // enable/disable Exif process
...
@@ -25,10 +25,10 @@ int exif_enable_chn(int sensor_port, int en); // enable/disable Exif process
intexif_enable(inten);// For all sensor ports
intexif_enable(inten);// For all sensor ports
intdir_find_tag(unsignedlongtag);//!find location of the tag field in meta page using long tag (Exif tag and tag group)
intdir_find_tag(unsignedlongtag);//!find location of the tag field in meta page using long tag (Exif tag and tag group)
inlinevoidwrite_meta_raw_irq(intsensor_port,char*data,intoffset,intlen);//write data to meta, called from IRQ
voidwrite_meta_raw_irq(intsensor_port,char*data,intoffset,intlen);//write data to meta, called from IRQ
inlineintwrite_meta_irq(intsensor_port,char*data,int*indx,unsignedlongltag,intlen);//write data to meta, called from IRQ(len==0 => use field length)
intwrite_meta_irq(intsensor_port,char*data,int*indx,unsignedlongltag,intlen);//write data to meta, called from IRQ(len==0 => use field length)
inlinevoidputlong_meta_raw_irq(intsensor_port,unsignedlongdata,intoffset);//write data to meta (4 bytes, big endian), called from IRQ
voidputlong_meta_raw_irq(intsensor_port,unsignedlongdata,intoffset);//write data to meta (4 bytes, big endian), called from IRQ
inlineintputlong_meta_irq(intsensor_port,unsignedlongdata,int*indx,unsignedlongltag);//write data to meta (4 bytes, big endian), from IRQ
intputlong_meta_irq(intsensor_port,unsignedlongdata,int*indx,unsignedlongltag);//write data to meta (4 bytes, big endian), from IRQ
//void write_meta_raw_irq(char * data, int offset, int len); //write data to meta, called from IRQ
//void write_meta_raw_irq(char * data, int offset, int len); //write data to meta, called from IRQ
//int write_meta_irq(char * data, int * indx, unsigned long ltag, int len); //write data to meta, called from IRQ(len==0 => use field length). Returns index of the written data, -1 if not written
//int write_meta_irq(char * data, int * indx, unsigned long ltag, int len); //write data to meta, called from IRQ(len==0 => use field length). Returns index of the written data, -1 if not written
...
@@ -37,7 +37,7 @@ int write_meta(int sensor_port, char * data, int * indx, unsigned long ltag, in
...
@@ -37,7 +37,7 @@ int write_meta(int sensor_port, char * data, int * indx, unsigned long ltag, in
voidputlong_meta_raw(intsensor_port,unsignedlongdata,intoffset);//write data to meta (4 bytes, big endian), called from outside IRQ (atomic)
voidputlong_meta_raw(intsensor_port,unsignedlongdata,intoffset);//write data to meta (4 bytes, big endian), called from outside IRQ (atomic)
intputlong_meta(intsensor_port,unsignedlongdata,int*indx,unsignedlongltag);//write data to meta (4 bytes, big endian), from outside IRQ (atomic). Returns index of the written data, -1 if not written
intputlong_meta(intsensor_port,unsignedlongdata,int*indx,unsignedlongltag);//write data to meta (4 bytes, big endian), from outside IRQ (atomic). Returns index of the written data, -1 if not written
///TODO: init framepars (zero parameters) before initscripts (not when detecting the sensors) - then initscript will be able to overwrite some
///TODO: init framepars (zero parameters) before initscripts (not when detecting the sensors) - then initscript will be able to overwrite some
voidinit_framepars_ptr(void);
voidinit_framepars_ptr(intsensor_port);
voidinitSequencers(void);///Move to sensorcommon? currently it is used through frameparsall file (lseek)
voidinitSequencers(intsensor_port);///Move to sensorcommon? currently it is used through frameparsall file (lseek)
voidinitGlobalPars(void);/// resets all global parameters but debug mask (if ELPHEL_DEBUG)
voidinitGlobalPars(intsensor_port);/// resets all global parameters but debug mask (if ELPHEL_DEBUG)
intinitMultiPars(void);/// initialize structures for individual per-sensor parameters. Now only works for sensor registers using G_MULTI_REGSM. Should be called aftre/during sensor detection
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(void);///initialize all parameters, set thisFrameNumber to frame8 (read from hardware, usually 0 after resetting i2c and cmd_seq)
voidinitFramePars(intsensor_port);///initialize all parameters, set thisFrameNumber to frame8 (read from hardware, usually 0 after resetting i2c and cmd_seq)
voidresetFrameNumber(void);/// reset this frame number (called from initFramePars(), also can be used to avoid frame number integer overflow)
voidresetFrameNumber(intsensor_port);/// reset this frame number (called from initFramePars(), also can be used to avoid frame number integer overflow)
voidupdateFramePars(intsensor_port,intframe8,structinterframe_params_t*frame_pars);/// called from ISR - advance thisFrameNumber to match hardware frame8, copy parameters as needed.
voidupdateFramePars(intframe8,structinterframe_params_t*frame_pars);/// called from ISR - advance thisFrameNumber to match hardware frame8, copy parameters as needed.
/// frame8 usually is just next after thisFrameNumber
/// frame8 usually is just next after thisFrameNumber
/// frame_pars - pointer to structure (between frames in the frame buffer) to save a pointer to past parameters
/// frame_pars - pointer to structure (between frames in the frame buffer) to save a pointer to past parameters
unsignedlonggetThisFrameNumber(void);/// just return current thisFrameNumber
unsignedlonggetThisFrameNumber(intsensor_port);/// just return current thisFrameNumber
/// set parameters for the frame number frameno, knowing that they should be set not less than maxLatency ahead (may be sensor - dependent)
/// set parameters for the frame number frameno, knowing that they should be set not less than maxLatency ahead (may be sensor - dependent)
/// Parameters (numPars of them) will be updated all at once, with interrupts disabled
/// Parameters (numPars of them) will be updated all at once, with interrupts disabled
/// Return - 0 if OK, -ERR_FRAMEPARS_TOOEARLY or -ERR_FRAMEPARS_TOOLATE if it is too early or too late to set parameters (numPars may be 0 to just test)
/// Return - 0 if OK, -ERR_FRAMEPARS_TOOEARLY or -ERR_FRAMEPARS_TOOLATE if it is too early or too late to set parameters (numPars may be 0 to just test)
...
@@ -42,27 +43,28 @@ unsigned long getThisFrameNumber(void); /// just return current thisFrameNumber
...
@@ -42,27 +43,28 @@ unsigned long getThisFrameNumber(void); /// just return current thisFrameNumber
/// TODO: Make (an "unlimited") future commands que based on lists and a tree frame index
/// TODO: Make (an "unlimited") future commands que based on lists and a tree frame index
///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)
///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)