説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

pmw3360.h 538B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * pmw3360.h
  3. */
  4. #ifndef __PMW3360_H__
  5. #define __PMW3360_H__
  6. struct pmw_motion {
  7. bool motion;
  8. int32_t delta_x;
  9. int32_t delta_y;
  10. };
  11. int pmw_init(void);
  12. struct pmw_motion pmw_get(void);
  13. /*
  14. * 0x00: 100 cpi (minimum cpi)
  15. * 0x01: 200 cpi
  16. * 0x02: 300 cpi
  17. * ...
  18. * 0x31: 5000 cpi (default cpi)
  19. * ...
  20. * 0x77: 12000 cpi (maximum cpi)
  21. */
  22. void pmw_set_sensitivity(uint8_t sens);
  23. uint8_t pmw_get_sensitivity(void);
  24. #define PMW_SENSE_TO_CPI(sense) (100 + (sense * 100))
  25. void pmw_print_status(void);
  26. #endif // __PMW3360_H__