test

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);
    }
}