Merge pull request #171 from gsmcmullin/v2_usb_uart_check
Don't enable usb uart on v2 when debugging
This commit is contained in:
commit
b745799156
|
@ -164,7 +164,12 @@ void platform_init(void)
|
|||
|
||||
platform_timing_init();
|
||||
cdcacm_init();
|
||||
usbuart_init();
|
||||
|
||||
/* On mini hardware, UART and SWD share connector pins.
|
||||
* Don't enable UART if we're being debugged. */
|
||||
if ((platform_hwversion() == 0) || !(SCS_DEMCR & SCS_DEMCR_TRCENA))
|
||||
usbuart_init();
|
||||
|
||||
setup_vbus_irq();
|
||||
}
|
||||
|
||||
|
@ -347,4 +352,3 @@ asm(".globl debug_monitor_handler\n"
|
|||
" b debug_monitor_handler_c\n");
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -46,13 +46,6 @@ static void usbuart_run(void);
|
|||
|
||||
void usbuart_init(void)
|
||||
{
|
||||
#if defined(BLACKMAGIC)
|
||||
/* On mini hardware, UART and SWD share connector pins.
|
||||
* Don't enable UART if we're being debugged. */
|
||||
if ((platform_hwversion() == 1) && (SCS_DEMCR & SCS_DEMCR_TRCENA))
|
||||
return;
|
||||
#endif
|
||||
|
||||
rcc_periph_clock_enable(USBUSART_CLK);
|
||||
|
||||
UART_PIN_SETUP();
|
||||
|
@ -257,4 +250,3 @@ void USBUSART_TIM_ISR(void)
|
|||
/* process FIFO */
|
||||
usbuart_run();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue