Ultraschall Test Geschwindigkeitsregelung
Fork of BertlLib by
Diff: Bertl14.cpp
- Revision:
- 6:78243412d2b3
- Parent:
- 0:e0131e671ea0
- Child:
- 7:01d2bc098b6d
--- a/Bertl14.cpp Wed Feb 25 08:17:43 2015 +0000 +++ b/Bertl14.cpp Thu Mar 05 17:39:16 2015 +0000 @@ -119,6 +119,21 @@ useISR = prev; } +void PortEx::WaitUntilFrontButtonPressed() +{ + int prev = useISR; + useISR = 0; + btns = 0; + while(1) { + ReadButtons(); + if( IsAnyFrontButton() ) + break; + wait(0.01); + } + btns=btnEvent=0; + useISR = prev; +} + UsDistSens::UsDistSens(PinName pinTrigger, PinName pinEcho) :