root/platform/a610/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
  7. screen_opened
  8. screen_rotated

   1 #include "../generic/main.c"
   2 
   3 long get_vbatt_min()
   4 {
   5     return 4550;
   6 }
   7 
   8 long get_vbatt_max()
   9 {
  10     return 5150;
  11 }
  12 
  13 static const int fl_tbl[] = {7300, 8460, 9565, 10835, 12565, 14926, 17342, 21709, 29200};
  14 #define NUM_FL (int)(sizeof(fl_tbl)/sizeof(fl_tbl[0]))
  15 #define CF_EFL 47946
  16 
  17 const int zoom_points = NUM_FL;
  18 
  19 int get_effective_focal_length(int zp) {
  20     return (CF_EFL*get_focal_length(zp))/10000;
  21 }
  22 
  23 int get_focal_length(int zp) {
  24     if (zp<0) return fl_tbl[0];
  25     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1];
  26     else return fl_tbl[zp];
  27 }
  28 
  29 int get_zoom_x(int zp) {
  30     if (zp<1) return 10;
  31     else if (zp>NUM_FL-1) return fl_tbl[NUM_FL-1]*10/fl_tbl[0];
  32     else return fl_tbl[zp]*10/fl_tbl[0];
  33 }
  34 
  35 #if 0
  36 int rec_switch_state(void) {
  37 //    mode  = (physw_status[2] & 0x00002000)?MODE_REC:MODE_PLAY;
  38         return (physw_status[2] & 0x00002000);
  39 }
  40 #endif
  41 
  42 int screen_opened(void) {
  43 //    mode |= (physw_status[2] & 0x00008000)?0:MODE_SCREEN_OPENED;
  44         return !(physw_status[2] & 0x00008000);
  45 }
  46 
  47 int screen_rotated(void) {
  48 //    mode |= (physw_status[2] & 0x00004000)?0:MODE_SCREEN_ROTATED;
  49         return !(physw_status[2] & 0x00004000);
  50 }
  51 

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