00001 /*This file has been prepared for Doxygen automatic documentation generation.*/ 00016 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00017 * 00018 * Redistribution and use in source and binary forms, with or without 00019 * modification, are permitted provided that the following conditions are met: 00020 * 00021 * 1. Redistributions of source code must retain the above copyright notice, this 00022 * list of conditions and the following disclaimer. 00023 * 00024 * 2. Redistributions in binary form must reproduce the above copyright notice, 00025 * this list of conditions and the following disclaimer in the documentation 00026 * and/or other materials provided with the distribution. 00027 * 00028 * 3. The name of Atmel may not be used to endorse or promote products derived 00029 * from this software without specific prior written permission. 00030 * 00031 * 4. This software may only be redistributed and used in connection with an Atmel 00032 * AVR product. 00033 * 00034 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00035 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00036 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00037 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00038 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00039 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00040 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00041 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00042 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00043 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00044 * 00045 */ 00046 00047 #ifndef __CPTIME_H__ 00048 #define __CPTIME_H__ 00049 00050 #include "compiler.h" 00051 #include "FreeRTOS.h" 00052 00053 #include "shell.h" 00054 #include "datalog.h" 00055 00056 //_____ M A C R O S ________________________________________________________ 00057 00058 00059 00060 //_____ D E C L A R A T I O N S ____________________________________________ 00061 00062 /* 00063 * Scheduled cmds id. 00064 */ 00065 typedef enum 00066 { 00067 CPTIME_SCHEDCMDID_SETLEDM1VAL, // Set the LEDm1 value. 00068 CPTIME_SCHEDCMDID_SETLEDM2VAL, // Set the LEDm2 value. 00069 CPTIME_SCHEDCMDID_SETLEDB1VAL, // Set the LEDb1 value. 00070 CPTIME_SCHEDCMDID_SETLEDB2VAL, // Set the LEDb2 value. 00071 CPTIME_SCHEDCMDID_SETLCDVAL, // Set the LCD usermsg value. 00072 } eSchedCmdId; 00073 00074 00078 void v_cptime_Init( void ); 00079 00080 00081 #if configCTRLPANEL_TRACE == 1 00082 00085 void v_cptime_trace( void ); 00086 #endif 00087 00094 void v_cptime_GetDateInFatStringFormat( char *pcDate ); 00095 00100 void v_cptime_UpdateLocalTime( void ); 00101 00102 00118 eExecStatus e_cptime_RecordScheduledCmd( char *pcDate, int CmdId, 00119 void (*pfScheduledCmd)( int, void * ), 00120 void *pvCmdParams, 00121 signed portCHAR **ppcStringReply ); 00122 00123 00127 void v_cptime_ExecuteScheduledCmd( void ); 00128 00129 00146 eExecStatus e_cptime_cmd_set_config( eModId xModId, signed short FsNavId, 00147 int ac, signed portCHAR *av[], 00148 signed portCHAR **ppcStringReply ); 00149 00150 00167 eExecStatus e_cptime_cmd_get_config( eModId xModId, signed short FsNavId, 00168 int ac, signed portCHAR *av[], 00169 signed portCHAR **ppcStringReply ); 00170 00171 00172 #endif // __CPTIME_H__