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.
Dependencies: mbed TrapezoidControl QEI
Input/Rotaryencoder/Rotaryencoder.cpp
- Committer:
- 7ka884
- Date:
- 2018-10-01
- Revision:
- 4:ba9df71868df
- Parent:
- 1:b1219d8ca117
File content as of revision 4:ba9df71868df:
#include "Rotaryencoder.h"
#include "mbed.h"
#include "../../System/Process/InterruptProcess.h"
InterruptIn BoardRt[] = {
InterruptIn(RT11_PIN),
InterruptIn(RT12_PIN),
InterruptIn(RT21_PIN),
InterruptIn(RT22_PIN),
};
namespace ROTARYENCODER {
void Rot::Initialize() {
BoardRt[0].mode(PullUp);
BoardRt[1].mode(PullUp);
BoardRt[2].mode(PullUp);
BoardRt[3].mode(PullUp);
BoardRt[0].fall(int2);
BoardRt[1].fall(int3);
BoardRt[2].fall(int4);
BoardRt[3].fall(int5);
}
}