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.
signal.cpp
00001 #include "signal.h" 00002 #include "stdio.h" // for sprintf() 00003 00004 const char* Signal::c_str (char* str) { 00005 switch(type){ 00006 case CONSTANT: sprintf(str, "constant %f", amplitude); break; 00007 case SINE: sprintf(str, "sin %f %f", amplitude, frequency); break; 00008 case SQUARE: sprintf(str, "square %f %f", amplitude, frequency); break; 00009 default: sprintf(str, "none"); break; 00010 } 00011 return str; 00012 } 00013
Generated on Thu Jul 14 2022 20:41:36 by
1.7.2