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@1:8faddee0e52f, 2019-09-28 (annotated)
- Committer:
- GaspardD
- Date:
- Sat Sep 28 22:29:57 2019 +0000
- Revision:
- 1:8faddee0e52f
- Child:
- 3:1b7eb426247e
motor control
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GaspardD | 1:8faddee0e52f | 1 | #include "utils.h" |
GaspardD | 1:8faddee0e52f | 2 | |
GaspardD | 1:8faddee0e52f | 3 | bool b_UTILS_flag_button = false; |
GaspardD | 1:8faddee0e52f | 4 | bool b_UTILS_flag_emergency_stop = false; |
GaspardD | 1:8faddee0e52f | 5 | Serial pc(USBTX, USBRX); |
GaspardD | 1:8faddee0e52f | 6 | InterruptIn button(USER_BUTTON); |
GaspardD | 1:8faddee0e52f | 7 | |
GaspardD | 1:8faddee0e52f | 8 | |
GaspardD | 1:8faddee0e52f | 9 | void init_interruptions(){ |
GaspardD | 1:8faddee0e52f | 10 | button.fall(&it_pressed); |
GaspardD | 1:8faddee0e52f | 11 | } |
GaspardD | 1:8faddee0e52f | 12 | |
GaspardD | 1:8faddee0e52f | 13 | void it_pressed(){ |
GaspardD | 1:8faddee0e52f | 14 | b_UTILS_flag_button = true; |
GaspardD | 1:8faddee0e52f | 15 | return; |
GaspardD | 1:8faddee0e52f | 16 | } |
GaspardD | 1:8faddee0e52f | 17 | |
GaspardD | 1:8faddee0e52f | 18 | void initGPIOs() |
GaspardD | 1:8faddee0e52f | 19 | { |
GaspardD | 1:8faddee0e52f | 20 | return; |
GaspardD | 1:8faddee0e52f | 21 | } |