Browse Source

Add documentation for the variable tracing

Fred Sundvik 9 years ago
parent
commit
0ba3e523a7
2 changed files with 32 additions and 0 deletions
  1. 9 0
      quantum/variable_trace.h
  2. 23 0
      readme.md

+ 9 - 0
quantum/variable_trace.h

@@ -1,13 +1,22 @@
 #ifndef VARIABLE_TRACE_H
 #define VARIABLE_TRACE_H
 
+// For more information about the variable tracing see the readme.
+
 #include "print.h"
 
 #ifdef NUM_TRACED_VARIABLES
 
+// Start tracing a variable at the memory address addr
+// The name can be anything and is used only for reporting
+// The size should usually be the same size as the variable you are interested in
 #define ADD_TRACED_VARIABLE(name, addr, size) \
     add_traced_variable(PSTR(name), (void*)addr, size, PSTR(__FILE__), __LINE__)
+
+// Stop tracing the variable with the given name
 #define REMOVE_TRACED_VARIABLE(name) remove_traced_variable(PSTR(name), PSTR(__FILE__), __LINE__)
+
+// Call to get messages when the variable has been changed
 #define VERIFY_TRACED_VARIABLES() verify_traced_variables(PSTR(__FILE__), __LINE__)
 
 #else

File diff suppressed because it is too large
+ 23 - 0
readme.md