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.
utils.cpp
- Committer:
- GaspardD
- Date:
- 2019-09-29
- Revision:
- 5:8bbe640528bc
- Parent:
- 4:efa207509f63
- Child:
- 6:ab9f3695633f
File content as of revision 5:8bbe640528bc:
#include "utils.h" bool b_UTILS_flag_button = false; bool b_UTILS_flag_emergency_stop = false; Timer timerSinceStart; Serial pc(USBTX, USBRX); InterruptIn button(USER_BUTTON); DigitalIn chassisMode(PE_11); void it_pressed() { if(timerSinceStart.read_ms() > 500) { timerSinceStart.reset(); pc.printf("Button pressed\r\n"); b_UTILS_flag_button = true; b_UTILS_flag_emergency_stop = false; } return; }