From 4451f7b6bade66775a197b93c6e70ba15f1826ce Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 6 May 2018 21:11:48 -0700 Subject: [PATCH] altos/stmf0: Fix up USB debug code At least make it compile. In this configuration, it's dumping out IN3 endpoint register values. Signed-off-by: Keith Packard --- src/stmf0/ao_usb_stm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/stmf0/ao_usb_stm.c b/src/stmf0/ao_usb_stm.c index a99b4cff..c4860d8e 100644 --- a/src/stmf0/ao_usb_stm.c +++ b/src/stmf0/ao_usb_stm.c @@ -1689,9 +1689,9 @@ struct ao_usb_dbg { #endif }; -#define NUM_USB_DBG 128 +#define NUM_USB_DBG 16 -struct ao_usb_dbg dbg[128]; +struct ao_usb_dbg dbg[NUM_USB_DBG]; int dbg_i; static void _dbg(int line, char *msg, uint32_t value) @@ -1703,11 +1703,11 @@ static void _dbg(int line, char *msg, uint32_t value) asm("mrs %0,primask" : "=&r" (primask)); dbg[dbg_i].primask = primask; #if TX_DBG - dbg[dbg_i].in_count = in_count; - dbg[dbg_i].in_epr = stm_usb.epr[AO_USB_IN_EPR]; - dbg[dbg_i].in_pending = ao_usb_in_pending; - dbg[dbg_i].tx_count = ao_usb_tx_count; - dbg[dbg_i].in_flushed = ao_usb_in_flushed; + dbg[dbg_i].in_count = in3_count; + dbg[dbg_i].in_epr = stm_usb.epr[AO_USB_IN3_EPR].r; + dbg[dbg_i].in_pending = ao_usb_in3_pending; + dbg[dbg_i].tx_count = ao_usb_tx3_count; + dbg[dbg_i].in_flushed = ao_usb_in3_flushed; #endif #if RX_DBG dbg[dbg_i].rx_count = ao_usb_rx_count; -- 2.30.2