diff options
Diffstat (limited to 'core/cortex-m/debug.c')
-rw-r--r-- | core/cortex-m/debug.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/cortex-m/debug.c b/core/cortex-m/debug.c new file mode 100644 index 0000000000..db8891b5d8 --- /dev/null +++ b/core/cortex-m/debug.c @@ -0,0 +1,12 @@ +/* Copyright 2021 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "debug.h" +#include "stdbool.h" + +bool debugger_is_connected(void) +{ + return CPU_DHCSR & DHCSR_C_DEBUGEN; +} |