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.

Dependencies:   mbed vcdLogger vcdSignal

Committer:
ketjow
Date:
Fri Feb 12 21:38:04 2016 +0000
Revision:
0:9a59cffaafad
Child:
1:446154224f92
vcdMaker demo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ketjow 0:9a59cffaafad 1 #include "button.hpp"
ketjow 0:9a59cffaafad 2
ketjow 0:9a59cffaafad 3 Button::Button(const string& name, const PinName pin, Logger& logger) : DigitalIn(pin), Signal(name,1,logger)
ketjow 0:9a59cffaafad 4 {
ketjow 0:9a59cffaafad 5 }
ketjow 0:9a59cffaafad 6
ketjow 0:9a59cffaafad 7 void Button::PrintState()
ketjow 0:9a59cffaafad 8 {
ketjow 0:9a59cffaafad 9 string suffix("");
ketjow 0:9a59cffaafad 10 int32_t time_ref = 0;
ketjow 0:9a59cffaafad 11 if (read())
ketjow 0:9a59cffaafad 12 {
ketjow 0:9a59cffaafad 13 string msg("Key released");
ketjow 0:9a59cffaafad 14 PrintVector(0, suffix, msg, time_ref);
ketjow 0:9a59cffaafad 15 }
ketjow 0:9a59cffaafad 16 else
ketjow 0:9a59cffaafad 17 {
ketjow 0:9a59cffaafad 18 string msg("Key pressed");
ketjow 0:9a59cffaafad 19 PrintVector(1, suffix, msg, time_ref);
ketjow 0:9a59cffaafad 20 }
ketjow 0:9a59cffaafad 21 }