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.
Dependencies: mbed
Fork of circle_war_ver_A_NUCLEO_ by
transfer.h@2:bed6b204e64c, 2016-03-25 (annotated)
- Committer:
- baba2357
- Date:
- Fri Mar 25 04:21:52 2016 +0000
- Revision:
- 2:bed6b204e64c
- Parent:
- 1:86d25c1c4bd5
- Child:
- 8:554e3d643b2d
????????????????????; pin_file.h??????????????????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
baba2357 | 1:86d25c1c4bd5 | 1 | #ifndef TRANSFER_H |
baba2357 | 1:86d25c1c4bd5 | 2 | #define TRANSFER_H |
baba2357 | 1:86d25c1c4bd5 | 3 | |
baba2357 | 1:86d25c1c4bd5 | 4 | DigitalIn push(PA_12); |
baba2357 | 1:86d25c1c4bd5 | 5 | bool pushed_number=0; |
baba2357 | 1:86d25c1c4bd5 | 6 | void transfer(); |
baba2357 | 1:86d25c1c4bd5 | 7 | |
baba2357 | 1:86d25c1c4bd5 | 8 | #endif |
baba2357 | 1:86d25c1c4bd5 | 9 | |
baba2357 | 1:86d25c1c4bd5 | 10 | void transfer(){ |
baba2357 | 2:bed6b204e64c | 11 | push.mode(PullUp); |
baba2357 | 2:bed6b204e64c | 12 | if(push.read()==0) pushed_number=!pushed_number; |
baba2357 | 1:86d25c1c4bd5 | 13 | } |
baba2357 | 1:86d25c1c4bd5 | 14 | |
baba2357 | 1:86d25c1c4bd5 | 15 |