altos: Shrink help text
[fw/altos] / src / ao_dbg.c
index e7fbd7ad8d207c709997d9b02c3dfac2311cc1dd..14a123a274fce2e8a71c48840d1279c7e0df2b5c 100644 (file)
@@ -164,6 +164,12 @@ ao_dbg_read_byte(void)
 static void
 ao_dbg_set_pins(void)
 {
+       /* Make the DBG pins GPIOs. On TeleMetrum, this will
+        * disable the SPI link, so don't expect SPI to work after
+        * using the debugger.
+        */
+       DBG_PORT_SEL &= ~(DBG_CLOCK|DBG_DATA|DBG_RESET_N);
+
        /* make DBG_DATA tri-state */
        DBG_PORT_INP |= DBG_DATA;
 
@@ -342,13 +348,13 @@ debug_output(void)
 }
 
 __code struct ao_cmds ao_dbg_cmds[7] = {
-       { 'D',  debug_enable,   "D                                  Enable debug mode" },
-       { 'G',  debug_get,      "G <count>                          Get data from debug port" },
-       { 'I',  debug_input,    "I <count> <addr>                   Input <count> bytes to target at <addr>" },
-       { 'O',  debug_output,   "O <count> <addr>                   Output <count> bytes to target at <addr>" },
-       { 'P',  debug_put,      "P <byte> ...                       Put data to debug port" },
-       { 'R',  debug_reset,    "R                                  Reset target" },
-       { 0, debug_reset,       0 },
+       { debug_enable, "D\0Enable debug" },
+       { debug_get,    "G <count>\0Get data" },
+       { debug_input,  "I <count> <addr>\0Input <count> at <addr>" },
+       { debug_output, "O <count> <addr>\0Output <count> at <addr>" },
+       { debug_put,    "P <byte> ...\0Put data" },
+       { debug_reset,  "R\0Reset" },
+       { 0, NULL },
 };
 
 void