added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
Diff: targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/emlib/src/em_dbg.c
- Revision:
- 50:a417edff4437
- Parent:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
diff -r 57ac6e3cdfd3 -r a417edff4437 targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/emlib/src/em_dbg.c --- a/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/emlib/src/em_dbg.c Wed Jan 13 12:45:11 2016 +0000 +++ b/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/emlib/src/em_dbg.c Fri Jan 15 07:45:16 2016 +0000 @@ -1,10 +1,10 @@ /***************************************************************************//** * @file em_dbg.c * @brief Debug (DBG) Peripheral API - * @version 3.20.12 + * @version 4.2.1 ******************************************************************************* * @section License - * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b> + * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b> ******************************************************************************* * * Permission is granted to anyone to use this software for any purpose, @@ -32,7 +32,7 @@ #include "em_dbg.h" -#if defined ( CoreDebug_DHCSR_C_DEBUGEN_Msk ) +#if defined( CoreDebug_DHCSR_C_DEBUGEN_Msk ) #include "em_assert.h" #include "em_cmu.h" @@ -53,7 +53,7 @@ ************************** GLOBAL FUNCTIONS ******************************* ******************************************************************************/ -#if defined( GPIO_ROUTE_SWOPEN ) +#if defined( GPIO_ROUTE_SWOPEN ) || defined( GPIO_ROUTEPEN_SWVPEN ) /***************************************************************************//** * @brief * Enable Serial Wire Output (SWO) pin. @@ -92,8 +92,15 @@ EFM_ASSERT(location < AFCHANLOC_MAX); +#if defined ( AF_DBG_SWO_PORT ) port = AF_DBG_SWO_PORT(location); pin = AF_DBG_SWO_PIN(location); +#elif defined (AF_DBG_SWV_PORT ) + port = AF_DBG_SWV_PORT(location); + pin = AF_DBG_SWV_PIN(location); +#else +#warning "AF debug port is not defined." +#endif /* Port/pin location not defined for device? */ if ((pin < 0) || (port < 0)) @@ -116,4 +123,4 @@ /** @} (end addtogroup DBG) */ /** @} (end addtogroup EM_Library) */ -#endif /* defined ( CoreDebug_DHCSR_C_DEBUGEN_Msk ) */ +#endif /* defined( CoreDebug_DHCSR_C_DEBUGEN_Msk ) */