summaryrefslogtreecommitdiff
path: root/digital/avr/modules/trace/trace.c
diff options
context:
space:
mode:
authorNélio Laranjeiro2009-03-06 22:57:52 +0100
committerNélio Laranjeiro2009-03-06 22:57:52 +0100
commit436b7c13b108822978c019471675e81297693874 (patch)
treefcfa7e32f58e1c4f9c339cd4c09d4a56ab5c9bd6 /digital/avr/modules/trace/trace.c
parent2427e7f33cb5d6aca31d2a3c46678678d2f818f0 (diff)
digital/avr/modules/trace: Store known values for the trace.
Diffstat (limited to 'digital/avr/modules/trace/trace.c')
-rw-r--r--digital/avr/modules/trace/trace.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/digital/avr/modules/trace/trace.c b/digital/avr/modules/trace/trace.c
index 33488150..e904c2fa 100644
--- a/digital/avr/modules/trace/trace.c
+++ b/digital/avr/modules/trace/trace.c
@@ -110,12 +110,10 @@ trace_init (void)
trace_erase_next_sector ();
/* Store the start code. */
- for (i = 24; i >= 0; i -= 8)
+ for (i = 4; i; i--)
{
- flash_write (trace_global.addr,
- TRACE_CODE_START >> i);
- trace_global.addr =
- FLASH_ADDRESS_INC(trace_global.addr);
+ flash_write (trace_global.addr, v32_to_v8(TRACE_CODE_START, i-1));
+ trace_global.addr = FLASH_ADDRESS_INC(trace_global.addr);
}
return TRACE_STATUS_ON;
}