aa
Dependencies: mbed TrapezoidControl QEI
Input/ExternalInt/ExternalInt.cpp@1:b1219d8ca117, 2018-09-10 (annotated)
- Committer:
- 7ka884
- Date:
- Mon Sep 10 01:39:15 2018 +0000
- Revision:
- 1:b1219d8ca117
- Parent:
- 0:669ef71cba68
- Child:
- 16:3f2c2d89372b
A
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
t_yamamoto | 0:669ef71cba68 | 1 | #include "ExternalInt.h" |
t_yamamoto | 0:669ef71cba68 | 2 | #include "mbed.h" |
t_yamamoto | 0:669ef71cba68 | 3 | |
t_yamamoto | 0:669ef71cba68 | 4 | #include "../../System/Process/InterruptProcess.h" |
t_yamamoto | 0:669ef71cba68 | 5 | |
t_yamamoto | 0:669ef71cba68 | 6 | InterruptIn BoardInt[] = { |
t_yamamoto | 0:669ef71cba68 | 7 | InterruptIn(INT0_PIN), |
t_yamamoto | 0:669ef71cba68 | 8 | InterruptIn(INT1_PIN), |
t_yamamoto | 0:669ef71cba68 | 9 | }; |
t_yamamoto | 0:669ef71cba68 | 10 | |
t_yamamoto | 0:669ef71cba68 | 11 | namespace EXTERNALINT { |
t_yamamoto | 0:669ef71cba68 | 12 | void Int::Initialize() { |
t_yamamoto | 0:669ef71cba68 | 13 | BoardInt[0].mode(PullUp); |
t_yamamoto | 0:669ef71cba68 | 14 | BoardInt[1].mode(PullUp); |
t_yamamoto | 0:669ef71cba68 | 15 | |
t_yamamoto | 0:669ef71cba68 | 16 | BoardInt[0].fall(int0); |
t_yamamoto | 0:669ef71cba68 | 17 | BoardInt[1].fall(int1); |
t_yamamoto | 0:669ef71cba68 | 18 | } |
t_yamamoto | 0:669ef71cba68 | 19 | } |