Mercurial > louis > kiibohd-controller
annotate Output/pjrcUSB/arm/usb_mouse.h @ 369:ce9720634c15
Forgot to add these files in an earlier commit
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Fri, 21 Aug 2015 18:26:46 -0700 |
parents | |
children | 970dab727f47 |
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. |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
4 * Modified by Jacob Alexander (2015) |
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 |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
46 // TODO - More generic |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
47 int usb_mouse_buttons( uint8_t left, uint8_t middle, uint8_t right ); |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
48 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
|
49 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
|
50 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
|
51 extern uint8_t usb_mouse_buttons_state; |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
52 |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
53 // TODO - Move |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
54 #define MOUSE_LEFT 1 |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
55 #define MOUSE_MIDDLE 4 |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
56 #define MOUSE_RIGHT 2 |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
57 #define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE) |
ce9720634c15
Forgot to add these files in an earlier commit
Jacob Alexander <haata@kiibohd.com>
parents:
diff
changeset
|
58 |