ndsmotion.inc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. (*
  2. $Id: ndsmotion.inc 25 2007-12-10 21:06:46Z p4p3r0 $
  3. ------------------------------------------------------------------------------
  4. Copyright (C) 2007
  5. Michael Noland (joat)
  6. Jason Rogers (dovoto)
  7. Dave Murphy (WinterMute)
  8. This software is provided 'as-is', without any express or implied
  9. warranty. In no event will the authors be held liable for any
  10. damages arising from the use of this software.
  11. Permission is granted to anyone to use this software for any
  12. purpose, including commercial applications, and to alter it and
  13. redistribute it freely, subject to the following restrictions:
  14. 1. The origin of this software must not be misrepresented; you
  15. must not claim that you wrote the original software. If you use
  16. this software in a product, an acknowledgment in the product
  17. documentation would be appreciated but is not required.
  18. 2. Altered source versions must be plainly marked as such, and
  19. must not be misrepresented as being the original software.
  20. 3. This notice may not be removed or altered from any source
  21. distribution.
  22. ------------------------------------------------------------------------------
  23. Conversion by Legolas (http://itaprogaming.free.fr) for freepascal compiler
  24. (http://www.freepascal.org)
  25. Copyright (C) 2007 Francesco Lombardi
  26. Check http://sourceforge.net/projects/libndsfpc for updates
  27. ------------------------------------------------------------------------------
  28. $Log$
  29. *)
  30. {$ifdef NDS_INTERFACE}
  31. type
  32. MotionCalibration = record
  33. xoff, yoff, zoff, goff: cshort;
  34. xsens, ysens, zsens, gsens: cshort;
  35. end;
  36. TMotionCalibration = MotionCalibration;
  37. PMotionCalibration = ^MotionCalibration;
  38. function motion_init(): cint; cdecl; external;
  39. procedure motion_deinit(); cdecl; external;
  40. function motion_read_x(): csint; cdecl; external;
  41. function motion_read_y(): csint; cdecl; external;
  42. function motion_read_z(): csint; cdecl; external;
  43. function motion_read_gyro(): csint; cdecl; external;
  44. function motion_acceleration_x(): cint; cdecl; external;
  45. function motion_acceleration_y(): cint; cdecl; external;
  46. function motion_acceleration_z(): cint; cdecl; external;
  47. procedure motion_set_sens_x(sens: cint); cdecl; external;
  48. procedure motion_set_sens_y(sens: cint); cdecl; external;
  49. procedure motion_set_sens_z(sens: cint); cdecl; external;
  50. procedure motion_set_sens_gyro(sens: cint); cdecl; external;
  51. procedure motion_set_offs_x(); cdecl; external;
  52. procedure motion_set_offs_y(); cdecl; external;
  53. procedure motion_set_offs_z(); cdecl; external;
  54. procedure motion_set_offs_gyro(); cdecl; external;
  55. function motion_rotation(): cint; cdecl; external;
  56. function motion_get_calibration(): PMotionCalibration; cdecl; external;
  57. procedure motion_set_calibration(cal: PMotionCalibration); cdecl; external;
  58. procedure motion_enable_ain_1(); cdecl; external;
  59. procedure motion_enable_ain_2(); cdecl; external;
  60. function motion_read_ain_1(): cint; cdecl; external;
  61. function motion_read_ain_2(): cint; cdecl; external;
  62. {$endif NDS_INTERFACE}