Index: uspace/app/tmon/burst_tests.c
===================================================================
--- uspace/app/tmon/burst_tests.c	(revision 59958992ca6d1825b8aba765eb68e6e6efeacf91)
+++ uspace/app/tmon/burst_tests.c	(revision 8e16454909bb396b48664d408d6f3488f706f8f5)
@@ -47,10 +47,15 @@
 #define INDENT "      "
 
+/** Generic burst test parameters. */
 typedef struct tmon_burst_test_params {
-	tmon_test_params_t base; /* inheritance */
+	/** Inherited base. */
+	tmon_test_params_t base;
+	/** The count of reads/writes to perform. */
 	uint32_t cycles;
+	/** Size of single read/write. */
 	size_t size;
 } tmon_burst_test_params_t;
 
+/** Static array of long options, from which test parameters are parsed. */
 static struct option long_options[] = {
 	{"cycles", required_argument, NULL, 'n'},
@@ -59,6 +64,14 @@
 };
 
+/** String of short options, from which test parameters are parsed. */
 static const char *short_options = "n:s:";
 
+/** Common option parser for all burst tests.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ * @param[out] params Parsed test parameters (if successful).
+ *
+ * @return EOK if successful (in such case caller becomes the owner of `params`).
+ */
 static int read_params(int argc, char *argv[], tmon_test_params_t **params)
 {
@@ -105,9 +118,13 @@
 }
 
+/** Unit of quantity used for pretty formatting. */
 typedef struct tmon_unit {
+	/** Prefix letter, which is printed before the actual unit. */
 	char prefix;
+	/** Factor of the unit. */
 	uint64_t factor;
 } tmon_unit_t;
 
+/** Static array of units with decreasing factors. */
 static const tmon_unit_t units[] = {
 	{ .prefix = 'E', .factor = 1ul << 60 },
@@ -119,6 +136,13 @@
 };
 
+/** Format size in bytes for human reading.
+ * @param[in] size The size to format.
+ * @param[in] fmt Format string. Must include one double and char.
+ *
+ * @return Heap-allocated string if successful (caller becomes its owner), NULL otherwise.
+ */
 static char * format_size(double size, const char *fmt)
 {
+	// Figure out the "tightest" unit.
 	unsigned i;
 	for (i = 0; i < ARRAY_SIZE(units); ++i) {
@@ -135,4 +159,5 @@
 	}
 
+	// Format the size.
 	const double div_size = size / factor;
 	char *out = NULL;
@@ -142,4 +167,7 @@
 }
 
+/** Print burst test parameters.
+ * @param[in] params Test parameters to print.
+ */
 static void print_params(const tmon_burst_test_params_t *params)
 {
@@ -151,4 +179,8 @@
 }
 
+/** Print burst test results.
+ * @param[in] params Test parameters.
+ * @param[in] duration Duration of the burst test.
+ */
 static void print_results(const tmon_burst_test_params_t *params, usbdiag_dur_t duration)
 {
@@ -169,4 +201,10 @@
 }
 
+/** Run "interrupt in" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_intr_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -187,4 +225,10 @@
 }
 
+/** Run "interrupt out" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_intr_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -205,4 +249,10 @@
 }
 
+/** Run "bulk in" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_bulk_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -223,4 +273,10 @@
 }
 
+/** Run "bulk out" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_bulk_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -241,4 +297,10 @@
 }
 
+/** Run "isochronous in" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_isoch_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -259,4 +321,10 @@
 }
 
+/** Run "isochronous out" burst test.
+ * @param[in] exch Open async exchange with the diagnostic device.
+ * @param[in] generic_params Test parameters. Must point to 'tmon_burst_test_params_t'.
+ *
+ * @return Exit code
+ */
 static int run_isoch_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
 {
@@ -277,4 +345,10 @@
 }
 
+/** Interrupt in burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_intr_in(int argc, char *argv[])
 {
@@ -287,4 +361,10 @@
 }
 
+/** Interrupt out burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_intr_out(int argc, char *argv[])
 {
@@ -297,4 +377,10 @@
 }
 
+/** Interrupt bulk burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_bulk_in(int argc, char *argv[])
 {
@@ -307,4 +393,10 @@
 }
 
+/** Bulk out burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_bulk_out(int argc, char *argv[])
 {
@@ -317,4 +409,10 @@
 }
 
+/** Isochronous in burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_isoch_in(int argc, char *argv[])
 {
@@ -327,4 +425,10 @@
 }
 
+/** Isochronous out burst test command handler.
+ * @param[in] argc Number of arguments.
+ * @param[in] argv Argument values. Must point to exactly `argc` strings.
+ *
+ * @return Exit code
+ */
 int tmon_burst_isoch_out(int argc, char *argv[])
 {
