From 5227ca4ce2be126b118a900e9242c813fef5e6bf Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 21 Mar 2010 12:21:13 +0000 Subject: Double bank CDC endpoints in the XPLAIN Bridge project, re-enable JTAG once the mode selection pin has been sampled. --- Projects/XPLAINBridge/XPLAINBridge.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Projects/XPLAINBridge') diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 13752ef82..e5b282ee5 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -51,11 +51,11 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface = .DataINEndpointNumber = CDC_TX_EPNUM, .DataINEndpointSize = CDC_TXRX_EPSIZE, - .DataINEndpointDoubleBank = false, + .DataINEndpointDoubleBank = true, .DataOUTEndpointNumber = CDC_RX_EPNUM, .DataOUTEndpointSize = CDC_TXRX_EPSIZE, - .DataOUTEndpointDoubleBank = false, + .DataOUTEndpointDoubleBank = true, .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, @@ -169,6 +169,10 @@ void SetupHardware(void) /* Select the firmware mode based on the JTD pin's value */ CurrentFirmwareMode = (PINF & (1 << 7)) ? MODE_USART_BRIDGE : MODE_PDI_PROGRAMMER; + + /* Re-enable JTAG debugging */ + MCUCR &= ~(1 << JTD); + MCUCR &= ~(1 << JTD); } /** Event handler for the library USB Configuration Changed event. */ -- cgit v1.2.3