pat9125.h 895 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef PAT9125_H
  2. #define PAT9125_H
  3. //#define PAT9125_RPI
  4. #define PAT9125_AVR
  5. //PAT9125 registers
  6. #define PAT9125_PID1 0x00
  7. #define PAT9125_PID2 0x01
  8. #define PAT9125_MOTION 0x02
  9. #define PAT9125_DELTA_XL 0x03
  10. #define PAT9125_DELTA_YL 0x04
  11. #define PAT9125_MODE 0x05
  12. #define PAT9125_CONFIG 0x06
  13. #define PAT9125_WP 0x09
  14. #define PAT9125_SLEEP1 0x0a
  15. #define PAT9125_SLEEP2 0x0b
  16. #define PAT9125_RES_X 0x0d
  17. #define PAT9125_RES_Y 0x0e
  18. #define PAT9125_DELTA_XYH 0x12
  19. #define PAT9125_SHUTTER 0x14
  20. #define PAT9125_FRAME 0x17
  21. #define PAT9125_ORIENTATION 0x19
  22. extern unsigned char ucPID1;
  23. extern unsigned char ucPID2;
  24. extern int pat9125_x;
  25. extern int pat9125_y;
  26. int pat9125_init(unsigned char xres, unsigned char yres);
  27. int pat9125_update();
  28. unsigned char pat9125_rd_reg(unsigned char addr);
  29. void pat9125_wr_reg(unsigned char addr, unsigned char data);
  30. #endif //PAT9125_H