summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/agptek/debug-agptek.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/agptek/debug-agptek.c')
-rw-r--r--firmware/target/hosted/agptek/debug-agptek.c52
1 files changed, 49 insertions, 3 deletions
diff --git a/firmware/target/hosted/agptek/debug-agptek.c b/firmware/target/hosted/agptek/debug-agptek.c
index 33f3ac4b97..b4fcb4246b 100644
--- a/firmware/target/hosted/agptek/debug-agptek.c
+++ b/firmware/target/hosted/agptek/debug-agptek.c
@@ -1,6 +1,52 @@
-#include <stdbool.h>
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ * Copyright (C) 2020 by Solomon Peachy
+ *
+ * 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; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
-bool debug_hw_info(void)
+#include "config.h"
+#include "font.h"
+#include "lcd.h"
+#include "kernel.h"
+#include "button.h"
+
+#ifndef BOOTLOADER
+
+#include "pcm-alsa.h"
+
+static int line = 0;
+
+bool dbg_hw_info(void)
{
- return false;
+ int btn = 0;
+
+ lcd_setfont(FONT_SYSFIXED);
+
+ while(btn ^ BUTTON_POWER) {
+ lcd_clear_display();
+ line = 0;
+
+ lcd_putsf(0, line++, "pcm srate: %d", pcm_alsa_get_rate());
+ btn = button_read_device();
+
+ lcd_update();
+ sleep(HZ/16);
+ }
+ return true;
}
+
+#endif /* !BOOTLOADER */