Пример #1
0
/* Routine to update mouse state report */
static void Mouse_UpdateReport(void)
{
	uint8_t joystick_status = Joystick_GetStatus();
	CLEAR_HID_MOUSE_REPORT(&g_mouse.report[0]);

	switch (joystick_status) {
	case JOY_PRESS:
		setLeftButtonMouseReport(g_mouse.report, 1);
		break;

	case JOY_LEFT:
		setXYMouseReport(g_mouse.report, -4, 0);
		break;

	case JOY_RIGHT:
		setXYMouseReport(g_mouse.report, 4, 0);
		break;

	case JOY_UP:
		setXYMouseReport(g_mouse.report, 0, -4);
		break;

	case JOY_DOWN:
		setXYMouseReport(g_mouse.report, 0, 4);
		break;
	}
}
Пример #2
0
static void Mouse_UpdateReport(int leftCount, int rightCount)
{
   
   int delta =   leftCount - rightCount;
   
   
	CLEAR_HID_MOUSE_REPORT(&g_mouse.report[0]);


   setXYMouseReport(g_mouse.report, delta, 0);
      
	//		setRightButtonMouseReport(g_mouse.report, 1);

}