Mangue Baja Box

Dependencies:   mbed

Committer:
einsteingustavo
Date:
Mon Jul 29 20:38:00 2019 +0000
Revision:
0:0dee8840a1c0
Mangue Baja Box

Who changed what in which revision?

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