os/linux-2.6-tag--devboard-R2_10-4/arch/cris/arch-v32/drivers/elphel/sensor_common.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define FPGA_TABLE_CHUNK   64
#define X313_LENGTH_MASK   0xff000000
#define X313_PADDED_FRAME(x)   ((((x)+67+CCAM_MMAP_META ) >>2) & 0xfffffff8)
#define X313_BUFFSUB(x, y)   (((x)>=(y))? ((x)-(y)) : ((x)+ (CCAM_DMA_SIZE-(y))))
#define X313_BUFFADD(x, y)   ((((x) + (y))<=CCAM_DMA_SIZE)? ((x) + (y)) : ((x) - (CCAM_DMA_SIZE-(y))))
#define PROFILE_NOW(x)
 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).
#define PROFILE_NEXT(x)
 Put this to the next frame's data (before thisFrameNumber was incremented).

Functions

int camSeqGetJPEG_wp (void)
 Defines/macros moved from the cc353.h.
int camSeqGetJPEG_rp (void)
void camSeqSetJPEG_rp (int p)
int init_FPGA (void)
 Not yet used?? Check FPGA version and initialize SDRAM (if not done yet) TODO: when should it be called?
void reset_compressor (void)
 can be verified with if (!X313_IS_SDRAM_ON)
void camera_interrupts (int on)
 Camera interrupts on/off (currently both in the FPGA and in the CPU).

Variables

sensorproc_tsensorproc
unsigned long * ccam_dma_buf_ptr
 CIRCBUF macros.


Define Documentation

#define FPGA_TABLE_CHUNK   64

IRQ-safe "nice" FPGA table write and histogram read functions - they split the data in chunks of fixed size, disable IRQ, transfer a chunk, then reenable interrupt before proceedg to the next chunk

Definition at line 8 of file sensor_common.h.

#define PROFILE_NEXT ( x   ) 

Value:

Put this to the next frame's data (before thisFrameNumber was incremented).

Definition at line 33 of file sensor_common.h.

Referenced by elphel_FPGA_interrupt().

#define PROFILE_NOW ( x   ) 

Value:

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).

Definition at line 29 of file sensor_common.h.

Referenced by elphel_FPGA_interrupt(), setFrameParsAtomic(), and tasklet_fpga_function().

#define X313_BUFFADD ( x,
 )     ((((x) + (y))<=CCAM_DMA_SIZE)? ((x) + (y)) : ((x) - (CCAM_DMA_SIZE-(y))))

Definition at line 22 of file sensor_common.h.

Referenced by circbuf_lseek().

#define X313_BUFFSUB ( x,
 )     (((x)>=(y))? ((x)-(y)) : ((x)+ (CCAM_DMA_SIZE-(y))))

Definition at line 21 of file sensor_common.h.

Referenced by circbuf_lseek(), circbufValidPointer(), and jpeghead_lseek().

#define X313_LENGTH_MASK   0xff000000

Definition at line 19 of file sensor_common.h.

Referenced by circbuf_lseek(), circbufValidPointer(), and jpeghead_lseek().

#define X313_PADDED_FRAME ( x   )     ((((x)+67+CCAM_MMAP_META ) >>2) & 0xfffffff8)

Definition at line 20 of file sensor_common.h.

Referenced by circbuf_lseek().


Function Documentation

void camera_interrupts ( int  on  ) 

Camera interrupts on/off (currently both in the FPGA and in the CPU).

Parameters:
on 1 - enable, 0 - disable interrupts

clear smart interrupt circuitry in any case

Definition at line 580 of file sensor_common.c.

References DIS_INTERRUPTS, EN_INTERRUPT, MDF2, port_csp0_addr, printk, and X313_WA_SMART_IRQ.

Referenced by framepars_lseek(), and pgm_detectsensor().

int camSeqGetJPEG_rp ( void   ) 

Definition at line 233 of file sensor_common.c.

References JPEG_rp.

Referenced by circbuf_lseek().

int camSeqGetJPEG_wp ( void   ) 

Defines/macros moved from the cc353.h.

Definition at line 232 of file sensor_common.c.

References JPEG_wp.

Referenced by circbuf_lseek(), circbuf_poll(), circbufValidPointer(), and get_image_time().

void camSeqSetJPEG_rp ( int  p  ) 

Definition at line 234 of file sensor_common.c.

References G_CIRCBUFRP, G_CIRCBUFSIZE, G_CIRCBUFWP, G_FREECIRCBUF, get_globalParam(), JPEG_rp, and set_globalParam().

Referenced by circbuf_lseek().

int init_FPGA ( void   ) 

Not yet used?? Check FPGA version and initialize SDRAM (if not done yet) TODO: when should it be called?

Returns:
<0 error, 0 - just checked, nothing done,1 - needs sensor initialization

fpga is not configured

what this initialization really mean?

Definition at line 273 of file sensor_common.c.

References fpga_initSDRAM(), fpga_state, FPGA_STATE_INITIALIZED, FPGA_STATE_LOADED, MD1, port_csp0_addr, printk, X313__RA__MODEL, X313_CHN0_USED, X313_IS_SDRAM_ON, X313_MAXMODREV, and X313_MINMODREV.

void reset_compressor ( void   ) 

can be verified with if (!X313_IS_SDRAM_ON)

can be initialized only after FPGA is configured, not at module init (NOTE was static??)

bypasses command sequencer

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)?

initialize G_CIRCBUFWP, G_FREECIRCBUF

Definition at line 562 of file sensor_common.c.

References COMPCMD_RESET, COMPRESSOR_RUN_STOP, flags, fpga_counter_prev, framepars, JPEG_rp, JPEG_wp, local_irq_restore, local_irq_save, P_COMPRESSOR_RUN, port_csp0_addr, printk, set_imageParamsR_all(), updateIRQCircbuf(), and X313_WA_COMP_CMD.

Referenced by framepars_lseek(), and image_acq_init().


Variable Documentation

unsigned long* ccam_dma_buf_ptr

CIRCBUF macros.

Definition at line 240 of file circbuf.c.

Referenced by jpeghead_lseek(), updateIRQ_Exif(), updateIRQ_interframe(), x313_dma_init(), x313_dma_start(), and x313_setDMABuffer().

struct sensorproc_t* sensorproc

Definition at line 253 of file sensor_common.c.

Referenced by add_sensor_proc(), framepars_lseek(), image_acq_init(), init_pgm_proc(), processPars(), processParsASAP(), processParsSeq(), and setFrameParsAtomic().


Generated on Fri Nov 28 00:08:13 2008 for elphel by  doxygen 1.5.1