summaryrefslogtreecommitdiff
path: root/digital/avr/modules/trace/trace.c
diff options
context:
space:
mode:
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);
+ }
}
}