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
Encoder.cpp
00001 #include "Encoder.h" 00002 #include "mbed.h" 00003 00004 #include "../../System/Process/InterruptProcess.h" 00005 00006 InterruptIn BoardECD[] = { 00007 InterruptIn(ECD_A_0), 00008 InterruptIn(ECD_A_1), 00009 InterruptIn(ECD_A_2), 00010 InterruptIn(ECD_A_3), 00011 00012 InterruptIn(ECD_B_0), 00013 InterruptIn(ECD_B_1), 00014 InterruptIn(ECD_B_2), 00015 InterruptIn(ECD_B_3), 00016 }; 00017 00018 namespace ENCODER { 00019 void ECD::Initialize() { 00020 BoardECD[0].mode(PullUp); 00021 BoardECD[1].mode(PullUp); 00022 BoardECD[2].mode(PullUp); 00023 BoardECD[3].mode(PullUp); 00024 00025 BoardECD[0].fall(int2); 00026 BoardECD[1].fall(int3); 00027 BoardECD[2].fall(int4); 00028 BoardECD[3].fall(int5); 00029 } 00030 }
Generated on Thu Aug 11 2022 13:16:31 by
