EFM32 Gecko Software Documentation  efm32g-doc-5.1.2
em_dbg.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef EM_DBG_H
35 #define EM_DBG_H
36 
37 #include <stdbool.h>
38 #include "em_device.h"
39 
40 #if defined( CoreDebug_DHCSR_C_DEBUGEN_Msk )
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /***************************************************************************/
51 /***************************************************************************/
56 /*******************************************************************************
57  ***************************** PROTOTYPES **********************************
58  ******************************************************************************/
59 
60 #if defined( GPIO_ROUTE_SWCLKPEN ) || defined( GPIO_ROUTEPEN_SWCLKTCKPEN )
61 /***************************************************************************/
73 __STATIC_INLINE bool DBG_Connected(void)
74 {
75  return (CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) ? true : false;
76 }
77 #endif
78 
79 
80 #if defined( GPIO_ROUTE_SWOPEN ) || defined( GPIO_ROUTEPEN_SWVPEN )
81 void DBG_SWOEnable(unsigned int location);
82 #endif
83 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* defined( CoreDebug_DHCSR_C_DEBUGEN_Msk ) */
92 
93 #endif /* EM_DBG_H */
void DBG_SWOEnable(unsigned int location)
Enable Serial Wire Output (SWO) pin.
Definition: em_dbg.c:92
__STATIC_INLINE bool DBG_Connected(void)
Check if a debugger is connected (and debug session activated)
Definition: em_dbg.h:73
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.