1 /*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----
2  *
3  *                 Copyright (c) 2014-2015 Datalight, Inc.
4  *                     All Rights Reserved Worldwide.
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; use version 2 of the License.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty
12  *  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License along
16  *  with this program; if not, write to the Free Software Foundation, Inc.,
17  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 /*  Businesses and individuals that for commercial or other reasons cannot
21  *  comply with the terms of the GPLv2 license may obtain a commercial license
22  *  before incorporating Reliance Edge into proprietary software for
23  *  distribution in any form.  Visit http://www.datalight.com/reliance-edge for
24  *  more information.
25  */
26 
27 /** @file
28  *  @brief Implements real-time clock functions.
29  */
30 #include <redfs.h>
31 
32 
33 /** @brief Initialize the real time clock.
34  *
35  *  The behavior of calling this function when the RTC is already initialized
36  *  is undefined.
37  *
38  *  @return A negated ::REDSTATUS code indicating the operation result.
39  *
40  *  @retval 0   Operation was successful.
41  */
RedOsClockInit(void)42 REDSTATUS RedOsClockInit( void )
43 {
44     return 0;
45 }
46 
47 
48 /** @brief Uninitialize the real time clock.
49  *
50  *  The behavior of calling this function when the RTC is not initialized is
51  *  undefined.
52  *
53  *  @return A negated ::REDSTATUS code indicating the operation result.
54  *
55  *  @retval 0   Operation was successful.
56  */
RedOsClockUninit(void)57 REDSTATUS RedOsClockUninit( void )
58 {
59     return 0;
60 }
61 
62 
63 /** @brief Get the date/time.
64  *
65  *  The behavior of calling this function when the RTC is not initialized is
66  *  undefined.
67  *
68  *  @return The number of seconds since January 1, 1970 excluding leap seconds
69  *          (in other words, standard Unix time).  If the resolution or epoch
70  *          of the RTC is different than this, the implementation must convert
71  *          it to the expected representation.
72  */
RedOsClockGetTime(void)73 uint32_t RedOsClockGetTime( void )
74 {
75     /*  FreeRTOS does not provide an RTC abstraction since most of the systems
76      *  it targets have no RTC hardware.  If your hardware includes an RTC that
77      *  you would like to use, this function must be customized.
78      */
79     return 0;
80 }
81