Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pmw3360_registers.h 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * pmw3360_registers.h
  3. */
  4. #ifndef __PMW3360_REGISTERS_H__
  5. #define __PMW3360_REGISTERS_H__
  6. #define REG_PRODUCT_ID 0x00
  7. #define REG_REVISION_ID 0x01
  8. #define REG_MOTION 0x02
  9. #define REG_DELTA_X_L 0x03
  10. #define REG_DELTA_X_H 0x04
  11. #define REG_DELTA_Y_L 0x05
  12. #define REG_DELTA_Y_H 0x06
  13. #define REG_SQUAL 0x07
  14. #define REG_RAW_DATA_SUM 0x08
  15. #define REG_MAXIMUM_RAW_DATA 0x09
  16. #define REG_MINIMUM_RAW_DATA 0x0A
  17. #define REG_SHUTTER_LOWER 0x0B
  18. #define REG_SHUTTER_UPPER 0x0C
  19. #define REG_CONTROL 0x0D
  20. #define REG_CONFIG1 0x0F
  21. #define REG_CONFIG2 0x10
  22. #define REG_ANGLE_TUNE 0x11
  23. #define REG_FRAME_CAPTURE 0x12
  24. #define REG_SROM_ENABLE 0x13
  25. #define REG_RUN_DOWNSHIFT 0x14
  26. #define REG_REST1_RATE_LOWER 0x15
  27. #define REG_REST1_RATE_UPPER 0x16
  28. #define REG_REST1_DOWNSHIFT 0x17
  29. #define REG_REST2_RATE_LOWER 0x18
  30. #define REG_REST2_RATE_UPPER 0x19
  31. #define REG_REST2_DOWNSHIFT 0x1A
  32. #define REG_REST3_RATE_LOWER 0x1B
  33. #define REG_REST3_RATE_UPPER 0x1C
  34. #define REG_OBSERVATION 0x24
  35. #define REG_DATA_OUT_LOWER 0x25
  36. #define REG_DATA_OUT_UPPER 0x26
  37. #define REG_RAW_DATA_DUMP 0x29
  38. #define REG_SROM_ID 0x2A
  39. #define REG_MIN_SQ_RUN 0x2B
  40. #define REG_RAW_DATA_THRESHOLD 0x2C
  41. #define REG_CONFIG5 0x2F
  42. #define REG_POWER_UP_RESET 0x3A
  43. #define REG_SHUTDOWN 0x3B
  44. #define REG_INVERSE_PRODUCT_ID 0x3F
  45. #define REG_LIFTCUTOFF_TUNE3 0x41
  46. #define REG_ANGLE_SNAP 0x42
  47. #define REG_LIFTCUTOFF_TUNE1 0x4A
  48. #define REG_MOTION_BURST 0x50
  49. #define REG_LIFTCUTOFF_TUNE_TIMEOUT 0x58
  50. #define REG_LIFTCUTOFF_TUNE_MIN_LENGTH 0x5A
  51. #define REG_SROM_LOAD_BURST 0x62
  52. #define REG_LIFT_CONFIG 0x63
  53. #define REG_RAW_DATA_BURST 0x64
  54. #define REG_LIFTCUTOFF_TUNE2 0x65
  55. #define WRITE_BIT 0x80
  56. #define REG_MOTION_MOT 7
  57. #define REG_MOTION_LIFT 3
  58. #define REG_MOTION_OP_1 1
  59. #define REG_MOTION_OP_2 2
  60. struct pmw_motion_report {
  61. uint8_t motion;
  62. uint8_t observation;
  63. uint8_t delta_x_l;
  64. uint8_t delta_x_h;
  65. uint8_t delta_y_l;
  66. uint8_t delta_y_h;
  67. uint8_t squal;
  68. uint8_t raw_data_sum;
  69. uint8_t maximum_raw_data;
  70. uint8_t minimum_raw_data;
  71. uint8_t shutter_upper;
  72. uint8_t shutter_lower;
  73. } __attribute__((packed));
  74. #endif // __PMW3360_REGISTERS_H__