em_dbg.h

Go to the documentation of this file.
00001 /***************************************************************************/
00034 #ifndef __SILICON_LABS_EM_DBG_H_
00035 #define __SILICON_LABS_EM_DBG_H_
00036 
00037 #include <stdbool.h>
00038 #include "em_device.h"
00039 
00040 #if defined ( CoreDebug_DHCSR_C_DEBUGEN_Msk )
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 /***************************************************************************/
00051 /***************************************************************************/
00056 /*******************************************************************************
00057  *****************************   PROTOTYPES   **********************************
00058  ******************************************************************************/
00059 
00060 #if defined( GPIO_ROUTE_SWCLKPEN )
00061 /***************************************************************************/
00073 __STATIC_INLINE bool DBG_Connected(void)
00074 {
00075   return ((CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) ? true : false);
00076 }
00077 #endif
00078 
00079 
00080 #if defined( GPIO_ROUTE_SWOPEN )
00081 void DBG_SWOEnable(unsigned int location);
00082 #endif
00083 
00087 #ifdef __cplusplus
00088 }
00089 #endif
00090 
00091 #endif /* defined ( CoreDebug_DHCSR_C_DEBUGEN_Msk ) */
00092 
00093 #endif /* __SILICON_LABS_EM_DBG_H_ */