1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff --git a/firmware/target/arm/as3525/ascodec-target.h b/firmware/target/arm/as3525/ascodec-target.h
index 3794754..87abc7a 100644
--- a/firmware/target/arm/as3525/ascodec-target.h
+++ b/firmware/target/arm/as3525/ascodec-target.h
@@ -55,7 +55,7 @@
  * We don't actually use more than 2 at the moment (in adc_read).
  * Upper limit would be 255 since DACNT is 8 bits!
  */
-#define ASCODEC_REQ_MAXLEN 4
+#define ASCODEC_REQ_MAXLEN 64

 typedef void (ascodec_cb_fn)(unsigned const char *data, unsigned cnt);

diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
index 75cce72..8c92d6a 100644
--- a/firmware/target/arm/as3525/debug-as3525.c
+++ b/firmware/target/arm/as3525/debug-as3525.c
@@ -437,22 +437,24 @@ bool __dbg_ports(void)
     lcd_clear_display();
     lcd_setfont(FONT_SYSFIXED);

+    unsigned char regs[64];
+    if(ascodec_readbytes(0, 64, regs) != 64)
+        panicf("couldn't read all regs!");
+
     while(1)
     {
         line = 0;
-        lcd_puts(0, line++, "[GPIO Values and Directions]");
-        lcd_putsf(0, line++, "GPIOA: %2x DIR: %2x", GPIOA_DATA, GPIOA_DIR);
-        lcd_putsf(0, line++, "GPIOB: %2x DIR: %2x", GPIOB_DATA, GPIOB_DIR);
-        lcd_putsf(0, line++, "GPIOC: %2x DIR: %2x", GPIOC_DATA, GPIOC_DIR);
-        lcd_putsf(0, line++, "GPIOD: %2x DIR: %2x", GPIOD_DATA, GPIOD_DIR);
-#ifdef DEBUG_DBOP
-        line++;
-        lcd_puts(0, line++, "[DBOP_DIN]");
-        lcd_putsf(0, line++, "DBOP_DIN: %4x", dbop_debug());
+        int i = 0;
+        for(i=0; i<8; i++)
+            lcd_putsf(0, line++,
+#if LCD_WIDTH > 128
+                "%2x %2x %2x %2x %2x %2x %2x %2x",
+#else
+                "%2x %2x %2x %2x %2x %2x%2x%2x",
 #endif
-        line++;
-        lcd_puts(0, line++, "[CP15]");
-        lcd_putsf(0, line++, "CP15: 0x%8x", read_cp15());
+                regs[8*i+0], regs[8*i+1], regs[8*i+2], regs[8*i+3],
+                regs[8*i+4], regs[8*i+5], regs[8*i+6], regs[8*i+7]
+            );
         lcd_update();
         if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))
             break;