summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/debug-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/debug-imx31.c')
-rw-r--r--firmware/target/arm/imx31/debug-imx31.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/firmware/target/arm/imx31/debug-imx31.c b/firmware/target/arm/imx31/debug-imx31.c
index 7f1c9166d6..94df64b6d7 100644
--- a/firmware/target/arm/imx31/debug-imx31.c
+++ b/firmware/target/arm/imx31/debug-imx31.c
@@ -25,6 +25,7 @@
25#include "font.h" 25#include "font.h"
26#include "debug-target.h" 26#include "debug-target.h"
27#include "mc13783.h" 27#include "mc13783.h"
28#include "adc.h"
28 29
29bool __dbg_hw_info(void) 30bool __dbg_hw_info(void)
30{ 31{
@@ -47,11 +48,6 @@ bool __dbg_ports(void)
47 MC13783_RTC_ALARM, 48 MC13783_RTC_ALARM,
48 MC13783_RTC_DAY, 49 MC13783_RTC_DAY,
49 MC13783_RTC_DAY_ALARM, 50 MC13783_RTC_DAY_ALARM,
50 MC13783_ADC0,
51 MC13783_ADC1,
52 MC13783_ADC2,
53 MC13783_ADC3,
54 MC13783_ADC4,
55 }; 51 };
56 52
57 static const char *pmic_regnames[ARRAYLEN(pmic_regset)] = 53 static const char *pmic_regnames[ARRAYLEN(pmic_regset)] =
@@ -64,11 +60,6 @@ bool __dbg_ports(void)
64 "RTC Alarm ", 60 "RTC Alarm ",
65 "RTC Day ", 61 "RTC Day ",
66 "RTC Day Al", 62 "RTC Day Al",
67 "ADC0 ",
68 "ADC1 ",
69 "ADC2 ",
70 "ADC3 ",
71 "ADC4 ",
72 }; 63 };
73 64
74 uint32_t pmic_regs[ARRAYLEN(pmic_regset)]; 65 uint32_t pmic_regs[ARRAYLEN(pmic_regset)];
@@ -132,6 +123,21 @@ bool __dbg_ports(void)
132 lcd_puts(0, line++, buf); 123 lcd_puts(0, line++, buf);
133 } 124 }
134 125
126 line++;
127
128 lcd_puts(0, line++, "ADC"); line++;
129
130 for (i = 0; i < NUM_ADC_CHANNELS; i += 4)
131 {
132 snprintf(buf, sizeof(buf),
133 "CH%02d:%04u CH%02d:%04u CH%02d:%04u CH%02d:%04u",
134 i+0, adc_read(i+0),
135 i+1, adc_read(i+1),
136 i+2, adc_read(i+2),
137 i+3, adc_read(i+3));
138 lcd_puts(0, line++, buf);
139 }
140
135 lcd_update(); 141 lcd_update();
136 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL)) 142 if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
137 return false; 143 return false;