annotate Output/pjrcUSB/arm/usb_mouse.h @ 429:970dab727f47

Adding basic mouse button support - Full Mouse support will have to wait for KLL 0.6 * This will include dynamic HID descriptor generation for many wheels and axis depending on the KLL needs - HID descriptor is currently limited to 8 buttons - Technically mouse movement also works (tested by accident), but it's disable for now (needs some API thought) - Adding additional udev rules - Added KRO mode default define
author Jacob Alexander <haata@kiibohd.com>
date Mon, 21 Mar 2016 00:43:19 -0700
parents ce9720634c15
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
369
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
1 /* Teensyduino Core Library
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
2 * http://www.pjrc.com/teensy/
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
3 * Copyright (c) 2013 PJRC.COM, LLC.
429
970dab727f47 Adding basic mouse button support
Jacob Alexander <haata@kiibohd.com>
parents: 369
diff changeset
4 * Modified by Jacob Alexander (2015-2016)
369
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
5 *
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
6 * Permission is hereby granted, free of charge, to any person obtaining
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
7 * a copy of this software and associated documentation files (the
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
8 * "Software"), to deal in the Software without restriction, including
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
9 * without limitation the rights to use, copy, modify, merge, publish,
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
10 * distribute, sublicense, and/or sell copies of the Software, and to
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
11 * permit persons to whom the Software is furnished to do so, subject to
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
12 * the following conditions:
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
13 *
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
14 * 1. The above copyright notice and this permission notice shall be
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
15 * included in all copies or substantial portions of the Software.
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
16 *
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
17 * 2. If the Software is incorporated into a build system that allows
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
18 * selection among a list of target devices, then similar target
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
19 * devices manufactured by PJRC.COM must be included in the list of
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
20 * target devices and selectable in the same manner.
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
21 *
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
23 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
25 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
26 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
27 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
28 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
29 * SOFTWARE.
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
30 */
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
31
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
32 #pragma once
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
33
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
34 // ----- Includes -----
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
35
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
36 // Compiler Includes
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
37 #include <inttypes.h>
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
38
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
39 // Local Includes
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
40 #include <output_com.h>
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
41
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
42
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
43
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
44 // ----- Functions -----
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
45
429
970dab727f47 Adding basic mouse button support
Jacob Alexander <haata@kiibohd.com>
parents: 369
diff changeset
46 // Proces pending mouse commands
970dab727f47 Adding basic mouse button support
Jacob Alexander <haata@kiibohd.com>
parents: 369
diff changeset
47 void usb_mouse_send();
970dab727f47 Adding basic mouse button support
Jacob Alexander <haata@kiibohd.com>
parents: 369
diff changeset
48
369
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
49 // TODO - More generic
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
50 int usb_mouse_move( int8_t x, int8_t y, int8_t wheel );
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
51 int usb_mouse_position( uint16_t x, uint16_t y );
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
52 void usb_mouse_screen_size( uint16_t width, uint16_t height, uint8_t mac );
ce9720634c15 Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
53