にいむら にいむら
/
mainboardnrp2018
unkounko
Input/Switch/Switch.h@0:562021ed1ba9, 2018-01-13 (annotated)
- Committer:
- t_yamamoto
- Date:
- Sat Jan 13 13:33:09 2018 +0000
- Revision:
- 0:562021ed1ba9
- Child:
- 1:e73cf2469f83
NaganoNCT-MainBoardNRP2018
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
t_yamamoto | 0:562021ed1ba9 | 1 | #ifndef SWITCH_H_ |
t_yamamoto | 0:562021ed1ba9 | 2 | #define SWITCH_H_ |
t_yamamoto | 0:562021ed1ba9 | 3 | |
t_yamamoto | 0:562021ed1ba9 | 4 | #include "mbed.h" |
t_yamamoto | 0:562021ed1ba9 | 5 | |
t_yamamoto | 0:562021ed1ba9 | 6 | extern DigitalIn limitSw[]; |
t_yamamoto | 0:562021ed1ba9 | 7 | |
t_yamamoto | 0:562021ed1ba9 | 8 | namespace SWITCH |
t_yamamoto | 0:562021ed1ba9 | 9 | { |
t_yamamoto | 0:562021ed1ba9 | 10 | #define LIMITSW0_PIN NC |
t_yamamoto | 0:562021ed1ba9 | 11 | #define LIMITSW1_PIN A7 |
t_yamamoto | 0:562021ed1ba9 | 12 | #define LIMITSW2_PIN A6 |
t_yamamoto | 0:562021ed1ba9 | 13 | #define LIMITSW3_PIN A5 |
t_yamamoto | 0:562021ed1ba9 | 14 | #define LIMITSW4_PIN A4 |
t_yamamoto | 0:562021ed1ba9 | 15 | |
t_yamamoto | 0:562021ed1ba9 | 16 | #define MOUNTING_LIMITSW_NUM (4 + 1) //limitSw[0]の関係で+1 |
t_yamamoto | 0:562021ed1ba9 | 17 | |
t_yamamoto | 0:562021ed1ba9 | 18 | class Switch |
t_yamamoto | 0:562021ed1ba9 | 19 | { |
t_yamamoto | 0:562021ed1ba9 | 20 | public: |
t_yamamoto | 0:562021ed1ba9 | 21 | static void Initialize(void); |
t_yamamoto | 0:562021ed1ba9 | 22 | static bool checkPushed(int mySwitch); |
t_yamamoto | 0:562021ed1ba9 | 23 | }; |
t_yamamoto | 0:562021ed1ba9 | 24 | } |
t_yamamoto | 0:562021ed1ba9 | 25 | |
t_yamamoto | 0:562021ed1ba9 | 26 | #endif |
t_yamamoto | 0:562021ed1ba9 | 27 |