Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
rtc_api.h
00001 00002 /** \addtogroup hal */ 00003 /** @{*/ 00004 /* mbed Microcontroller Library 00005 * Copyright (c) 2006-2013 ARM Limited 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); 00008 * you may not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, 00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 */ 00019 #ifndef MBED_RTC_API_H 00020 #define MBED_RTC_API_H 00021 00022 #include "device.h" 00023 00024 #if DEVICE_RTC 00025 00026 #include <time.h> 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 /** 00033 * \defgroup hal_rtc RTC hal functions 00034 * @{ 00035 */ 00036 00037 /** Initialize the RTC peripheral 00038 * 00039 */ 00040 void rtc_init(void); 00041 00042 /** Deinitialize RTC 00043 * 00044 * TODO: The function is not used by rtc api in mbed-drivers. 00045 */ 00046 void rtc_free(void); 00047 00048 /** Get the RTC enable status 00049 * 00050 * @retval 0 disabled 00051 * @retval 1 enabled 00052 */ 00053 int rtc_isenabled(void); 00054 00055 /** Get the current time from the RTC peripheral 00056 * 00057 * @return The current time 00058 */ 00059 time_t rtc_read(void); 00060 00061 /** Set the current time to the RTC peripheral 00062 * 00063 * @param t The current time to be set 00064 */ 00065 void rtc_write(time_t t); 00066 00067 /**@}*/ 00068 00069 #ifdef __cplusplus 00070 } 00071 #endif 00072 00073 #endif 00074 00075 #endif 00076 00077 /** @}*/
Generated on Sun Jul 17 2022 08:25:29 by 1.7.2