add verify_breakpoint hw independence

This commit is contained in:
hathach
2018-03-28 15:23:33 +07:00
parent 03a4f02b89
commit ccf6f03817
7 changed files with 26 additions and 37 deletions

View File

@@ -69,18 +69,6 @@ uint32_t tusb_hal_tick_get(void)
#endif
void tusb_hal_dbg_breakpoint(void)
{
// M0 cannot check if debugger is attached or not
#if defined(__CORTEX_M) && (__CORTEX_M > 0)
// check if debugger is attached
if ( (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) == CoreDebug_DHCSR_C_DEBUGEN_Msk)
{
__asm("BKPT #0\n");
}
#endif
}
void tusb_hal_int_enable(uint8_t rhport)
{
NVIC_EnableIRQ(rhport ? USB1_IRQn : USB0_IRQn);