Funzioni di IO varie con seriale asincrona

Dependents:   Nucleo_AsyncSerialIO

Fork of IOFuncLib by Max Scordamaglia

Revision:
5:0dd768073f59
Parent:
4:eae942db86db
Child:
7:c0c4ba22126f
Child:
11:7c7848b76f06
--- a/IOFuncLib.cpp	Tue Jun 02 00:51:20 2015 +0000
+++ b/IOFuncLib.cpp	Sat Jun 27 21:10:17 2015 +0000
@@ -46,6 +46,7 @@
     writeScreen("Status \n",2,11);
     writeScreen("Led 1 \n",2,13);
     writeScreen("Virtual Led \n",22,13);
+    writeScreen("Other Commands \n",42,13);
     writeScreen("Input string\n",2,19);
     writeScreen("Result\n",42,19);
     commitScreen();
@@ -165,4 +166,18 @@
     return cstr;
 }
 
-
+int genFunctions::constrain(int amt, int low, int high){
+    return ((amt)<(low)?(low):((amt)>(high)?(high):(amt)));
+    }
+    
+int genFunctions::min(int a, int b){
+   return  ((a)<(b)?(a):(b));
+     }
+     
+int genFunctions::max(int a, int b) {
+    return ((a)>(b)?(a):(b));
+    }
+    
+int genFunctions::abs(int x) {
+    return ((x)>0?(x):-(x));
+    }