Knight KE / Mbed OS Game_Master
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sleep_api_tests.h Source File

sleep_api_tests.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2017 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /** \addtogroup hal_sleep_tests */
00018 /** @{*/
00019 
00020 #ifndef MBED_SLEEP_API_TESTS_H
00021 #define MBED_SLEEP_API_TESTS_H
00022 
00023 #include "device.h"
00024 
00025 #if DEVICE_SLEEP
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 /** High frequency ticker interrupt can wake up from sleep (locked deep-sleep).
00032  *
00033  *  Given is an environment with high frequency ticker.
00034  *  When the board enters sleep mode.
00035  *  Then the board can be wake up from the sleep by high frequency ticker interrupt and
00036  *  wake-up time should be less than 10 us.
00037  */
00038 void sleep_usticker_test();
00039 
00040 /** Low power ticker interrupt to wake up from deep-sleep (unlocked deep-sleep).
00041  *
00042  *  Given is an environment with low power ticker.
00043  *  When the board enters deep-sleep mode.
00044  *  Then the board can be wake up from the sleep by low power ticker interrupt and
00045  *  wake-up time should be less than 10 ms.
00046  *
00047  */
00048 void deepsleep_lpticker_test();
00049 
00050 /** High speed clocks are turned off in deep-sleep (unlocked deep-sleep)
00051  *
00052  *  Given is an environment with high frequency ticker.
00053  *  When the board enters deep-sleep mode.
00054  *  Then high frequency ticker does not count while the board is in the deep-sleep mode.
00055  *
00056  */
00057 void deepsleep_high_speed_clocks_turned_off_test();
00058 
00059 /**@}*/
00060 
00061 #ifdef __cplusplus
00062 }
00063 #endif
00064 
00065 #endif
00066 
00067 #endif
00068 
00069 /**@}*/