Mercurial > louis > kiibohd-controller
comparison 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 |
comparison
equal
deleted
inserted
replaced
428:b5746c43904e | 429:970dab727f47 |
---|---|
1 /* Teensyduino Core Library | 1 /* Teensyduino Core Library |
2 * http://www.pjrc.com/teensy/ | 2 * http://www.pjrc.com/teensy/ |
3 * Copyright (c) 2013 PJRC.COM, LLC. | 3 * Copyright (c) 2013 PJRC.COM, LLC. |
4 * Modified by Jacob Alexander (2015) | 4 * Modified by Jacob Alexander (2015-2016) |
5 * | 5 * |
6 * Permission is hereby granted, free of charge, to any person obtaining | 6 * Permission is hereby granted, free of charge, to any person obtaining |
7 * a copy of this software and associated documentation files (the | 7 * a copy of this software and associated documentation files (the |
8 * "Software"), to deal in the Software without restriction, including | 8 * "Software"), to deal in the Software without restriction, including |
9 * without limitation the rights to use, copy, modify, merge, publish, | 9 * without limitation the rights to use, copy, modify, merge, publish, |
41 | 41 |
42 | 42 |
43 | 43 |
44 // ----- Functions ----- | 44 // ----- Functions ----- |
45 | 45 |
46 // Proces pending mouse commands | |
47 void usb_mouse_send(); | |
48 | |
46 // TODO - More generic | 49 // TODO - More generic |
47 int usb_mouse_buttons( uint8_t left, uint8_t middle, uint8_t right ); | |
48 int usb_mouse_move( int8_t x, int8_t y, int8_t wheel ); | 50 int usb_mouse_move( int8_t x, int8_t y, int8_t wheel ); |
49 int usb_mouse_position( uint16_t x, uint16_t y ); | 51 int usb_mouse_position( uint16_t x, uint16_t y ); |
50 void usb_mouse_screen_size( uint16_t width, uint16_t height, uint8_t mac ); | 52 void usb_mouse_screen_size( uint16_t width, uint16_t height, uint8_t mac ); |
51 extern uint8_t usb_mouse_buttons_state; | |
52 | 53 |
53 // TODO - Move | |
54 #define MOUSE_LEFT 1 | |
55 #define MOUSE_MIDDLE 4 | |
56 #define MOUSE_RIGHT 2 | |
57 #define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE) | |
58 |