diff options
Diffstat (limited to 'firmware/target/hosted/agptek/debug-agptek.c')
-rw-r--r-- | firmware/target/hosted/agptek/debug-agptek.c | 52 |
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 @@ | |||
1 | #include <stdbool.h> | 1 | /*************************************************************************** |
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2020 by Solomon Peachy | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
2 | 20 | ||
3 | bool debug_hw_info(void) | 21 | #include "config.h" |
22 | #include "font.h" | ||
23 | #include "lcd.h" | ||
24 | #include "kernel.h" | ||
25 | #include "button.h" | ||
26 | |||
27 | #ifndef BOOTLOADER | ||
28 | |||
29 | #include "pcm-alsa.h" | ||
30 | |||
31 | static int line = 0; | ||
32 | |||
33 | bool dbg_hw_info(void) | ||
4 | { | 34 | { |
5 | return false; | 35 | int btn = 0; |
36 | |||
37 | lcd_setfont(FONT_SYSFIXED); | ||
38 | |||
39 | while(btn ^ BUTTON_POWER) { | ||
40 | lcd_clear_display(); | ||
41 | line = 0; | ||
42 | |||
43 | lcd_putsf(0, line++, "pcm srate: %d", pcm_alsa_get_rate()); | ||
44 | btn = button_read_device(); | ||
45 | |||
46 | lcd_update(); | ||
47 | sleep(HZ/16); | ||
48 | } | ||
49 | return true; | ||
6 | } | 50 | } |
51 | |||
52 | #endif /* !BOOTLOADER */ | ||