Definition in file lcd.c.
#include <string.h>
#include "compiler.h"
#include "FreeRTOS.h"
#include "datalog.h"
#include "shell.h"
#include "board.h"
#include "actuator.h"
#include "MMI.h"
#include "cptime.h"
Go to the source code of this file.
Functions | |
Bool | b_lcd_get_value (xLogDef *pxLog) |
Get the lcd current value. | |
eExecStatus | e_lcd_set_value (eModId xModId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
Set the user msg area of the lcd. Takes up to four parameters the first parameter is the usrmsg parameter, the second parameter is its value, the third is the time parameter(optional), the fourth is the time value(optional). Format: set_actuator_value actuator=lcd usrmsg=msg [time=date]. | |
int | sprintf (char *out, const char *format,...) |
Bool b_lcd_get_value | ( | xLogDef * | pxLog | ) |
Get the lcd current value.
pxLog | a Log structure. |
Definition at line 81 of file lcd.c.
References CRLF, LogDef::pcStringLog, LogDef::pfFreeStringLog, and SHELL_EXECSTATUS_OK_NO_FREE.
00082 { 00083 // Build the log string. 00084 pxLog->pcStringLog = (char *)"Enter your text"CRLF; 00085 pxLog->pfFreeStringLog = NULL; // We use a constant 00086 00087 return( SHELL_EXECSTATUS_OK_NO_FREE ); 00088 }
eExecStatus e_lcd_set_value | ( | eModId | xModId, | |
int | ac, | |||
signed portCHAR * | av[], | |||
signed portCHAR ** | ppcStringReply | |||
) |
Set the user msg area of the lcd. Takes up to four parameters the first parameter is the usrmsg parameter, the second parameter is its value, the third is the time parameter(optional), the fourth is the time value(optional). Format: set_actuator_value actuator=lcd usrmsg=msg [time=date].
xModId | Input. The module that is calling this function. | |
ac | Input. The argument counter. For this command, should be at least 2, at most 4. | |
av | Input. The argument vector. | |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. If the action is successful, no response string is output. If the action failed, a response string is output. |
Definition at line 110 of file lcd.c.
References ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR, CPTIME_SCHEDCMDID_SETLCDVAL, e_actuator_ScheduleCmdSet(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, SHELL_EXECSTATUS_OK_NO_FREE, and vMMI_UserMessDisplay().
Referenced by vExecScheduledSet().
00112 { 00113 /* 1) Check the input. */ 00114 // i) Arguments: at least 2, at most 4. 00115 if( ( 2 > ac ) || ( 4 < ac ) ) 00116 { // Syntax error. 00117 *ppcStringReply = (signed portCHAR *)ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR; 00118 return( SHELL_EXECSTATUS_KO ); 00119 } 00120 00121 // ii) Check that the 1st arg is 'usrmsg'. 00122 if (strcmp((char *)av[0] , "usrmsg")) 00123 { 00124 // Syntax error. 00125 *ppcStringReply = (signed portCHAR *)ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR; 00126 return( SHELL_EXECSTATUS_OK_NO_FREE ); 00127 } 00128 00129 // iii) If there is a third parameter, check that it is equal to "time" and 00130 // record a new scheduling. 00131 if( 4 == ac ) 00132 { 00133 return( e_actuator_ScheduleCmdSet( CPTIME_SCHEDCMDID_SETLCDVAL, ac, av, ppcStringReply ) ); 00134 } 00135 00136 // Display the user msg. 00137 #ifdef MMILCD_ENABLE 00138 vMMI_UserMessDisplay((portCHAR *)av[1]); 00139 return( SHELL_EXECSTATUS_OK ); 00140 #else 00141 *ppcStringReply = (signed portCHAR *)LCD_ERRMSG_UNAVAILABLE; 00142 return( SHELL_EXECSTATUS_OK_NO_FREE ); 00143 #endif 00144 }
int sprintf | ( | char * | out, | |
const char * | format, | |||
... | ||||
) |
Definition at line 293 of file printf-stdarg.c.
00294 { 00295 va_list args; 00296 00297 va_start( args, format ); 00298 return print( &out, format, args ); 00299 }