From ee5a468417fb6810a5bbe4d46617618a9ddb588a Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Thu, 7 May 2009 10:07:49 +0200 Subject: * 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. --- digital/avr/modules/utils/utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'digital/avr/modules/utils/utils.h') 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 */ -- cgit v1.2.3