From 631242855af42d10f4d950dfb175677e748312a4 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Mon, 10 Nov 2008 21:13:11 +0100 Subject: avr/modules/trace: Added some doc. --- digital/avr/modules/trace/doc/Makefile | 11 ++++++++ digital/avr/modules/trace/doc/trace.txt | 49 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 digital/avr/modules/trace/doc/Makefile create mode 100644 digital/avr/modules/trace/doc/trace.txt diff --git a/digital/avr/modules/trace/doc/Makefile b/digital/avr/modules/trace/doc/Makefile new file mode 100644 index 00000000..11dcecfb --- /dev/null +++ b/digital/avr/modules/trace/doc/Makefile @@ -0,0 +1,11 @@ +PAGES=trace.txt + +HTML=$(PAGES:%.txt=%.html) + +%.html: %.txt + rst2html $< > $@ + +all : $(HTML) + +clean: + rm $(HTML) diff --git a/digital/avr/modules/trace/doc/trace.txt b/digital/avr/modules/trace/doc/trace.txt new file mode 100644 index 00000000..a593ff88 --- /dev/null +++ b/digital/avr/modules/trace/doc/trace.txt @@ -0,0 +1,49 @@ +Trace module +============ + +The trace module is in charge to store data in the flash memory. + +Description +----------- + +The flash memory used is a 16 Mbit SPI flash memory SST25VF016B. +The objective of this module is to use the flash memory as circular buffer to +store events which had occurred in the robot during the match by storing data +with a unique identifier for each event and the data following this id. + +Depends +------- + +This module depends on the following ones: + + * Flash + * SPI + * Utils + +Module +------ + +1. The Trace module start to initialise the flash memory and read the status of this one. + + 1.1 It gets the address of the first sector available of the flash. + + 1.2 Gets the next sector address of the flash memory, and erase it if it is not empty. + + 1.3 Store a start code useful to know the beginning of last traces. + +2. TRACE macro. + +The trace macro as for job to compute for each parameter it as the length of +those ones (1, 2, 4 bytes) and store it in the flash memory. + +The only thing the actor as to do is to call the TRACE macro as follow: + +uint8_t val1; + +uint16_t val2; + +... + +TRACE (val1, val2, ...) + +3. The uninitialise function of the trace module shall be called to store the end code of traces. -- cgit v1.2.3