Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Input/Switch/Switch.cpp@9:49e851ad441e, 2019-02-23 (annotated)
- Committer:
- takayama_ryo
- Date:
- Sat Feb 23 02:47:39 2019 +0000
- Revision:
- 9:49e851ad441e
- Parent:
- 1:e73cf2469f83
- Child:
- 10:a81546661fb5
Dead by Daylight
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| t_yamamoto | 0:562021ed1ba9 | 1 | #include "Switch.h" |
| t_yamamoto | 0:562021ed1ba9 | 2 | #include <stdint.h> |
| t_yamamoto | 0:562021ed1ba9 | 3 | |
| t_yamamoto | 0:562021ed1ba9 | 4 | DigitalIn limitSw[] = { |
| takayama_ryo | 9:49e851ad441e | 5 | //DigitalIn(LIMITSW0_PIN), |
| takayama_ryo | 9:49e851ad441e | 6 | //DigitalIn(LIMITSW1_PIN), |
| takayama_ryo | 9:49e851ad441e | 7 | //DigitalIn(LIMITSW2_PIN), |
| t_yamamoto | 0:562021ed1ba9 | 8 | DigitalIn(LIMITSW3_PIN), |
| t_yamamoto | 0:562021ed1ba9 | 9 | }; |
| t_yamamoto | 0:562021ed1ba9 | 10 | |
| t_yamamoto | 0:562021ed1ba9 | 11 | namespace SWITCH |
| t_yamamoto | 0:562021ed1ba9 | 12 | { |
| t_yamamoto | 0:562021ed1ba9 | 13 | void Switch::Initialize(void) { |
| t_yamamoto | 0:562021ed1ba9 | 14 | for(uint8_t i = 0; i < MOUNTING_LIMITSW_NUM; i++) limitSw[i].mode(PullUp); |
| t_yamamoto | 0:562021ed1ba9 | 15 | } |
| t_yamamoto | 0:562021ed1ba9 | 16 | |
| t_yamamoto | 0:562021ed1ba9 | 17 | bool Switch::checkPushed(int mySwitch) { |
| t_yamamoto | 0:562021ed1ba9 | 18 | return mySwitch ? false : true; |
| t_yamamoto | 0:562021ed1ba9 | 19 | } |
| t_yamamoto | 0:562021ed1ba9 | 20 | } |