aaaaaaaaa

Dependencies:   QEI mbed

Fork of MainBoard2018_Auto_Master_A_new by Akihiro Nakabayashi

Input/Rotaryencoder/Rotaryencoder.cpp

Committer:
kishibekairohan
Date:
2018-10-21
Revision:
14:dfcec98f5aa9
Parent:
4:ba9df71868df

File content as of revision 14:dfcec98f5aa9:

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