00001 /*This file has been prepared for Doxygen automatic documentation generation.*/ 00015 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00016 * 00017 * Redistribution and use in source and binary forms, with or without 00018 * modification, are permitted provided that the following conditions are met: 00019 * 00020 * 1. Redistributions of source code must retain the above copyright notice, this 00021 * list of conditions and the following disclaimer. 00022 * 00023 * 2. Redistributions in binary form must reproduce the above copyright notice, 00024 * this list of conditions and the following disclaimer in the documentation 00025 * and/or other materials provided with the distribution. 00026 * 00027 * 3. The name of Atmel may not be used to endorse or promote products derived 00028 * from this software without specific prior written permission. 00029 * 00030 * 4. This software may only be redistributed and used in connection with an Atmel 00031 * AVR product. 00032 * 00033 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00034 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00035 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00036 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00037 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00038 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00039 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00040 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00041 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00042 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00043 * 00044 */ 00045 00046 #ifndef __CPLED_H__ 00047 #define __CPLED_H__ 00048 00049 #include "compiler.h" 00050 #include "FreeRTOS.h" 00051 00052 #include "datalog.h" 00053 00054 00055 //_____ M A C R O S ________________________________________________________ 00056 00057 #ifdef EVK1100_REVA 00058 # define LEDM1 LED_BI0_GREEN 00059 # define LEDM2 LED_BI0_RED 00060 # define LEDB1G LED_MONO0_GREEN 00061 # define LEDB1R LED_MONO1_GREEN 00062 # define LEDB2G LED_MONO2_GREEN 00063 # define LEDB2R LED_MONO3_GREEN 00064 #else 00065 # define LEDM1 LED_MONO0_GREEN 00066 # define LEDM2 LED_MONO1_GREEN 00067 # define LEDB1G LED_BI0_GREEN 00068 # define LEDB1R LED_BI0_RED 00069 # define LEDB2G LED_BI1_GREEN 00070 # define LEDB2R LED_BI1_RED 00071 #endif 00072 00073 00074 //_____ D E C L A R A T I O N S ____________________________________________ 00075 00076 00084 Bool b_ledm1_get_value( xLogDef *pxLog ); 00085 00086 00094 Bool b_ledm2_get_value( xLogDef *pxLog ); 00095 00096 00104 Bool b_ledb1_get_value( xLogDef *pxLog ); 00105 00106 00114 Bool b_ledb2_get_value( xLogDef *pxLog ); 00115 00116 00117 /* \brief TODO The set actuator value command: set the value(s) or state(s) of an actuator. 00118 * Takes up to eight parameters 00119 * The first parameter is the cte actuator indicator, the second is the actuator's name, 00120 * the third parameter is a field name, the fourth parameter is its value, the fifth is 00121 * another field name(optional), the sixth is its value(optional), 00122 * the seventh is the time parameter(optional), the eighth is the time value(optional). 00123 * Format: set_actuator_value actuator=actuatorname field1=value [field2=value] [time=date] 00124 * 00125 * \note This function must be of the type pfShellCmd defined by the shell module. 00126 * 00127 * \param xModId Input. The module that is calling this function. 00128 * \param FsNavId Ignored. 00129 * \param ac Input. The argument counter. For this command, should be 00130 * at least 2, at most 4. 00131 * \param av Input. The argument vector. 00132 * \param ppcStringReply Input/Output. The response string. 00133 * If Input is NULL, no response string will be output. 00134 * Else a malloc for the response string is performed here; 00135 * the caller must free this string. 00136 * 00137 * \return the status of the command execution. 00138 */ 00139 eExecStatus e_ledm1_set_value( eModId xModId, int ac, signed portCHAR *av[], 00140 signed portCHAR **ppcStringReply ); 00141 00142 00143 00144 /* \brief TODO The set actuator value command: set the value(s) or state(s) of an actuator. 00145 * Takes up to eight parameters 00146 * The first parameter is the cte actuator indicator, the second is the actuator's name, 00147 * the third parameter is a field name, the fourth parameter is its value, the fifth is 00148 * another field name(optional), the sixth is its value(optional), 00149 * the seventh is the time parameter(optional), the eighth is the time value(optional). 00150 * Format: set_actuator_value actuator=actuatorname field1=value [field2=value] [time=date] 00151 * 00152 * \note This function must be of the type pfShellCmd defined by the shell module. 00153 * 00154 * \param xModId Input. The module that is calling this function. 00155 * \param FsNavId Ignored. 00156 * \param ac Input. The argument counter. For this command, should be 00157 * at least 2, at most 4. 00158 * \param av Input. The argument vector. 00159 * \param ppcStringReply Input/Output. The response string. 00160 * If Input is NULL, no response string will be output. 00161 * Else a malloc for the response string is performed here; 00162 * the caller must free this string. 00163 * 00164 * \return the status of the command execution. 00165 */ 00166 eExecStatus e_ledm2_set_value( eModId xModId, int ac, signed portCHAR *av[], 00167 signed portCHAR **ppcStringReply ); 00168 00169 00170 00171 /* \brief TODO The set actuator value command: set the value(s) or state(s) of an actuator. 00172 * Takes up to eight parameters 00173 * The first parameter is the cte actuator indicator, the second is the actuator's name, 00174 * the third parameter is a field name, the fourth parameter is its value, the fifth is 00175 * another field name(optional), the sixth is its value(optional), 00176 * the seventh is the time parameter(optional), the eighth is the time value(optional). 00177 * Format: set_actuator_value actuator=actuatorname field1=value [field2=value] [time=date] 00178 * 00179 * \note This function must be of the type pfShellCmd defined by the shell module. 00180 * 00181 * \param xModId Input. The module that is calling this function. 00182 * \param FsNavId Ignored. 00183 * \param ac Input. The argument counter. For this command, should be 00184 * at least 4, at most 6. 00185 * \param av Input. The argument vector. 00186 * \param ppcStringReply Input/Output. The response string. 00187 * If Input is NULL, no response string will be output. 00188 * Else a malloc for the response string is performed here; 00189 * the caller must free this string. 00190 * 00191 * \return the status of the command execution. 00192 */ 00193 eExecStatus e_ledb1_set_value( eModId xModId, int ac, signed portCHAR *av[], 00194 signed portCHAR **ppcStringReply ); 00195 00196 00197 /* \brief TODO The set actuator value command: set the value(s) or state(s) of an actuator. 00198 * Takes up to eight parameters 00199 * The first parameter is the cte actuator indicator, the second is the actuator's name, 00200 * the third parameter is a field name, the fourth parameter is its value, the fifth is 00201 * another field name(optional), the sixth is its value(optional), 00202 * the seventh is the time parameter(optional), the eighth is the time value(optional). 00203 * Format: set_actuator_value actuator=actuatorname field1=value [field2=value] [time=date] 00204 * 00205 * \note This function must be of the type pfShellCmd defined by the shell module. 00206 * 00207 * \param xModId Input. The module that is calling this function. 00208 * \param FsNavId Ignored. 00209 * \param ac Input. The argument counter. For this command, should be 00210 * at least 4, at most 6. 00211 * \param av Input. The argument vector. 00212 * \param ppcStringReply Input/Output. The response string. 00213 * If Input is NULL, no response string will be output. 00214 * Else a malloc for the response string is performed here; 00215 * the caller must free this string. 00216 * 00217 * \return the status of the command execution. 00218 */ 00219 eExecStatus e_ledb2_set_value( eModId xModId, int ac, signed portCHAR *av[], 00220 signed portCHAR **ppcStringReply ); 00221 00222 00223 #endif // __CPLED_H__