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: Debug.h
- Revision:
- 9:f6ba53e355a0
- Child:
- 10:258a1eca02cc
diff -r f305ea78b2b1 -r f6ba53e355a0 Debug.h
--- /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