ELEC2645 (2019/20) / Mbed 2 deprecated el18loc_final

Dependencies:   mbed

Revision:
9:f6ba53e355a0
Child:
10:258a1eca02cc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Debug.h	Wed May 06 14:37:34 2020 +0000
@@ -0,0 +1,42 @@
+#ifndef DEBUG_H
+#define DEBUG_H
+
+#include "LUTs_debug.h"
+
+
+/** Debug
+@brief Runs debug codes
+@author Luke Cartwright, University of Leeds
+@date May 2020
+*/
+
+
+bool run_sin_debug()
+{
+    int passed=0;
+    if(sin_debug(0, 32768))passed++;
+    if(sin_debug(512, 32768))passed++;
+    if(sin_debug(256, 65535))passed++;
+    
+    if (passed==3) {
+        printf("Sin debug PASS\n");
+        return (1);
+    } else {
+        printf("Sin debug FAIL\n");
+        printf("tests passed = %d", passed);
+        return (0);
+    }
+}
+void run_LUTs_debug () 
+{
+    int masterpass=0;
+    if(run_sin_debug())masterpass++;
+    if(masterpass==1) {
+        printf("DEBUG PASSED\n");
+        }else {
+            printf("DEBUG FAIL tests passed = %d\n",masterpass);
+            }
+}
+
+
+#endif
\ No newline at end of file