diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/imx233/debug-imx233.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c index afdc6d0565..d4f5170f7e 100644 --- a/firmware/target/arm/imx233/debug-imx233.c +++ b/firmware/target/arm/imx233/debug-imx233.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include "action.h" | 25 | #include "action.h" |
26 | #include "lcd.h" | 26 | #include "lcd.h" |
27 | #include "font.h" | 27 | #include "font.h" |
28 | #include "adc.h" | ||
29 | #include "adc-imx233.h" | ||
28 | 30 | ||
29 | static struct | 31 | static struct |
30 | { | 32 | { |
@@ -78,9 +80,42 @@ bool dbg_hw_info_dma(void) | |||
78 | } | 80 | } |
79 | } | 81 | } |
80 | 82 | ||
83 | bool dbg_hw_info_adc(void) | ||
84 | { | ||
85 | lcd_setfont(FONT_SYSFIXED); | ||
86 | |||
87 | while(1) | ||
88 | { | ||
89 | int button = get_action(CONTEXT_STD, HZ / 25); | ||
90 | switch(button) | ||
91 | { | ||
92 | case ACTION_STD_NEXT: | ||
93 | case ACTION_STD_PREV: | ||
94 | case ACTION_STD_OK: | ||
95 | case ACTION_STD_MENU: | ||
96 | lcd_setfont(FONT_UI); | ||
97 | return true; | ||
98 | case ACTION_STD_CANCEL: | ||
99 | lcd_setfont(FONT_UI); | ||
100 | return false; | ||
101 | } | ||
102 | |||
103 | lcd_clear_display(); | ||
104 | |||
105 | for(unsigned i = 0; i < NUM_ADC_CHANNELS; i++) | ||
106 | { | ||
107 | lcd_putsf(0, i, "%s %d", imx233_adc_channel_name[i], | ||
108 | adc_read(i)); | ||
109 | } | ||
110 | |||
111 | lcd_update(); | ||
112 | yield(); | ||
113 | } | ||
114 | } | ||
115 | |||
81 | bool dbg_hw_info(void) | 116 | bool dbg_hw_info(void) |
82 | { | 117 | { |
83 | return dbg_hw_info_dma() && dbg_hw_target_info(); | 118 | return dbg_hw_info_dma() && dbg_hw_info_adc() && dbg_hw_target_info(); |
84 | } | 119 | } |
85 | 120 | ||
86 | bool dbg_ports(void) | 121 | bool dbg_ports(void) |