daad
Dependencies: mbed TrapezoidControl QEI
Input/Rotaryencoder/Rotaryencoder.cpp@5:3ae504b88679, 2018-10-01 (annotated)
- Committer:
- kishibekairohan
- Date:
- Mon Oct 01 09:07:27 2018 +0000
- Revision:
- 5:3ae504b88679
- Parent:
- 1:b1219d8ca117
maruyama
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
7ka884 | 1:b1219d8ca117 | 1 | #include "Rotaryencoder.h" |
7ka884 | 1:b1219d8ca117 | 2 | #include "mbed.h" |
7ka884 | 1:b1219d8ca117 | 3 | |
7ka884 | 1:b1219d8ca117 | 4 | #include "../../System/Process/InterruptProcess.h" |
7ka884 | 1:b1219d8ca117 | 5 | |
7ka884 | 1:b1219d8ca117 | 6 | InterruptIn BoardRtInt[] = { |
7ka884 | 1:b1219d8ca117 | 7 | InterruptIn(RT11_PIN), |
7ka884 | 1:b1219d8ca117 | 8 | InterruptIn(RT12_PIN), |
7ka884 | 1:b1219d8ca117 | 9 | |
7ka884 | 1:b1219d8ca117 | 10 | InterruptIn(RT21_PIN), |
7ka884 | 1:b1219d8ca117 | 11 | InterruptIn(RT22_PIN), |
7ka884 | 1:b1219d8ca117 | 12 | }; |
7ka884 | 1:b1219d8ca117 | 13 | |
kishibekairohan | 5:3ae504b88679 | 14 | |
7ka884 | 1:b1219d8ca117 | 15 | namespace ROTARYENCODER { |
7ka884 | 1:b1219d8ca117 | 16 | void Int::Initialize() { |
7ka884 | 1:b1219d8ca117 | 17 | BoardRtInt[0].mode(PullUp); |
7ka884 | 1:b1219d8ca117 | 18 | BoardRtInt[1].mode(PullUp); |
7ka884 | 1:b1219d8ca117 | 19 | BoardRtInt[2].mode(PullUp); |
7ka884 | 1:b1219d8ca117 | 20 | BoardRtInt[3].mode(PullUp); |
7ka884 | 1:b1219d8ca117 | 21 | |
kishibekairohan | 5:3ae504b88679 | 22 | BoardRtInt[0].fall(int2); |
kishibekairohan | 5:3ae504b88679 | 23 | BoardRtInt[1].fall(int3); |
kishibekairohan | 5:3ae504b88679 | 24 | BoardRtInt[2].fall(int4); |
kishibekairohan | 5:3ae504b88679 | 25 | BoardRtInt[3].fall(int5); |
7ka884 | 1:b1219d8ca117 | 26 | } |
7ka884 | 1:b1219d8ca117 | 27 | } |