fft
Dependencies: BSP_DISCO_F746NG SDFileSystem_Warning_Fixed
mbed_src_STM32F7/hal/sleep_api.h@0:3e46577dc273, 2016-10-09 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Sun Oct 09 10:11:14 2016 +0000
- Revision:
- 0:3e46577dc273
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 0:3e46577dc273 | 1 | /* mbed Microcontroller Library |
MikamiUitOpen | 0:3e46577dc273 | 2 | * Copyright (c) 2006-2013 ARM Limited |
MikamiUitOpen | 0:3e46577dc273 | 3 | * |
MikamiUitOpen | 0:3e46577dc273 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
MikamiUitOpen | 0:3e46577dc273 | 5 | * you may not use this file except in compliance with the License. |
MikamiUitOpen | 0:3e46577dc273 | 6 | * You may obtain a copy of the License at |
MikamiUitOpen | 0:3e46577dc273 | 7 | * |
MikamiUitOpen | 0:3e46577dc273 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
MikamiUitOpen | 0:3e46577dc273 | 9 | * |
MikamiUitOpen | 0:3e46577dc273 | 10 | * Unless required by applicable law or agreed to in writing, software |
MikamiUitOpen | 0:3e46577dc273 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
MikamiUitOpen | 0:3e46577dc273 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
MikamiUitOpen | 0:3e46577dc273 | 13 | * See the License for the specific language governing permissions and |
MikamiUitOpen | 0:3e46577dc273 | 14 | * limitations under the License. |
MikamiUitOpen | 0:3e46577dc273 | 15 | */ |
MikamiUitOpen | 0:3e46577dc273 | 16 | #ifndef MBED_SLEEP_API_H |
MikamiUitOpen | 0:3e46577dc273 | 17 | #define MBED_SLEEP_API_H |
MikamiUitOpen | 0:3e46577dc273 | 18 | |
MikamiUitOpen | 0:3e46577dc273 | 19 | #include "device.h" |
MikamiUitOpen | 0:3e46577dc273 | 20 | |
MikamiUitOpen | 0:3e46577dc273 | 21 | #if DEVICE_SLEEP |
MikamiUitOpen | 0:3e46577dc273 | 22 | |
MikamiUitOpen | 0:3e46577dc273 | 23 | #ifdef __cplusplus |
MikamiUitOpen | 0:3e46577dc273 | 24 | extern "C" { |
MikamiUitOpen | 0:3e46577dc273 | 25 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 26 | |
MikamiUitOpen | 0:3e46577dc273 | 27 | /** Send the microcontroller to sleep |
MikamiUitOpen | 0:3e46577dc273 | 28 | * |
MikamiUitOpen | 0:3e46577dc273 | 29 | * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the |
MikamiUitOpen | 0:3e46577dc273 | 30 | * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates |
MikamiUitOpen | 0:3e46577dc273 | 31 | * dynamic power used by the processor, memory systems and buses. The processor, peripheral and |
MikamiUitOpen | 0:3e46577dc273 | 32 | * memory state are maintained, and the peripherals continue to work and can generate interrupts. |
MikamiUitOpen | 0:3e46577dc273 | 33 | * |
MikamiUitOpen | 0:3e46577dc273 | 34 | * The processor can be woken up by any internal peripheral interrupt or external pin interrupt. |
MikamiUitOpen | 0:3e46577dc273 | 35 | * |
MikamiUitOpen | 0:3e46577dc273 | 36 | * @note |
MikamiUitOpen | 0:3e46577dc273 | 37 | * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored. |
MikamiUitOpen | 0:3e46577dc273 | 38 | * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be |
MikamiUitOpen | 0:3e46577dc273 | 39 | * able to access the LocalFileSystem |
MikamiUitOpen | 0:3e46577dc273 | 40 | */ |
MikamiUitOpen | 0:3e46577dc273 | 41 | void sleep(void); |
MikamiUitOpen | 0:3e46577dc273 | 42 | |
MikamiUitOpen | 0:3e46577dc273 | 43 | /** Send the microcontroller to deep sleep |
MikamiUitOpen | 0:3e46577dc273 | 44 | * |
MikamiUitOpen | 0:3e46577dc273 | 45 | * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode |
MikamiUitOpen | 0:3e46577dc273 | 46 | * has the same sleep features as sleep plus it powers down peripherals and clocks. All state |
MikamiUitOpen | 0:3e46577dc273 | 47 | * is still maintained. |
MikamiUitOpen | 0:3e46577dc273 | 48 | * |
MikamiUitOpen | 0:3e46577dc273 | 49 | * The processor can only be woken up by an external interrupt on a pin or a watchdog timer. |
MikamiUitOpen | 0:3e46577dc273 | 50 | * |
MikamiUitOpen | 0:3e46577dc273 | 51 | * @note |
MikamiUitOpen | 0:3e46577dc273 | 52 | * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored. |
MikamiUitOpen | 0:3e46577dc273 | 53 | * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be |
MikamiUitOpen | 0:3e46577dc273 | 54 | * able to access the LocalFileSystem |
MikamiUitOpen | 0:3e46577dc273 | 55 | */ |
MikamiUitOpen | 0:3e46577dc273 | 56 | void deepsleep(void); |
MikamiUitOpen | 0:3e46577dc273 | 57 | |
MikamiUitOpen | 0:3e46577dc273 | 58 | #ifdef __cplusplus |
MikamiUitOpen | 0:3e46577dc273 | 59 | } |
MikamiUitOpen | 0:3e46577dc273 | 60 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 61 | |
MikamiUitOpen | 0:3e46577dc273 | 62 | #endif |
MikamiUitOpen | 0:3e46577dc273 | 63 | |
MikamiUitOpen | 0:3e46577dc273 | 64 | #endif |