123456789101112131415161718192021222324252627282930313233343536373839404142 |
-
-
- #ifndef __PMW3360_H__
- #define __PMW3360_H__
-
- #include <sys/types.h>
-
- struct pmw_motion {
- bool motion;
- int32_t delta_x;
- int32_t delta_y;
- };
-
- int pmw_init(void);
- void pmw_run(void);
- bool pmw_is_alive(void);
-
- struct pmw_motion pmw_get(void);
-
-
- void pmw_set_sensitivity(uint8_t sens);
- uint8_t pmw_get_sensitivity(void);
- #define PMW_SENSE_TO_CPI(sense) (100 + (sense * 100))
- #define PMW_CPI_TO_SENSE(cpi) ((cpi / 100) - 1)
-
- void pmw_print_status(char *buff, size_t len);
- void pmw_dump_data(bool serial);
-
- ssize_t pmw_frame_capture(uint8_t *buff, size_t buffsize);
- #define PMW_FRAME_CAPTURE_LEN 1296
-
- #endif
|