mbed-os for GR-LYCHEE

Dependents:   mbed-os-example-blinky-gr-lychee GR-Boads_Camera_sample GR-Boards_Audio_Recoder GR-Boads_Camera_DisplayApp ... more

Committer:
dkato
Date:
Fri Feb 02 05:42:23 2018 +0000
Revision:
0:f782d9c66c49
mbed-os for GR-LYCHEE

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dkato 0:f782d9c66c49 1
dkato 0:f782d9c66c49 2 /** \addtogroup hal */
dkato 0:f782d9c66c49 3 /** @{*/
dkato 0:f782d9c66c49 4 /* mbed Microcontroller Library
dkato 0:f782d9c66c49 5 * Copyright (c) 2006-2013 ARM Limited
dkato 0:f782d9c66c49 6 *
dkato 0:f782d9c66c49 7 * Licensed under the Apache License, Version 2.0 (the "License");
dkato 0:f782d9c66c49 8 * you may not use this file except in compliance with the License.
dkato 0:f782d9c66c49 9 * You may obtain a copy of the License at
dkato 0:f782d9c66c49 10 *
dkato 0:f782d9c66c49 11 * http://www.apache.org/licenses/LICENSE-2.0
dkato 0:f782d9c66c49 12 *
dkato 0:f782d9c66c49 13 * Unless required by applicable law or agreed to in writing, software
dkato 0:f782d9c66c49 14 * distributed under the License is distributed on an "AS IS" BASIS,
dkato 0:f782d9c66c49 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dkato 0:f782d9c66c49 16 * See the License for the specific language governing permissions and
dkato 0:f782d9c66c49 17 * limitations under the License.
dkato 0:f782d9c66c49 18 */
dkato 0:f782d9c66c49 19 #ifndef MBED_RTC_API_H
dkato 0:f782d9c66c49 20 #define MBED_RTC_API_H
dkato 0:f782d9c66c49 21
dkato 0:f782d9c66c49 22 #include "device.h"
dkato 0:f782d9c66c49 23
dkato 0:f782d9c66c49 24 #if DEVICE_RTC
dkato 0:f782d9c66c49 25
dkato 0:f782d9c66c49 26 #include <time.h>
dkato 0:f782d9c66c49 27
dkato 0:f782d9c66c49 28 #ifdef __cplusplus
dkato 0:f782d9c66c49 29 extern "C" {
dkato 0:f782d9c66c49 30 #endif
dkato 0:f782d9c66c49 31
dkato 0:f782d9c66c49 32 /**
dkato 0:f782d9c66c49 33 * \defgroup hal_rtc RTC hal functions
dkato 0:f782d9c66c49 34 * @{
dkato 0:f782d9c66c49 35 */
dkato 0:f782d9c66c49 36
dkato 0:f782d9c66c49 37 /** Initialize the RTC peripheral
dkato 0:f782d9c66c49 38 *
dkato 0:f782d9c66c49 39 */
dkato 0:f782d9c66c49 40 void rtc_init(void);
dkato 0:f782d9c66c49 41
dkato 0:f782d9c66c49 42 /** Deinitialize RTC
dkato 0:f782d9c66c49 43 *
dkato 0:f782d9c66c49 44 * TODO: The function is not used by rtc api in mbed-drivers.
dkato 0:f782d9c66c49 45 */
dkato 0:f782d9c66c49 46 void rtc_free(void);
dkato 0:f782d9c66c49 47
dkato 0:f782d9c66c49 48 /** Get the RTC enable status
dkato 0:f782d9c66c49 49 *
dkato 0:f782d9c66c49 50 * @retval 0 disabled
dkato 0:f782d9c66c49 51 * @retval 1 enabled
dkato 0:f782d9c66c49 52 */
dkato 0:f782d9c66c49 53 int rtc_isenabled(void);
dkato 0:f782d9c66c49 54
dkato 0:f782d9c66c49 55 /** Get the current time from the RTC peripheral
dkato 0:f782d9c66c49 56 *
dkato 0:f782d9c66c49 57 * @return The current time
dkato 0:f782d9c66c49 58 */
dkato 0:f782d9c66c49 59 time_t rtc_read(void);
dkato 0:f782d9c66c49 60
dkato 0:f782d9c66c49 61 /** Set the current time to the RTC peripheral
dkato 0:f782d9c66c49 62 *
dkato 0:f782d9c66c49 63 * @param t The current time to be set
dkato 0:f782d9c66c49 64 */
dkato 0:f782d9c66c49 65 void rtc_write(time_t t);
dkato 0:f782d9c66c49 66
dkato 0:f782d9c66c49 67 /**@}*/
dkato 0:f782d9c66c49 68
dkato 0:f782d9c66c49 69 #ifdef __cplusplus
dkato 0:f782d9c66c49 70 }
dkato 0:f782d9c66c49 71 #endif
dkato 0:f782d9c66c49 72
dkato 0:f782d9c66c49 73 #endif
dkato 0:f782d9c66c49 74
dkato 0:f782d9c66c49 75 #endif
dkato 0:f782d9c66c49 76
dkato 0:f782d9c66c49 77 /** @}*/