summaryrefslogtreecommitdiffhomepage
path: root/digital/avr/modules/utils/utils.h
diff options
context:
space:
mode:
authorNélio Laranjeiro2009-05-07 10:07:49 +0200
committerNélio Laranjeiro2009-05-07 10:07:49 +0200
commitee5a468417fb6810a5bbe4d46617618a9ddb588a (patch)
treea3e418380029b83494a77e4d94eac961faf7b76a /digital/avr/modules/utils/utils.h
parenteb2c866a65980de8c7447a72d91d9dea7d36ffbf (diff)
* digital/avr/modules/trace: (See #67)
* Adapted the trace module to: * Find the last trace in order to start the new one, trace_i = trace_i-1 + 1 * A quarter of the flash is completely erased on the trace init to be used in the future. * Removed the start code useless from now. * tools/trace: * Update the python scripts to use the new trace implementation.
Diffstat (limited to 'digital/avr/modules/utils/utils.h')
-rw-r--r--digital/avr/modules/utils/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/digital/avr/modules/utils/utils.h b/digital/avr/modules/utils/utils.h
index e4e4c10b..a54ee4ed 100644
--- a/digital/avr/modules/utils/utils.h
+++ b/digital/avr/modules/utils/utils.h
@@ -79,4 +79,10 @@ utils_delay_ms (double ms)
/** Count the number of element in an array. */
#define UTILS_COUNT(a) (sizeof (a) / sizeof ((a)[0]))
+static inline uint8_t
+lesseq_mod8 (uint8_t a, uint8_t b)
+{
+ return ((int8_t) (a - b)) <= 0;
+}
+
#endif /* utils_h */