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.
Revision 1:33cb3eaa8595, committed 2021-03-27
- Comitter:
- fgagey
- Date:
- Sat Mar 27 00:00:32 2021 +0000
- Parent:
- 0:5c2ad81551aa
- Commit message:
- NF
Changed in this revision
| QEI.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/QEI.cpp Thu Sep 02 16:48:55 2010 +0000
+++ b/QEI.cpp Sat Mar 27 00:00:32 2021 +0000
@@ -127,6 +127,7 @@
* Includes
*/
#include "QEI.h"
+#include "mbed.h"
QEI::QEI(PinName channelA,
PinName channelB,
@@ -151,17 +152,17 @@
//X2 encoding uses interrupts on only channel A.
//X4 encoding uses interrupts on channel A,
//and on channel B.
- channelA_.rise(this, &QEI::encode);
- channelA_.fall(this, &QEI::encode);
+ channelA_.rise(callback(this, &QEI::encode));
+ channelA_.fall(callback(this, &QEI::encode));
//If we're using X4 encoding, then attach interrupts to channel B too.
if (encoding == X4_ENCODING) {
- channelB_.rise(this, &QEI::encode);
- channelB_.fall(this, &QEI::encode);
+ channelB_.rise(callback(this, &QEI::encode));
+ channelB_.fall(callback(this, &QEI::encode));
}
//Index is optional.
if (index != NC) {
- index_.rise(this, &QEI::index);
+ index_.rise(callback(this, &QEI::index));
}
}