@ -17,6 +17,7 @@
*/
# include "pointing_device.h"
# include "pointing_device_internal.h"
# include "debug.h"
# include "wait.h"
# include "timer.h"
@ -32,10 +33,7 @@ report_mouse_t adns5050_get_report(report_mouse_t mouse_report) {
report_adns5050_t data = adns5050_read_burst ( ) ;
if ( data . dx ! = 0 | | data . dy ! = 0 ) {
# ifdef CONSOLE_ENABLE
if ( debug_mouse ) dprintf ( " Raw ] X: %d, Y: %d \n " , data . dx , data . dy ) ;
# endif
pd_dprintf ( " Raw ] X: %d, Y: %d \n " , data . dx , data . dy ) ;
mouse_report . x = ( mouse_xy_report_t ) data . dx ;
mouse_report . y = ( mouse_xy_report_t ) data . dy ;
}
@ -76,9 +74,7 @@ const pointing_device_driver_t pointing_device_driver = {
report_mouse_t analog_joystick_get_report ( report_mouse_t mouse_report ) {
report_analog_joystick_t data = analog_joystick_read ( ) ;
# ifdef CONSOLE_ENABLE
if ( debug_mouse ) dprintf ( " Raw ] X: %d, Y: %d \n " , data . x , data . y ) ;
# endif
pd_dprintf ( " Raw ] X: %d, Y: %d \n " , data . x , data . y ) ;
mouse_report . x = data . x ;
mouse_report . y = data . y ;
@ -140,11 +136,9 @@ report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) {
return mouse_report ;
}
# if CONSOLE_ENABLE
if ( debug_mouse & & touchData . touchDown ) {
dprintf ( " cirque_pinnacle touchData x=%4d y=%4d z=%2d \n " , touchData . xValue , touchData . yValue , touchData . zValue ) ;
if ( touchData . touchDown ) {
pd_dprintf ( " cirque_pinnacle touchData x=%4d y=%4d z=%2d \n " , touchData . xValue , touchData . yValue , touchData . zValue ) ;
}
# endif
// Scale coordinates to arbitrary X, Y resolution
cirque_pinnacle_scale_data ( & touchData , cirque_pinnacle_get_scale ( ) , cirque_pinnacle_get_scale ( ) ) ;
@ -227,9 +221,7 @@ const pointing_device_driver_t pointing_device_driver = {
report_mouse_t paw3204_get_report ( report_mouse_t mouse_report ) {
report_paw3204_t data = paw3204_read ( ) ;
if ( data . isMotion ) {
# ifdef CONSOLE_ENABLE
dprintf ( " Raw ] X: %d, Y: %d \n " , data . x , data . y ) ;
# endif
pd_dprintf ( " Raw ] X: %d, Y: %d \n " , data . x , data . y ) ;
mouse_report . x = data . x ;
mouse_report . y = data . y ;
@ -329,7 +321,7 @@ report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report) {
if ( ! in_motion ) {
in_motion = true ;
dprintf ( " PWM3360 (0): starting motion \n " ) ;
pd_ dprintf( " PWM3360 (0): starting motion \n " ) ;
}
mouse_report . x = CONSTRAIN_HID_XY ( report . delta_x ) ;