mbed library sources
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_STM32F0/sleep.c
- Revision:
- 630:825f75ca301e
- Parent:
- 469:fc4922e0c183
--- a/targets/hal/TARGET_STM/TARGET_STM32F0/sleep.c Mon Sep 28 10:30:09 2015 +0100 +++ b/targets/hal/TARGET_STM/TARGET_STM32F0/sleep.c Mon Sep 28 10:45:10 2015 +0100 @@ -1,6 +1,6 @@ /* mbed Microcontroller Library ******************************************************************************* - * Copyright (c) 2014, STMicroelectronics + * Copyright (c) 2015, STMicroelectronics * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,8 +34,7 @@ #include "cmsis.h" #if defined(TARGET_STM32F070RB) -void sleep(void) -{ +void sleep(void) { TIM_HandleTypeDef TimMasterHandle; TimMasterHandle.Instance = TIM1; @@ -51,8 +50,7 @@ } #elif defined(TARGET_STM32F030R8) || defined (TARGET_STM32F051R8) -void sleep(void) -{ +void sleep(void) { // Stop HAL systick HAL_SuspendTick(); // Request to enter SLEEP mode @@ -64,8 +62,7 @@ #else static TIM_HandleTypeDef TimMasterHandle; -void sleep(void) -{ +void sleep(void) { TimMasterHandle.Instance = TIM2; // Disable HAL tick interrupt @@ -80,8 +77,7 @@ #endif #if defined(TARGET_STM32F030R8) || defined (TARGET_STM32F051R8) -void deepsleep(void) -{ +void deepsleep(void) { // Request to enter STOP mode with regulator in low power mode HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); @@ -94,8 +90,7 @@ } #else -void deepsleep(void) -{ +void deepsleep(void) { // Request to enter STOP mode with regulator in low power mode HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);