root/platform/ixus75_sd750/main.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. get_vbatt_min
  2. get_vbatt_max
  3. get_effective_focal_length
  4. get_focal_length
  5. get_zoom_x
  6. rec_switch_state

   1 #define HOOK_TOUCHW
   2 extern void my_touchw_task(void);
   3 #include "../generic/main.c"
   4 
   5 long get_vbatt_min()
   6 {
   7     return 3500;
   8 }
   9 
  10 long get_vbatt_max()
  11 {
  12     return 4100;
  13 }
  14 
  15 static const int fl_tbl[] = {5800, 7109, 8462, 10093, 12120, 14421, 17400}; // exif for each zoom step
  16 #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))
  17 #define CF_EFL 60345 // for 1/2,5" sensor (60345) for 1/1,8" sensor (47946)
  18 
  19 const int zoom_points = NUM_FL;
  20 
  21 int get_effective_focal_length(int zp) {
  22     return (CF_EFL*get_focal_length(zp))/10000;
  23 }
  24 
  25 int get_focal_length(int zp) {
  26     if (zp<0) return fl_tbl[0];
  27     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1];
  28     else return fl_tbl[zp];
  29 }
  30 
  31 int get_zoom_x(int zp) {
  32     if (zp<1) return 10;
  33     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
  34     else return fl_tbl[zp]*10/fl_tbl[0];
  35 }
  36 
  37 #if 0
  38 int rec_switch_state(void) {
  39 //    mode  = (physw_status[2] & 0x4000)?MODE_REC:MODE_PLAY;    
  40         return (physw_status[2] & 0x4000);    
  41 }
  42 #endif

/* [<][>][^][v][top][bottom][index][help] */