diff options
Diffstat (limited to 'Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/Core/Src/app_entry.c')
-rw-r--r-- | Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/Core/Src/app_entry.c | 67 |
1 files changed, 3 insertions, 64 deletions
diff --git a/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/Core/Src/app_entry.c b/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/Core/Src/app_entry.c index 67ed3de15..0b4986f8a 100644 --- a/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/Core/Src/app_entry.c +++ b/Projects/P-NUCLEO-WB55.USBDongle/Applications/BLE/BLE_p2pRouteur/Core/Src/app_entry.c @@ -33,7 +33,7 @@ #include "stm32_lpm.h" -#include "dbg_trace.h" +#include "app_debug.h" #include "vcp.h" @@ -56,7 +56,6 @@ static uint8_t VcpTxBuffer[MAX_DBG_TRACE_MSG_SIZE]; /* Transmit buffer over USB /* Global variables ----------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ static void SystemPower_Config( void ); -static void Init_Debug( void ); static void appe_Tl_Init( void ); static void Led_Init( void ); static void Button_Init( void ); @@ -70,7 +69,7 @@ void APPE_Init( void ) HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */ - Init_Debug(); + APPD_Init(); /** * The Standby mode should not be entered before the initialization is over @@ -98,48 +97,6 @@ void APPE_Init( void ) * LOCAL FUNCTIONS * *************************************************************/ -static void Init_Debug( void ) -{ -#if (CFG_DEBUGGER_SUPPORTED == 1) - /** - * Keep debugger enabled while in any low power mode - */ - HAL_DBGMCU_EnableDBGSleepMode(); - - /***************** ENABLE DEBUGGER *************************************/ - LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_48); - LL_C2_EXTI_EnableIT_32_63(LL_EXTI_LINE_48); - -#else - - GPIO_InitTypeDef gpio_config = {0}; - - gpio_config.Pull = GPIO_NOPULL; - gpio_config.Mode = GPIO_MODE_ANALOG; - - gpio_config.Pin = GPIO_PIN_15 | GPIO_PIN_14 | GPIO_PIN_13; - __HAL_RCC_GPIOA_CLK_ENABLE(); - HAL_GPIO_Init(GPIOA, &gpio_config); - __HAL_RCC_GPIOA_CLK_DISABLE(); - - gpio_config.Pin = GPIO_PIN_4 | GPIO_PIN_3; - __HAL_RCC_GPIOB_CLK_ENABLE(); - HAL_GPIO_Init(GPIOB, &gpio_config); - __HAL_RCC_GPIOB_CLK_DISABLE(); - - HAL_DBGMCU_DisableDBGSleepMode(); - HAL_DBGMCU_DisableDBGStopMode(); - HAL_DBGMCU_DisableDBGStandbyMode(); - -#endif /* (CFG_DEBUGGER_SUPPORTED == 1) */ - -#if(CFG_DEBUG_TRACE != 0) - DbgTraceInit(); -#endif - - return; -} - /** * @brief Configure the system for power optimization * @@ -244,7 +201,7 @@ static void APPE_SysStatusNot( SHCI_TL_CmdStatus_t status ) static void APPE_SysUserEvtRx( void * pPayload ) { /**< Traces channel initialization */ - TL_TRACES_Init( ); + APPD_EnableCPU2(); UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_ENABLE); @@ -307,22 +264,4 @@ void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin ) } -#if(CFG_DEBUG_TRACE != 0) -void DbgOutputInit( void ) -{ - VCP_Init( &VcpTxBuffer[0], 0 ); - - return; -} - - -void DbgOutputTraces( uint8_t *p_data, uint16_t size, void (*cb)(void) ) -{ - VCP_SendData ( p_data , size , cb ); - - return; -} -#endif - - /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |