Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
net_sleep.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (c) 2014-2016 ARM Limited. All rights reserved. 00003 * 00004 * SPDX-License-Identifier: LicenseRef-PBL 00005 * 00006 * Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * https://www.mbed.com/licenses/PBL-1.0 00010 * 00011 * See the License for the specific language governing permissions and limitations under the License. 00012 * 00013 */ 00014 00015 #ifndef NET_SLEEP_H_ 00016 #define NET_SLEEP_H_ 00017 00018 #include "ns_types.h" 00019 00020 /** 00021 * \file net_sleep.h 00022 * \brief Checks if there is a sleep possibility for the stack and the max sleep time. 00023 * 00024 * \section check-slp-poss Checking sleep possibility. 00025 * - arm_net_check_enter_deep_sleep_possibility(), Checks whether the stack can enter a sleep cycle. 00026 * - arm_net_enter_sleep(), A function to enter sleep cycle. 00027 * - arm_net_wakeup_and_timer_synch(), Restarts the stack and synchronizes the timer. 00028 */ 00029 00030 /** 00031 *\brief Check sleep possibility. 00032 * \return Time in milliseconds for sleep. 00033 * \return 0, No possibility to enter deep sleep. 00034 */ 00035 uint32_t arm_net_check_enter_deep_sleep_possibility(void); 00036 00037 /** 00038 * \brief Set stack to sleep. 00039 * 00040 * \return 0 Stack stopped. 00041 * \return -1 Not supported action at the moment. 00042 * 00043 */ 00044 00045 int arm_net_enter_sleep(void); 00046 /** 00047 * \brief Restart stack after sleep. 00048 * 00049 * Stack enable and synch timers after sleep. 00050 * 00051 * \param sleeped_time_in_ms The total sleep time in milliseconds. The stack needs to synch with this. 00052 * 00053 * \return 0 Stack restarted. 00054 * \return 1 Stack can continue sleep for the time defined in sleeped_time_in_ms. 00055 * \return -1 Stack already active. 00056 * 00057 */ 00058 int arm_net_wakeup_and_timer_synch(uint32_t sleeped_time_in_ms); 00059 00060 00061 #endif /* NET_SLEEP_H_ */
Generated on Sun Jul 17 2022 08:25:28 by 1.7.2