Wojciech Rynczuk / Mbed 2 deprecated vcdMaker_Demo

Dependencies:   mbed vcdLogger vcdSignal

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sync.cpp Source File

sync.cpp

00001 #include "sync.hpp"
00002   
00003 Sync::Sync(const string& name, const PinName pin, Logger& logger) : DigitalIn(pin), Signal(name,1,logger)
00004 {
00005 }
00006     
00007 void Sync::PrintState()
00008 {
00009   string  suffix("");
00010   int32_t time_ref = 0;
00011   if (read())
00012   {
00013     /* Do nothing */
00014   }
00015   else
00016   {
00017     string msg("Sync triggered");
00018     PrintEvent(msg, time_ref);
00019   }
00020 }