*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
#include "ao.h"
#endif
+/* Include bufio commands */
+#ifndef AO_FAT_TEST
+#define BUFIO_COMMANDS 0
+#endif
+
#include "ao_sdcard.h"
#include "ao_bufio.h"
#if 0
#define DBG(...) printf(__VA_ARGS__)
#else
-#define DBG(...)
+#define DBG(...) (void) 0
#endif
static inline void
ao_bufio_unlock();
}
+#if BUFIO_COMMANDS
static void
ao_bufio_test_read(void)
{
{ ao_bufio_test_read, "q\0Test bufio read" },
{ 0, NULL },
};
+#endif
void
ao_bufio_setup(void)
{
ao_bufio_setup();
ao_sdcard_init();
+#if BUFIO_COMMANDS
ao_cmd_register(&ao_bufio_cmds[0]);
+#endif
}