Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: mRotaryEncoder.cpp
- Revision:
- 7:ec80fd9c0c08
- Parent:
- 5:75ddffaf3721
- Child:
- 10:2502b829d452
diff -r 854c349157b0 -r ec80fd9c0c08 mRotaryEncoder.cpp
--- a/mRotaryEncoder.cpp Wed Mar 11 21:08:31 2015 +0000
+++ b/mRotaryEncoder.cpp Wed Mar 11 21:45:46 2015 +0000
@@ -52,8 +52,10 @@
if (*m_pinA == 0) {
if (*m_pinB == 1) {
m_position++;
+ rotCWIsr.call();
} else {
m_position--;
+ rotCCWIsr.call();
}
}
rotIsr.call(); // call the isr for rotation
@@ -65,8 +67,10 @@
if (*m_pinA == 1) {
if (*m_pinB == 1) {
m_position--;
+ rotCCWIsr.call();
} else {
m_position++;
+ rotCWIsr.call();
}
}
rotIsr.call(); // call the isr for rotation