pro vyuku PSS v Jecne

Committer:
vladvana
Date:
Sun Sep 24 12:31:52 2017 +0000
Revision:
0:23d1f73bf130
podklady pro cviceni z PSS

Who changed what in which revision?

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