diff options
| author | Keith Packard <keithp@keithp.com> | 2018-01-07 11:49:09 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2018-01-07 11:49:09 -0800 | 
| commit | ee62272bec67b5784a4ee4e12d8a59677bf9d112 (patch) | |
| tree | 1f31dc00b8cc0c1e11dfe3fb598ec331353af7c4 /src/stmf0/ao_usb_stm.c | |
| parent | 043c5b56ffc2d8171769f6e988eaad6e457bad89 (diff) | |
altos/stmf0: Remove packet counters from non-debug build
These counters are only useful for helping debug the USB driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stmf0/ao_usb_stm.c')
| -rw-r--r-- | src/stmf0/ao_usb_stm.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/src/stmf0/ao_usb_stm.c b/src/stmf0/ao_usb_stm.c index 59aed3aa..0f395123 100644 --- a/src/stmf0/ao_usb_stm.c +++ b/src/stmf0/ao_usb_stm.c @@ -531,11 +531,13 @@ ao_usb_set_configuration(void)  #endif  } +#if USB_STATUS  static uint16_t	control_count;  static uint16_t int_count;  static uint16_t	in_count;  static uint16_t	out_count;  static uint16_t	reset_count; +#endif  /* The USB memory must be accessed in 16-bit units   */ @@ -895,7 +897,9 @@ stm_usb_isr(void)  		switch (ep) {  		case 0: +#if USB_STATUS  			++control_count; +#endif  			if (ao_usb_epr_ctr_rx(epr)) {  				if (ao_usb_epr_setup(epr))  					ao_usb_ep0_receive |= AO_USB_EP0_GOT_SETUP; @@ -907,7 +911,9 @@ stm_usb_isr(void)  			ao_usb_ep0_handle(ao_usb_ep0_receive);  			break;  		case AO_USB_OUT_EPR: +#if USB_STATUS  			++out_count; +#endif  			if (ao_usb_epr_ctr_rx(epr)) {  				_rx_dbg1("RX ISR", epr);  				ao_usb_out_avail = 1; @@ -917,7 +923,9 @@ stm_usb_isr(void)  			}  			break;  		case AO_USB_IN_EPR: +#if USB_STATUS  			++in_count; +#endif  			_tx_dbg1("TX ISR", epr);  			if (ao_usb_epr_ctr_tx(epr)) {  				ao_usb_in_pending = 0; @@ -935,7 +943,9 @@ stm_usb_isr(void)  			break;  #endif  		case AO_USB_INT_EPR: +#if USB_STATUS  			++int_count; +#endif  			if (ao_usb_epr_ctr_tx(epr))  				_ao_usb_set_stat_tx(AO_USB_INT_EPR, STM_USB_EPR_STAT_TX_NAK);  			break; @@ -944,7 +954,9 @@ stm_usb_isr(void)  	}  	if (istr & (1 << STM_USB_ISTR_RESET)) { +#if USB_STATUS  		++reset_count; +#endif  		debug ("\treset\n");  		ao_usb_set_ep0();  	} | 
