From f05d72601f6f47318fd9a3cc3ca419f5266572ff Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Fri, 28 Nov 2008 22:51:05 +0100 Subject: digital/avr/modules/trace: * Fix the trace_init since the modifications of the functions for the flash memory. * Update the unit tests. * Added the events enumerator generated from the example file in tools/trace/example and update the flood test to use real simulation of the TRACE module. --- digital/avr/modules/trace/trace.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'digital/avr/modules/trace/trace.c') diff --git a/digital/avr/modules/trace/trace.c b/digital/avr/modules/trace/trace.c index ee092bad..ac113f17 100644 --- a/digital/avr/modules/trace/trace.c +++ b/digital/avr/modules/trace/trace.c @@ -97,21 +97,21 @@ trace_init (void) /* Get the first sector to write. */ if (trace_global.flash_status) { - trace_global.flash_addr = flash_sector_next (0); - trace_global.flash_next_sector = - FLASH_PAGE (trace_global.flash_addr + FLASH_PAGE_SIZE); - - /* If the next sector is not empty erase it. */ - trace_next_sector_prepare (); - - /* Store the start code. */ - for (i = 0; i < 4; i ++) - { - flash_write (trace_global.flash_addr, - v32_to_v8(TRACE_CODE_START, i)); - trace_global.flash_addr = - FLASH_ADDRESS_INC(trace_global.flash_addr); - } + trace_global.flash_addr = flash_first_sector(); + trace_global.flash_next_sector = + FLASH_PAGE (trace_global.flash_addr + FLASH_PAGE_SIZE); + + /* If the next sector is not empty erase it. */ + trace_next_sector_prepare (); + + /* Store the start code. */ + for (i = 0; i < 4; i ++) + { + flash_write (trace_global.flash_addr, + v32_to_v8(TRACE_CODE_START, i)); + trace_global.flash_addr = + FLASH_ADDRESS_INC(trace_global.flash_addr); + } } } -- cgit v1.2.3