aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HID.cpp
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-09-16 16:59:14 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-09-16 16:59:14 -0400
commitd004d6a9b490a51f776a89fcd284985f72f72bc6 (patch)
treea036bd8f9a98d9f72b13138c47f93439c1f233fa /cores/arduino/HID.cpp
parent3287477db1c2903e173034af9039c4273dccf58d (diff)
added Mouse.isPressed() method
Diffstat (limited to 'cores/arduino/HID.cpp')
-rw-r--r--cores/arduino/HID.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cores/arduino/HID.cpp b/cores/arduino/HID.cpp
index 16d0448..8ed1566 100644
--- a/cores/arduino/HID.cpp
+++ b/cores/arduino/HID.cpp
@@ -243,6 +243,13 @@ void Mouse_::release(uint8_t b)
buttons(_buttons & ~b);
}
+bool Mouse_::isPressed(uint8_t b)
+{
+ if (b & _buttons > 0)
+ return true;
+ return false;
+}
+
//================================================================================
//================================================================================
// Keyboard