summaryrefslogtreecommitdiff
path: root/digital/avr/modules/trace/trace.c
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-11-28 22:51:05 +0100
committerNélio Laranjeiro2008-11-28 22:51:05 +0100
commitf05d72601f6f47318fd9a3cc3ca419f5266572ff (patch)
treeb574cc2727745f5207b492e3e3eea1f5a2ae5fca /digital/avr/modules/trace/trace.c
parent34764c3924c79a1af978ee38a15d92d56035677e (diff)
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.
Diffstat (limited to 'digital/avr/modules/trace/trace.c')
-rw-r--r--digital/avr/modules/trace/trace.c30
1 files changed, 15 insertions, 15 deletions
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);
+ }
}
}