mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 04:27:39 +00:00
added flash utility
This commit is contained in:
@@ -36,6 +36,7 @@ inline uint32_t get_free_stack_space(){
|
||||
return stack_space_left;
|
||||
}
|
||||
|
||||
/* Executes a breakpoint only when a debugger is attached. */
|
||||
#define HALT_IF_DEBUGGING() \
|
||||
do { \
|
||||
if ((*(volatile uint32_t *)0xE000EDF0) & (1 << 0)) { \
|
||||
@@ -43,4 +44,9 @@ inline uint32_t get_free_stack_space(){
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Stops execution until a debugger is attached. */
|
||||
#define HALT_UNTIL_DEBUGGING() \
|
||||
while (!((*(volatile uint32_t *)0xE000EDF0) & (1 << 0))) {} \
|
||||
__asm__ __volatile__("bkpt 1")
|
||||
|
||||
#endif/*__DEBUG_H__*/
|
||||
|
Reference in New Issue
Block a user