![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is the vcdMaker demo project. See http://vcdmaker.org for details. vcdMaker is supposed to help engineers to debug their applications and systems. It transforms text log files into the VCD format which can be easily displayed as a waveform. Use the mbed serial logger at 115200 baud rate.
Dependencies: BSP_DISCO_L476VG COMPASS_DISCO_L476VG mbed vcdLogger vcdSignal
Diff: main.cpp
- Revision:
- 2:fcfb6ced9c00
- Parent:
- 1:297d1bcaa432
diff -r 297d1bcaa432 -r fcfb6ced9c00 main.cpp --- a/main.cpp Sat May 28 19:25:26 2016 +0000 +++ b/main.cpp Wed Dec 07 09:14:34 2016 +0000 @@ -24,6 +24,7 @@ #include "magnetometer.hpp" #include "accelerometer.hpp" #include "button.hpp" +#include "sync.hpp" #include "COMPASS_DISCO_L476VG.h" #define NO_OF_LINES ((uint32_t)75) @@ -48,13 +49,15 @@ Accelerometer accelerometer("Disco.Sensors.Accelerometer.", compass, slogger); // Buttons -Button button_sync("Disco.Sync", slogger); Button button_center("Disco.Buttons.Center", slogger); Button button_left("Disco.Buttons.Left", slogger); Button button_up("Disco.Buttons.Up", slogger); Button button_right("Disco.Buttons.Right", slogger); Button button_down("Disco.Buttons.Down", slogger); +//Synchronization +Sync sync_signal("Disco.Sync", slogger); + // Joystick button InterruptIn center(JOYSTICK_CENTER); InterruptIn left(JOYSTICK_LEFT); @@ -127,13 +130,13 @@ } void sync_released() { - button_sync = 0; - button_sync.PrintState(); + sync_signal = 0; + sync_signal.PrintState(); } void sync_pressed() { - button_sync = 1; - button_sync.PrintState(); + sync_signal = 1; + sync_signal.PrintState(); } void accelerometer_tick()