diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-08-30 20:23:06 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-08-30 20:23:06 -0400 |
commit | 90ea0707e6e3fb251b3eaf6c8682f68dd44299e1 (patch) | |
tree | 8c81d138a8ca81532d3d3f054eee03c4269c27b5 /cores/arduino/HID.cpp | |
parent | df068274f4a383ce6c944168ce41f859f3bc22c9 (diff) |
added Mouse press() and release()
Diffstat (limited to 'cores/arduino/HID.cpp')
-rw-r--r-- | cores/arduino/HID.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cores/arduino/HID.cpp b/cores/arduino/HID.cpp index e3aadb5..16d0448 100644 --- a/cores/arduino/HID.cpp +++ b/cores/arduino/HID.cpp @@ -233,6 +233,16 @@ void Mouse_::buttons(uint8_t b) } } +void Mouse_::press(uint8_t b) +{ + buttons(_buttons | b); +} + +void Mouse_::release(uint8_t b) +{ + buttons(_buttons & ~b); +} + //================================================================================ //================================================================================ // Keyboard |