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.
Dependencies: mbed
Diff: src/boards.cpp
- Revision:
 - 1:9f8583ba2431
 - Parent:
 - 0:44a3005d4f20
 - Child:
 - 4:db38665c3727
 
--- a/src/boards.cpp	Sat Nov 24 18:22:31 2018 +0000
+++ b/src/boards.cpp	Sun Nov 25 00:36:35 2018 +0000
@@ -35,7 +35,6 @@
 #include "parameters.h"
 
 
-
 unsigned int boardEnableBits;
 
 
@@ -87,6 +86,33 @@
  
 void initDACs(void)
 {
-   setupDacInit();
-   sendDACs(dinitbits);
+   //setupDacInit();
+   //sendDACs(dinitbits);
 }    
+
+/************************************************************
+* Routine: checkRange
+* Input:   setval
+*          limlo -- low limit
+*          limhi -- high limit
+* Returns:  1 if entry validates and is written
+*           0 if entry fails
+*           -1 if it slips past
+* Description:
+* Checks if setvalue is between the given limits.
+*
+**************************************************************/
+int checkRange(int setvalue, int limlo, int limhi)
+{
+
+   if ((setvalue >= limlo) && (setvalue <= limhi))
+   {
+      return 1;
+   }
+   else
+   {
+      showRangeError(0, 0, setvalue);
+      return 0;
+   }
+
+}
\ No newline at end of file