root/platform/ixus1000_sd4500/wrappers.c

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

DEFINITIONS

This source file includes following definitions.
  1. lens_get_focus_pos
  2. lens_get_focus_pos_from_lens
  3. lens_get_target_distance
  4. DoMFLock
  5. UnlockMF

   1 #include "../generic/wrappers.c"
   2 
   3 long lens_get_focus_pos()
   4 {
   5         return _GetFocusLensSubjectDistance();
   6 }
   7 
   8 long lens_get_focus_pos_from_lens()
   9 {
  10         return _GetFocusLensSubjectDistanceFromLens(); 
  11 }
  12 
  13 long lens_get_target_distance()
  14 {
  15         return _GetCurrentTargetDistance();
  16 }
  17 
  18 /*
  19 #define RAND_MAX 0x7fffffff
  20 
  21 static unsigned int next = 1;
  22  
  23 int rand_r(unsigned int *seed)
  24 {
  25         *seed = *seed * 1103515245 + 12345;
  26         return (*seed % ((unsigned int) RAND_MAX + 1));
  27 }*/
  28 
  29 //int _rand(void)
  30 //{
  31 //      return (rand_r(&next));
  32 //}
  33 //
  34 //void* _srand(unsigned int seed)
  35 //{
  36 //      next = seed;
  37 //      return 0;                               // unused return value
  38 //}
  39 
  40 /*
  41 char *_strrchr(const char *s, int c) {
  42         // waldo - unable to find strrchr in s95 FW - we use our own fn
  43     //return _strrchr(s, c);
  44 
  45         char *result = 0;
  46 
  47         c = (char) c;
  48 
  49         do {
  50                 if (c == *s)
  51                         result = (char*) s;
  52         } while (*s++ != '\0');
  53 
  54         return result;
  55 } 
  56 */
  57  
  58  //--------------------------------------------------
  59  // DoMFLock : use _MFOn/_MFOff  or  _PT_MFOn/_PT_MFOff  or _SS_MFOn/_SS_MFOff if defined in stubs_entry.S
  60  //            otherwise use PostLogicalEventForNotPowerType(levent_id_for_name(PressSW1andMF),0); (see sx500hs for an example)
  61  
  62 int DoMFLock(void)
  63 {
  64   if (!camera_info.state.mode_play) {
  65      _PT_MFOn();
  66      return(1);
  67   }
  68   return(0);
  69 }
  70  
  71 int UnlockMF(void)
  72 {
  73   if (!camera_info.state.mode_play) {
  74      _PT_MFOff();
  75      return(1);
  76   }
  77   return(0);
  78 }

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