test

Dependencies:   mbed TrapezoidControl QEI

Input/Rotaryencoder/Rotaryencoder.cpp

Committer:
kishibekairohan
Date:
2018-10-01
Revision:
5:3ae504b88679
Parent:
1:b1219d8ca117

File content as of revision 5:3ae504b88679:

#include "Rotaryencoder.h"
#include "mbed.h"

#include "../../System/Process/InterruptProcess.h"

InterruptIn BoardRtInt[] = {
    InterruptIn(RT11_PIN),
    InterruptIn(RT12_PIN),
    
    InterruptIn(RT21_PIN),
    InterruptIn(RT22_PIN),
};


namespace ROTARYENCODER {
    void Int::Initialize() {
        BoardRtInt[0].mode(PullUp);
        BoardRtInt[1].mode(PullUp);
        BoardRtInt[2].mode(PullUp);
        BoardRtInt[3].mode(PullUp);

        BoardRtInt[0].fall(int2);
        BoardRtInt[1].fall(int3);
        BoardRtInt[2].fall(int4);
        BoardRtInt[3].fall(int5);
    }
}