Hi!
我have to modify the mouse HID profile for use it with an external MCU: for the communication I use the UART.
我was able to initiate the UART and use the CTS interrupt for call the left and right button callback functions, eliminating debouncing code.
The problem is the cursor movement: how can I report the deltaX and Y, bypassing the the sensor reading procedure or simulate the sensor reading?
我'm trying to use a flag for the if conditions instead use "if (GPIO_GetPinStatus( MOUSE_MOTION_INT_PORT, MOUSE_MOTION_INT_PIN) == 0)" conditions and replace the "mouse_sensor_read_motion_burst()" function with a manual setting of the "temp_burst_data" and "dummy_burst_data" structures but it doesn't work: I don't know if the problem is that I didn't set the "temp_burst_data" and "dummy_burst_data" structures in the right way but I can't find the mouse optical sensor datasheet.
Wed, 2015-11-25 17:54
#1
藏老鼠
Device:
Hi drumste,
You can try to remove the assignment of the count_x/y variable and replace it with a '1' in function app_mouse_send_motion_report() in order to see the cursor moving ( normal_key_report_st[0] = 0x01; ), you just have to make sure that the code enters the part where you populate your structure with data. You can comment the lines where the GPIO interrupt is checked and continiously sent cursor movement.
Thanks MT_dialog