add tud_set_descriptors
This commit is contained in:
@@ -71,14 +71,11 @@
|
||||
// Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7
|
||||
#if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
|
||||
|
||||
static inline void verify_breakpoint(void)
|
||||
{
|
||||
// Cortex M CoreDebug->DHCSR
|
||||
volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL);
|
||||
|
||||
// Only halt mcu if debugger is attached
|
||||
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n");
|
||||
}
|
||||
#define verify_breakpoint() \
|
||||
do {\
|
||||
volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \
|
||||
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */\
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
#define verify_breakpoint()
|
||||
|
||||
Reference in New Issue
Block a user