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.
Input/Encoder/Encoder.cpp
- Committer:
- kishibekairohan
- Date:
- 2019-07-01
- Revision:
- 16:3f2c2d89372b
- Parent:
- Input/Rotaryencoder/Rotaryencoder.cpp@ 4:ba9df71868df
File content as of revision 16:3f2c2d89372b:
#include "Encoder.h" #include "mbed.h" #include "../../System/Process/InterruptProcess.h" InterruptIn BoardECD[] = { InterruptIn(ECD_A_0), InterruptIn(ECD_A_1), InterruptIn(ECD_A_2), InterruptIn(ECD_A_3), InterruptIn(ECD_B_0), InterruptIn(ECD_B_1), InterruptIn(ECD_B_2), InterruptIn(ECD_B_3), }; namespace ENCODER { void ECD::Initialize() { BoardECD[0].mode(PullUp); BoardECD[1].mode(PullUp); BoardECD[2].mode(PullUp); BoardECD[3].mode(PullUp); BoardECD[0].fall(int2); BoardECD[1].fall(int3); BoardECD[2].fall(int4); BoardECD[3].fall(int5); } }