]>
git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/hal/sleep_api.h
1 /* mbed Microcontroller Library
2 * Copyright (c) 2006-2013 ARM Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef MBED_SLEEP_API_H
17 #define MBED_SLEEP_API_H
27 /** Send the microcontroller to sleep
29 * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
30 * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates
31 * dynamic power used by the processor, memory systems and buses. The processor, peripheral and
32 * memory state are maintained, and the peripherals continue to work and can generate interrupts.
34 * The processor can be woken up by any internal peripheral interrupt or external pin interrupt.
37 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
38 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
39 * able to access the LocalFileSystem
43 /** Send the microcontroller to deep sleep
45 * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
46 * has the same sleep features as sleep plus it powers down peripherals and clocks. All state
47 * is still maintained.
49 * The processor can only be woken up by an external interrupt on a pin or a watchdog timer.
52 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
53 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
54 * able to access the LocalFileSystem