The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NCS36510/TOOLCHAIN_IAR/fncs36510_sleep.h@172:65be27845400, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 20:53:29 2019 +0000
- Revision:
- 172:65be27845400
- Parent:
- 171:3a7713b1edbc
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 171:3a7713b1edbc | 1 | /** |
AnnaBridge | 171:3a7713b1edbc | 2 | ******************************************************************************* |
AnnaBridge | 171:3a7713b1edbc | 3 | * @file sleep.c |
AnnaBridge | 171:3a7713b1edbc | 4 | * @brief Implementation of a sleep functionality |
AnnaBridge | 171:3a7713b1edbc | 5 | * @internal |
AnnaBridge | 171:3a7713b1edbc | 6 | * @author ON Semiconductor |
AnnaBridge | 171:3a7713b1edbc | 7 | * $Rev: $ |
AnnaBridge | 171:3a7713b1edbc | 8 | * $Date: $ |
AnnaBridge | 171:3a7713b1edbc | 9 | ****************************************************************************** |
AnnaBridge | 171:3a7713b1edbc | 10 | * Copyright 2016 Semiconductor Components Industries LLC (d/b/a ON Semiconductor). |
AnnaBridge | 171:3a7713b1edbc | 11 | * All rights reserved. This software and/or documentation is licensed by ON Semiconductor |
AnnaBridge | 171:3a7713b1edbc | 12 | * under limited terms and conditions. The terms and conditions pertaining to the software |
AnnaBridge | 171:3a7713b1edbc | 13 | * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf |
AnnaBridge | 171:3a7713b1edbc | 14 | * (ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software) and |
AnnaBridge | 171:3a7713b1edbc | 15 | * if applicable the software license agreement. Do not use this software and/or |
AnnaBridge | 171:3a7713b1edbc | 16 | * documentation unless you have carefully read and you agree to the limited terms and |
AnnaBridge | 171:3a7713b1edbc | 17 | * conditions. By using this software and/or documentation, you agree to the limited |
AnnaBridge | 171:3a7713b1edbc | 18 | * terms and conditions. |
AnnaBridge | 171:3a7713b1edbc | 19 | * |
AnnaBridge | 171:3a7713b1edbc | 20 | * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
AnnaBridge | 171:3a7713b1edbc | 21 | * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
AnnaBridge | 171:3a7713b1edbc | 22 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
AnnaBridge | 171:3a7713b1edbc | 23 | * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, |
AnnaBridge | 171:3a7713b1edbc | 24 | * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
AnnaBridge | 171:3a7713b1edbc | 25 | * @endinternal |
AnnaBridge | 171:3a7713b1edbc | 26 | * |
AnnaBridge | 171:3a7713b1edbc | 27 | * @ingroup sleep |
AnnaBridge | 171:3a7713b1edbc | 28 | * |
AnnaBridge | 171:3a7713b1edbc | 29 | * @details |
AnnaBridge | 171:3a7713b1edbc | 30 | * Sleep implementation TBD - Dummy function is fine for first release |
AnnaBridge | 171:3a7713b1edbc | 31 | * |
AnnaBridge | 171:3a7713b1edbc | 32 | */ |
AnnaBridge | 171:3a7713b1edbc | 33 | |
AnnaBridge | 171:3a7713b1edbc | 34 | #ifndef SLEEP_H_ |
AnnaBridge | 171:3a7713b1edbc | 35 | #define SLEEP_H_ |
AnnaBridge | 171:3a7713b1edbc | 36 | |
AnnaBridge | 171:3a7713b1edbc | 37 | /* Orion specific includes */ |
AnnaBridge | 171:3a7713b1edbc | 38 | #include "types.h" |
AnnaBridge | 171:3a7713b1edbc | 39 | #include "memory_map.h" |
AnnaBridge | 171:3a7713b1edbc | 40 | #include "gpio_map.h" |
AnnaBridge | 171:3a7713b1edbc | 41 | #include "pad_map.h" |
AnnaBridge | 171:3a7713b1edbc | 42 | #include "crossbar.h" |
AnnaBridge | 171:3a7713b1edbc | 43 | #include "clock.h" |
AnnaBridge | 171:3a7713b1edbc | 44 | |
AnnaBridge | 171:3a7713b1edbc | 45 | #define SLEEP_TYPE_NONE 0 |
AnnaBridge | 171:3a7713b1edbc | 46 | #define SLEEP_TYPE_SLEEP 1 |
AnnaBridge | 171:3a7713b1edbc | 47 | #define SLEEP_TYPE_DEEPSLEEP 2 |
AnnaBridge | 171:3a7713b1edbc | 48 | #define SLEEP_TYPE_COMA 3 |
AnnaBridge | 171:3a7713b1edbc | 49 | |
AnnaBridge | 171:3a7713b1edbc | 50 | #define SLEEP_TYPE_DEFAULT SLEEP_TYPE_DEEPSLEEP |
AnnaBridge | 171:3a7713b1edbc | 51 | |
AnnaBridge | 171:3a7713b1edbc | 52 | #define SLEEP_DURATION_SLEEP_MIN 10 /* msec */ |
AnnaBridge | 171:3a7713b1edbc | 53 | #define SLEEP_DURATION_SLEEP_MAX 200 /* msec */ |
AnnaBridge | 171:3a7713b1edbc | 54 | #define SLEEP_DURATION_DEEPSLEEP_MAX 500 /* msec */ |
AnnaBridge | 171:3a7713b1edbc | 55 | #define SLEEP_DURATION_COMA_MAX 1000000000 /* TODO 1000 sec */ |
AnnaBridge | 171:3a7713b1edbc | 56 | |
AnnaBridge | 171:3a7713b1edbc | 57 | void fncs36510_sleep(void); |
AnnaBridge | 171:3a7713b1edbc | 58 | |
AnnaBridge | 171:3a7713b1edbc | 59 | void fncs36510_deepsleep(void); |
AnnaBridge | 171:3a7713b1edbc | 60 | |
AnnaBridge | 171:3a7713b1edbc | 61 | void fncs36510_coma(void); |
AnnaBridge | 171:3a7713b1edbc | 62 | |
AnnaBridge | 171:3a7713b1edbc | 63 | #endif // SLEEP_H_ |