twa2835.h

Go to the documentation of this file.
00001 /*
00002   Copyright 2007 Eurotech S.P.A. (Luca Calligaris)
00003   Copyright 2007 Christian Pellegrin <chripell@gmail.com> EVOL S.R.L.
00004 
00005   This software is released under the GPL v2. Please see the file
00006   COPYING in the top-level directory.
00007 */
00008 
00009 #ifndef _TWA2835_H_
00010 #define _TWA2835_H_ 1
00011 
00013 struct twa2835_status {
00023   int det_format;
00024   int det_color;                
00025   int lock_color;               
00026   int lock_gain;                
00027   int lock_ofst;                
00028   int lock_hpll;                
00029   int det_nonstd;               
00030   int det_fld60;                
00031   int id;                       
00032   int ver;                      
00033 };
00034 
00036 struct twa2835_motion_substatus {
00037   char night[4];                
00038   char blind[4];                
00039   char motion[4];               
00040   char loss[4];                 
00041 };
00042 
00044 struct twa2835_motion_status {
00045   struct twa2835_motion_substatus vina; 
00046   struct twa2835_motion_substatus vinb; 
00047 };
00048 
00050 struct twa2835_pixel {
00051   int index:6;                  
00052   int mix:1;                    
00053   int blink:1;                  
00054   int off:1;                    
00055 };
00056 
00057 /* these are platform specific */
00058 
00067 int twa2835_read_reg(void *twa, int addr);
00068 
00077 void twa2835_write_reg(void *twa, int addr, int data);
00078 
00085 int twa2835_batch(void *twa, int *batch);
00086 
00091 void twa2835_reset(void *twa);
00092 
00097 unsigned long twa2835_get_sec(void);
00098 
00119 int twa2835_wait_motion(void *twa, int sec, int *nv, int *md, int *bd, int *nd);
00120 
00121 /* these are generic */
00122 
00132 int twa2835_init(void *twa, int isNtsc);
00133 
00140 int twa2835_release(void *twa);
00141 
00160 int twa2835_output_mode(void *twa, int tv_x_rec, int tv_x_ovl, int tv_y_rec, int tv_y_ovl, int enc_rec, int enc_ovl);
00161 
00176 int twa2835_set_palette(void *twa, int ind, int R, int G, int B);
00177 
00186 int twa2835_mon_full(void *twa, int ch);
00187 
00194 int twa2835_mon_quad(void *twa);
00195 
00204 int twa2835_mon_freeze_ch(void *twa, int ch);
00205 
00214 int twa2835_mon_continue_ch(void *twa, int ch);
00215 
00224 int twa2835_mon_strobe_ch(void *twa, int ch);
00225 
00234 int twa2835_mon_switch_mode_ch(void *twa, int ch);
00235 
00244 int twa2835_mon_switch_trigger(void *twa, int ch);
00245 
00252 int twa2835_mon_freeze(void *twa);
00253 
00260 int twa2835_mon_continue(void *twa);
00261 
00272 int twa2835_mon_pb_enable(void *twa, int ch, int ena);
00273 
00288 int twa2835_mon_show_motion_box(void *twa, int box, int enable, int ab, int ch);
00289 
00308 int twa2835_mon_write_bitmap(void *twa, int x, int y, int w, int h, int pn, struct twa2835_pixel *p);
00309 
00320 int twa2835_mon_bitmap_enable(void *twa, int ena, int pn);
00321 
00336 int twa2835_mon_pb_id(void *twa, int auto_vb_detect_ena, int vbi_ena, int vbi_code_ena,
00337                       int vbi_ric_ena);
00338 
00349 int twa2835_mon_pb_crop(void *twa, int ch, int ena);
00350 
00367 int twa2835_mon_ch_attr(void *twa, int ch, int blank, int hmirror,
00368                         int vmirror, int blink);
00369 
00378 int twa2835_mon_blink_on_loss(void *twa, int ena);
00379 
00392 int twa2835_mon_zoom(void *twa, int ena, int x, int y);
00393 
00406 int twa2835_mon_filter(void *twa, int mode, int slope, int thr);
00407 
00424 int twa2835_mon_cursor(void *twa, int large, int filled, int blink, int x, int y);
00425 
00434 int twa2835_rec_full(void *twa, int ch);
00435 
00442 int twa2835_rec_quad(void *twa);
00443 
00460 int twa2835_rec_write_bitmap(void *twa, int x, int y, int w, int h, struct twa2835_pixel *p);
00461 
00470 int twa2835_rec_bitmap_enable(void *twa, int ena);
00471 
00492 int twa2835_rec_id_enable(void *twa,
00493                           int vis_ena, int vis_auto_ena, int vis_auto_rpt_ena, int vis_det_ena,
00494                           int vis_user_ena, int vis_code_ena, int vis_ric_ena);
00495 
00512 int twa2835_rec_ch_attr(void *twa, int ch, int blank, int hmirror,
00513                         int vmirror, int blink);
00514 
00525 int twa2835_rec_mode(void *twa, int frame, int dvr);
00526 
00535 int twa2835_rec_freeze_ch(void *twa, int ch);
00536 
00545 int twa2835_rec_continue_ch(void *twa, int ch);
00546 
00555 int twa2835_rec_strobe_ch(void *twa, int ch);
00556 
00572 int twa2835_rec_switch_mode(void *twa, int ch, int period, int ch_len, int *ch_list);
00573 
00582 int twa2835_rec_switch_trigger(void *twa, int ch);
00583 
00590 int twa2835_rec_freeze(void *twa);
00591 
00598 int twa2835_rec_continue(void *twa);
00599 
00610 int twa2835_brightness(void *twa, int ch, int v);
00611 
00622 int twa2835_contrast(void *twa, int ch, int v);
00623 
00634 int twa2835_hue(void *twa, int ch, int v);
00635 
00646 int twa2835_saturation(void *twa, int ch, int v);
00647 
00658 int twa2835_get_status(void *twa, int ch, struct twa2835_status *s);
00659 
00670 int twa2835_ch_ab(void *twa, int ch, int ab);
00671 
00680 int twa2835_get_motion_status(void *twa, struct twa2835_motion_status *s);
00681 
00703 int twa2835_enairq(void *twa, int nv, int md, int bd, int nd);
00704 
00727 int twa2835_get_irq_status(void *twa, int *nv, int *md, int *bd, int *nd);
00728 
00770 int twa2835_set_motion_par(void *twa, int ch, int disable, int md_reffld,
00771                            int bd_celsens, int bd_lvsens, int nd_lvsens,
00772                            int nd_tmpsens, int md_fld, int md_align,
00773                            int md_celsens, int md_dual_ena, int md_lvsens,
00774                            int md_speed, int md_tmpsens, int md_spsens,
00775                            int *md_mask);
00776 
00789 int twa2835_audio_passtru(void *twa, int *in_gain, int *mute, int out_gain);
00790 
00791 #endif

Generated on Sat Dec 20 08:27:54 2008 for CTR1474 by  doxygen 1.5.1