summaryrefslogtreecommitdiff
path: root/n/avr/rs232
diff options
context:
space:
mode:
authorschodet2004-06-25 09:18:26 +0000
committerschodet2004-06-25 09:18:26 +0000
commite4c44ee5a714536cae101ac970d9ee99eeafcece (patch)
tree67d9aad25d5c74d37bb5e5509f5a596fdaf0caef /n/avr/rs232
parente3f4d41307124dfdf30339ca36b686d0d95f56c5 (diff)
Add: Documentation.
Diffstat (limited to 'n/avr/rs232')
-rw-r--r--n/avr/rs232/Makefile8
-rw-r--r--n/avr/rs232/avrconfig.h16
-rw-r--r--n/avr/rs232/rs232.c6
-rw-r--r--n/avr/rs232/rs232.h6
-rw-r--r--n/avr/rs232/rs232.txt4
5 files changed, 24 insertions, 16 deletions
diff --git a/n/avr/rs232/Makefile b/n/avr/rs232/Makefile
index 3b0ea0f..cb8523d 100644
--- a/n/avr/rs232/Makefile
+++ b/n/avr/rs232/Makefile
@@ -1,6 +1,7 @@
PRG = test_rs232
OBJECTS = test_rs232.o rs232.o
DOC = rs232.html
+EXTRACTDOC = rs232.c avrconfig.h
# atmega8, atmega8535, atmega128...
MCU_TARGET = atmega8
# -O2 : speed
@@ -33,7 +34,7 @@ $(PRG).elf: $(OBJECTS)
$(OBJDUMP) -h -S $< > $@
clean:
- rm -f *.o $(PRG).elf *.bak $(DOC)
+ rm -f *.o $(PRG).elf *.bak $(DOC) *.exd
rm -f *.lst *.map $(EXTRA_CLEAN_FILES)
rm -f $(PRG).hex $(PRG).bin $(PRG).srec $(PRG)_eeprom.hex $(PRG)_eeprom.bin $(PRG)_eeprom.srec
@@ -41,9 +42,12 @@ clean:
doc: $(DOC)
-%.html: %.txt
+%.html: %.txt %.exd
aft $<
+%.exd: $(EXTRACTDOC)
+ extractdoc $^ > $@
+
# Rules for building the .text rom images.
text: hex bin srec
diff --git a/n/avr/rs232/avrconfig.h b/n/avr/rs232/avrconfig.h
index deee7db..a497a22 100644
--- a/n/avr/rs232/avrconfig.h
+++ b/n/avr/rs232/avrconfig.h
@@ -25,21 +25,21 @@
* }}} */
/* global */
-/* AVR Frequency : 1000000 1843200 2000000 3686400 4000000 7372800 8000000
- * 11059200 14745600 16000000 18432000 20000000 */
+/** AVR Frequency : 1000000, 1843200, 2000000, 3686400, 4000000, 7372800,
+ * 8000000, 11059200, 14745600, 16000000, 18432000, 20000000. */
#define AC_FREQ 14745600
/* rs232 - RS232 Module. */
-/* Baudrate : 2400 4800 9600 14400 19200 28800 38400 57600 76800 115200 230400
- * 250000 500000 1000000 */
+/** Baudrate : 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 76800,
+ * 115200, 230400, 250000, 500000, 1000000. */
#define AC_RS232_BAUDRATE 115200
-/* Choose between interrupt (1) or polling (0). */
+/** Choose between interrupt (1) or polling (0). */
#define AC_RS232_INTERRUPT 0
-/* Parity : ODD, EVEN, NONE. */
+/** Parity : ODD, EVEN, NONE. */
#define AC_RS232_PARITY ODD
-/* Stop bits : 1, 2. */
+/** Stop bits : 1, 2. */
#define AC_RS232_STOP_BITS 2
-/* Character size : 5, 6, 7, 8, 9. */
+/** Character size : 5, 6, 7, 8, 9. */
#define AC_RS232_CHAR_SIZE 8
#endif /* avrconfig_h */
diff --git a/n/avr/rs232/rs232.c b/n/avr/rs232/rs232.c
index a3984f7..91efa44 100644
--- a/n/avr/rs232/rs232.c
+++ b/n/avr/rs232/rs232.c
@@ -84,7 +84,7 @@
/* +AutoDec */
/* -AutoDec */
-/* Initialise rs232. */
+/** Initialise rs232. */
void
rs232_init (void)
{
@@ -97,7 +97,7 @@ rs232_init (void)
UCSRB = _BV (RXEN) | _BV (TXEN);
}
-/* Read a char. */
+/** Read a char. */
unsigned char
rs232_getc (void)
{
@@ -105,7 +105,7 @@ rs232_getc (void)
return UDR;
}
-/* Write a char. */
+/** Write a char. */
void
rs232_putc (unsigned char c)
{
diff --git a/n/avr/rs232/rs232.h b/n/avr/rs232/rs232.h
index 120a920..f37fc87 100644
--- a/n/avr/rs232/rs232.h
+++ b/n/avr/rs232/rs232.h
@@ -27,15 +27,15 @@
/* +AutoDec */
-/* Initialise rs232. */
+/** Initialise rs232. */
void
rs232_init (void);
-/* Read a char. */
+/** Read a char. */
unsigned char
rs232_getc (void);
-/* Write a char. */
+/** Write a char. */
void
rs232_putc (unsigned char c);
diff --git a/n/avr/rs232/rs232.txt b/n/avr/rs232/rs232.txt
index 3bd8315..4f383b9 100644
--- a/n/avr/rs232/rs232.txt
+++ b/n/avr/rs232/rs232.txt
@@ -6,3 +6,7 @@
Rien de plus simple. Appeler la fonction |rs232_init| au démarrage, puis
|rs232_putc| pour envoyer un caractère,
|rs232_getc| pour en recevoir.
+
+* Doc
+
+*File: rs232.exd