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