home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / stepcounter-1.3.tar.gz / stepcounter-1.3.tar / stepcounter-1.3 / tilt_p3 / readme.api < prev    next >
Text File  |  1999-10-27  |  2KB  |  56 lines

  1. The tilt sensor API
  2. -------------------
  3.  
  4. Demo source accel_test.zip available at 
  5. http://www.ibr.cs.tu-bs.de/~harbaum/pilot/adxl202.html
  6.  
  7. Err TiltLibOpen(UInt refNum)
  8.   Open the tilt sensor driver library. 
  9.  
  10.   Parameters: refNum          Library reference
  11.  
  12.   Result:     0               success
  13.               TILT_WRONG_OS   the currently installed driver does
  14.                               not work on this machine
  15.               TILT_NO_SENSOR  the currently installed was unable
  16.                               access the tilt sensor hardware
  17.                      
  18.  
  19. Err TiltLibClose(UInt refNum, UIntPtr numappsP)
  20.   Close the tilt sensor driver library.
  21.  
  22.   Parameters: refNum          Library reference
  23.           numappsP        number of applications currently 
  24.                               using the driver library. Only
  25.                               remove the lib if this value
  26.                               is 0.
  27.  
  28.   Result:     0               success
  29.  
  30.  
  31. Err TiltLibZero(UInt refNum)
  32.   Calibrate the tilt sensor to return zero for current tilt.
  33.  
  34.   Parameters: refNum          Library reference
  35.  
  36.   Result:     0               success
  37.  
  38.  
  39. Err TiltLibGet(UInt refNum, Word *x, Word *y)
  40.   Return current tilt relative to zero.
  41.  
  42.   Parameters: refNum          Library reference
  43.               *x, *y          current tilt on x and y axis
  44.  
  45.   Result:     0               success
  46.  
  47.  
  48. Err TiltLibGetAbs(UInt refNum, Word *x, Word *y)
  49.   Return current absolute tilt.
  50.  
  51.   Parameters: refNum          Library reference
  52.               *x, *y          current tilt on x and y axis
  53.  
  54.   Result:     0               success
  55.  
  56.