SAM4S-EK_FreeRTOS+FAT-SL  1.0
An example project to test the functionality of FreeRTOS+FAT-SL using SD card as data storage medium
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
psp_rtc.c
Go to the documentation of this file.
1 /*
2  * FreeRTOS+FAT SL V1.0.1 (C) 2014 HCC Embedded
3  *
4  * The FreeRTOS+FAT SL license terms are different to the FreeRTOS license
5  * terms.
6  *
7  * FreeRTOS+FAT SL uses a dual license model that allows the software to be used
8  * under a standard GPL open source license, or a commercial license. The
9  * standard GPL license (unlike the modified GPL license under which FreeRTOS
10  * itself is distributed) requires that all software statically linked with
11  * FreeRTOS+FAT SL is also distributed under the same GPL V2 license terms.
12  * Details of both license options follow:
13  *
14  * - Open source licensing -
15  * FreeRTOS+FAT SL is a free download and may be used, modified, evaluated and
16  * distributed without charge provided the user adheres to version two of the
17  * GNU General Public License (GPL) and does not remove the copyright notice or
18  * this text. The GPL V2 text is available on the gnu.org web site, and on the
19  * following URL: http://www.FreeRTOS.org/gpl-2.0.txt.
20  *
21  * - Commercial licensing -
22  * Businesses and individuals who for commercial or other reasons cannot comply
23  * with the terms of the GPL V2 license must obtain a commercial license before
24  * incorporating FreeRTOS+FAT SL into proprietary software for distribution in
25  * any form. Commercial licenses can be purchased from
26  * http://shop.freertos.org/fat_sl and do not require any source files to be
27  * changed.
28  *
29  * FreeRTOS+FAT SL is distributed in the hope that it will be useful. You
30  * cannot use FreeRTOS+FAT SL unless you agree that you use the software 'as
31  * is'. FreeRTOS+FAT SL is provided WITHOUT ANY WARRANTY; without even the
32  * implied warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
33  * PARTICULAR PURPOSE. Real Time Engineers Ltd. and HCC Embedded disclaims all
34  * conditions and terms, be they implied, expressed, or statutory.
35  *
36  * http://www.FreeRTOS.org
37  * http://www.FreeRTOS.org/FreeRTOS-Plus
38  *
39  */
40 
41 #include <stdint.h>
42 #include <stddef.h>
43 #include "../../include/psp_rtc.h"
44 
45 #include "../../../version/ver_psp_rtc.h"
46 #if VER_PSP_RTC_MAJOR != 1
47  #error "VER_PSP_RTC_MAJOR invalid"
48 #endif
49 #if VER_PSP_RTC_MINOR != 0
50  #error "VER_PSP_RTC_MINOR invalid"
51 #endif
52 
53 
54 /****************************************************************************
55  *
56  * psp_getcurrenttimedate
57  *
58  * Need to be ported depending on system, it retreives the
59  * current time and date.
60  * Please take care of correct roll-over handling.
61  * Roll-over problem is to read a date at 23.59.59 and then reading time at
62  * 00:00.00.
63  *
64  * INPUT
65  *
66  * p_timedate - pointer where to store time and date
67  *
68  ***************************************************************************/
70 {
71  if ( p_timedate != NULL )
72  {
73  p_timedate->sec = 0;
74  p_timedate->min = 0;
75  p_timedate->hour = 12u;
76 
77  p_timedate->day = 1u;
78  p_timedate->month = 1u;
79  p_timedate->year = 1980u;
80  }
81 } /* psp_getcurrenttimedate */
82 
uint16_t year
Definition: psp_rtc.h:62
uint8_t hour
Definition: psp_rtc.h:59
uint8_t month
Definition: psp_rtc.h:61
void psp_getcurrenttimedate(t_psp_timedate *p_timedate)
Definition: psp_rtc.c:69
uint8_t sec
Definition: psp_rtc.h:57
uint8_t min
Definition: psp_rtc.h:58
uint8_t day
Definition: psp_rtc.h:60