summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-26 22:46:17 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-26 22:46:17 +0200
commitbfa494588da0def96c42577e284c6d8990eb31f2 (patch)
tree29b98f8a2cbfea31a0f6641d8cd77b211ac5defe
parentb6460d729aa683643e7ad83a9921f335f0fdba93 (diff)
add doxygen
-rw-r--r--.gitignore1
-rw-r--r--Doxyfile21
-rw-r--r--makefile5
-rw-r--r--robot/errcatch.h2
-rw-r--r--robot/hypervisor.h2
-rw-r--r--robot/io.h6
-rw-r--r--robot/main.h2
-rw-r--r--robot/mode_chrg.h2
-rw-r--r--robot/mode_dirc.h2
-rw-r--r--robot/mode_grid.h2
-rw-r--r--robot/mode_halt.h2
-rw-r--r--robot/mode_lcal.h2
-rw-r--r--robot/mode_maze.h2
-rw-r--r--robot/mode_scal.h2
-rw-r--r--robot/mode_spin.h2
-rw-r--r--robot/modes.h2
-rw-r--r--robot/orangutan_shim.h2
-rw-r--r--robot/sercomm.h2
-rw-r--r--robot/setup.h2
-rw-r--r--robot/sim.h2
-rw-r--r--shared/bin.h3
-rw-r--r--shared/consts.h4
-rw-r--r--shared/errors.h2
-rw-r--r--shared/protocol.h2
-rw-r--r--shared/semver.h2
-rw-r--r--shared/serial_parse.h2
-rw-r--r--shared/util.h2
27 files changed, 78 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index d493881..74f4594 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ client/main
.cache
*.log
scripts/InstallationLog.txt
+docs/
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..8c225e9
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,21 @@
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = "wall-e2"
+# PROJECT_NUMBER =
+PROJECT_BRIEF = Project RobotRun software
+OUTPUT_DIRECTORY = docs/
+CREATE_SUBDIRS = NO
+ALLOW_UNICODE_NAMES = NO
+OUTPUT_LANGUAGE = English
+TAB_SIZE = 4
+FILE_PATTERNS = *.c \
+ *.h \
+ *.md
+RECURSIVE = YES
+USE_MDFILE_AS_MAINPAGE = ./readme.md
+SOURCE_BROWSER = YES
+INLINE_SOURCES = YES
+STRIP_CODE_COMMENTS = NO
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+CALL_GRAPH = YES
+# INPUT = robot/
diff --git a/makefile b/makefile
index 7795106..832bde9 100644
--- a/makefile
+++ b/makefile
@@ -5,4 +5,7 @@ all clean format compile_commands: $(SUBDIRS) FORCE
$(SUBDIRS): FORCE
$(MAKE) -C $@ $(MAKECMDGOALS)
-FORCE: \ No newline at end of file
+FORCE:
+
+docs:
+ doxygen
diff --git a/robot/errcatch.h b/robot/errcatch.h
index 836da1b..add4ece 100644
--- a/robot/errcatch.h
+++ b/robot/errcatch.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file errcatch.h */
+
#include <stdint.h>
#include "../shared/consts.h"
diff --git a/robot/hypervisor.h b/robot/hypervisor.h
index 5008c8f..b5dc0ab 100644
--- a/robot/hypervisor.h
+++ b/robot/hypervisor.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file hypervisor.h */
+
#include <stdint.h>
extern uint64_t g_w2_hypervisor_cycles;
diff --git a/robot/io.h b/robot/io.h
index 3d91799..be0e9b9 100644
--- a/robot/io.h
+++ b/robot/io.h
@@ -1,9 +1,11 @@
#pragma once
+/** @file io.h */
+
#include "../shared/protocol.h"
-/** i/o module main */
+/** @brief i/o module main */
void w2_io_main();
-/** global struct containing all i/o */
+/** @brief global struct containing all i/o */
extern w2_s_io_all g_w2_io;
diff --git a/robot/main.h b/robot/main.h
index 5b0a1b2..58f849b 100644
--- a/robot/main.h
+++ b/robot/main.h
@@ -1,4 +1,6 @@
#pragma once
+/** @file main.h */
+
/** program entrypoint */
int main();
diff --git a/robot/mode_chrg.h b/robot/mode_chrg.h
index d9b5cc0..a870e58 100644
--- a/robot/mode_chrg.h
+++ b/robot/mode_chrg.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_chrg.h */
+
/**
* charge station mode
*
diff --git a/robot/mode_dirc.h b/robot/mode_dirc.h
index 5b9bbf4..12c967a 100644
--- a/robot/mode_dirc.h
+++ b/robot/mode_dirc.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_dirc.h */
+
#include <stdint.h>
extern int16_t g_w2_mode_dirc_motor_l;
diff --git a/robot/mode_grid.h b/robot/mode_grid.h
index fcf9100..55093ad 100644
--- a/robot/mode_grid.h
+++ b/robot/mode_grid.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_grid.h */
+
/**
* warehouse mode
*
diff --git a/robot/mode_halt.h b/robot/mode_halt.h
index d92905e..b5ac11f 100644
--- a/robot/mode_halt.h
+++ b/robot/mode_halt.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_halt.h */
+
/**
* halt (emergency) mode
*
diff --git a/robot/mode_lcal.h b/robot/mode_lcal.h
index dd373f0..5a43701 100644
--- a/robot/mode_lcal.h
+++ b/robot/mode_lcal.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_lcal.h */
+
/**
* calibration mode
*
diff --git a/robot/mode_maze.h b/robot/mode_maze.h
index 9fbeb8c..e7490b9 100644
--- a/robot/mode_maze.h
+++ b/robot/mode_maze.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_maze.h */
+
/**
* maze mode
*
diff --git a/robot/mode_scal.h b/robot/mode_scal.h
index 4f1f04d..c427d4b 100644
--- a/robot/mode_scal.h
+++ b/robot/mode_scal.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_scal.h */
+
/**
* sensor calibration mode
*
diff --git a/robot/mode_spin.h b/robot/mode_spin.h
index 926137e..1f721dc 100644
--- a/robot/mode_spin.h
+++ b/robot/mode_spin.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file mode_spin.h */
+
/**
* wet floor simulation
*
diff --git a/robot/modes.h b/robot/modes.h
index 3423a0f..122be4a 100644
--- a/robot/modes.h
+++ b/robot/modes.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file modes.h */
+
#include "../shared/consts.h"
#include "mode_chrg.h"
diff --git a/robot/orangutan_shim.h b/robot/orangutan_shim.h
index 10420bd..cbb0995 100644
--- a/robot/orangutan_shim.h
+++ b/robot/orangutan_shim.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file orangutan_shim.h */
+
#ifdef W2_SIM
#include "sim.h"
#else
diff --git a/robot/sercomm.h b/robot/sercomm.h
index b1f69c7..13625c0 100644
--- a/robot/sercomm.h
+++ b/robot/sercomm.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file sercomm.h */
+
#include "../shared/bin.h"
#include "../shared/consts.h"
#include "../shared/protocol.h"
diff --git a/robot/setup.h b/robot/setup.h
index 17ac78d..450e102 100644
--- a/robot/setup.h
+++ b/robot/setup.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file setup.h */
+
/**
* runs once at startup, plays beep when setup finishes
*
diff --git a/robot/sim.h b/robot/sim.h
index 08c1d8a..76b57f8 100644
--- a/robot/sim.h
+++ b/robot/sim.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file sim.h */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/shared/bin.h b/shared/bin.h
index af3a249..48485c8 100644
--- a/shared/bin.h
+++ b/shared/bin.h
@@ -1,4 +1,7 @@
#pragma once
+
+/** @file bin.h */
+
/**
* helper file for binary data
*
diff --git a/shared/consts.h b/shared/consts.h
index 70ab5b2..50b16b9 100644
--- a/shared/consts.h
+++ b/shared/consts.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file consts.h */
+
#ifndef W2_BUILD_STR
// is defined by CFLAGS += -DW2_BUILD_STR in makefile
#define W2_BUILD_STR ("????????")
@@ -30,4 +32,4 @@
/** battery voltage sensor pinout */
#define W2_BATTERY_PIN 6
/** side-facing distance sensor pinout */
-#define W2_SIDE_SENSOR_PIN 7 \ No newline at end of file
+#define W2_SIDE_SENSOR_PIN 7
diff --git a/shared/errors.h b/shared/errors.h
index ac8e95f..4c9f7c8 100644
--- a/shared/errors.h
+++ b/shared/errors.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file errors.h */
+
#include <stdint.h>
#define W2_E_TYPE_MASK (0b11 << 6)
diff --git a/shared/protocol.h b/shared/protocol.h
index 7aa5e9f..05cde03 100644
--- a/shared/protocol.h
+++ b/shared/protocol.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file protocol.h */
+
#include <stdint.h>
#include <stdlib.h>
diff --git a/shared/semver.h b/shared/semver.h
index a99ae61..6a1da79 100644
--- a/shared/semver.h
+++ b/shared/semver.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file semver.h */
+
#include <stdint.h>
typedef struct {
diff --git a/shared/serial_parse.h b/shared/serial_parse.h
index a1c8fb9..03c420f 100644
--- a/shared/serial_parse.h
+++ b/shared/serial_parse.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file serial_parse.h */
+
#include <stdint.h>
#include "protocol.h"
diff --git a/shared/util.h b/shared/util.h
index 9e4d8ac..465e043 100644
--- a/shared/util.h
+++ b/shared/util.h
@@ -1,5 +1,7 @@
#pragma once
+/** @file util.h */
+
#define W2_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define W2_MAX(a, b) (((a) > (b)) ? (a) : (b))
#define W2_RANGE(min, val, max) W2_MIN(max, W2_MAX(val, min))