📄 cli.c
字号:
#endif
#if HELP
static void cmd_H (uint8_t c) // '?' help comamnd
{
switch (toupper (c))
{
#if !BROWNOUT_BATMODE
case ' ': // Serial Ports' bit rate.
send_help (RateHelp);
break;
#endif
#if 0 // not implemented
case '7': // Serial Ports' settings.
case '8': // Serial Ports' settings.
send_help (Help8);
break;
#endif
#if TRACE10
case '!':
send_help (CAHelp); // Compute Engine Code Access.
break;
#endif
case ']':
send_help (DAHelp); // Compute Engine Data Access.
break;
case ')':
send_help (MAHelp); // MPU Data Access.
break;
#if BROWNOUT_BATMODE
case 'B':
send_help (BHelp); // battery mode commands
#endif
case 'C':
switch (toupper (get_char ()))
{
#if CAL_SAVE || CAL_LDR || AUTOCAL
case 'L':
send_help (CLHelp); // calibration.
break;
#endif
#if PULSE_CNT
case 'P':
send_help (CPHelp); // calibration.
break;
#endif
case 'R':
send_help (CRHelp); // RTM.
break;
default:
send_help (CHelp); // Compute Engine.
break;
}
break;
#if CLI_EEPROM || ERROR_RECORDING
case 'E':
switch (toupper (get_char ()))
{
default:
#if CLI_EEPROM
case 'E':
send_help (EEHelp); // EEProm.
break;
#endif
#if ERROR_RECORDING
case 'R':
send_help (ERHelp); // error recording.
break;
#endif
}
break;
#endif
#if FLASH
case 'F':
send_help (FHelp); // Flash.
break;
#endif
#if LOAD
case 'L':
send_help (LHelp); // Load control.
break;
#endif
case 'I': // Information messages
send_help (IHelp);
break;
case 'M':
switch (toupper (get_char ()))
{
#if RMS_VALUES
case 'R':
send_help (MRHelp); // Meter Display RMS Control.
break;
#endif
default:
send_help (MHelp); // Meter Display Total Control.
break;
}
break;
case 'P':
send_help (PSHelp);
break;
case 'R':
switch (toupper (get_char ()))
{
#if REAL_TIME_DATE
case 'T':
send_help (RTHelp); // Real Time Clock controls.
break;
#endif
default:
send_help (RHelp); // Special Function Register controls.
break;
}
break;
#if ENHANCED_TRIM
case 'T':
send_help (THelp); // Trim controls.
break;
#endif
case 'W': // Reset by watchdog
send_help (WHelp);
break;
case 'Z': // Reset part
send_help (ZHelp);
break;
default:
set_result(NO_HELP_AVAIL_ID);
send_help (Usage);
break;
}
} // end cmd_H
#endif
/***************************************************************************
* History:
* $Log: cli.c,v $
* Revision 1.32 2006/10/13 00:46:19 tvander
* Removed compile options for 6530, 6515; renamed 6511 and 6513 to trace11 and trace13; Binary verified unchanged from previous version.
*
* Revision 1.31 2006/09/09 01:08:05 gmikef
* *** empty log message ***
*
* Revision 1.30 2006/07/08 01:55:07 tvander
* Modified conditional compilation to use a specific hard reset option.
*
* Revision 1.29 2006/06/23 21:09:14 tvander
* Added Z1 to test watchdog, and Z2 to test reset logic.
*
* Revision 1.28 2006/06/23 20:46:04 tvander
* Removed wait-for-io; it slowed response in brownout mode, and caused
* hangs. The cure was definitely worse than the disease: a few clobbered characters after certain commands.
*
* Revision 1.27 2006/06/15 19:56:03 tvander
* Fixed misc. serial errors.
*
* Revision 1.26 2006/06/09 00:17:09 tvander
* Chip version is removed.
*
* Revision 1.25 2006/06/08 18:23:36 tvander
* Displays the CE's file name
*
* Revision 1.24 2006/06/06 04:11:40 tvander
* Made compilation of Read_Trim() depend on enhanced_trim flag
*
* Revision 1.23 2006/06/06 03:53:50 tvander
* Added calibration count to access.c
* Added to help files, at least, they compile for a 6513.
* io.c support the calibration loader.
* ser0cli.c and ser1cli.c were allocating too many timers. Fixed.
*
* Revision 1.22 2006/06/05 23:49:28 tvander
* 'I' simplified
* cmd_error() removed
* 'T'rim now present only if enhanced trim is present
* '/' implemented as a true comment to the end of line
*
* Revision 1.21 2006/05/30 17:14:19 tvander
* Fixed help feature's detection of no help file.
*
* Revision 1.20 2006/05/18 23:18:42 tvander
* 16K and 32K
* First cut at new requirements.
* 32K 6521 is grossly tested.
* All others have a clean compile with C51 8.02
*
* Revision 1.19 2006/04/06 19:01:07 tvander
* Removed logic that complained when the "I" command was sent.
*
* Revision 1.18 2006/03/07 23:57:06 tvander
* Revised help system for accuracy.
* Revised help system for compile flags.
* Clean build
*
* Revision 1.17 2006/03/06 03:27:46 Michael T. Fischer
* More 6530 prep.
*
* Revision 1.16 2006/03/03 11:24:19 Michael T. Fischer
* Prep for 6530 LCD, etc.
*
* Revision 1.15 2006/01/16 20:11:19 tvander
* Clean Keil build, all versions
*
* Revision 1.14 2006/01/10 03:53:42 gmikef
* Added PDATA support for CE Outputs.
*
* Revision 1.12 2005/12/09 19:35:53 tvander
* Includes 'W' command to test watchdog reset.
*
* Revision 1.11 2005/11/10 22:51:30 tvander
* 6520 has battery mode commands.
* Brownout always has decimal point 7.
* LCD Mode always has decimal points 7 and 6.
* Sag detection is disabled.
*
* Revision 1.10 2005/11/03 19:16:19 tvander
* Added B> prompt for brownout
*
* Revision 1.9 2005/10/29 02:37:31 gmikef
* *** empty log message ***
*
* Revision 1.8 2005/10/08 04:41:16 tvander
* Fixed priority inversion.
* Rewrote watchdog to work in brownout, but of course it doesn't work.
* Watchdog can now be defeated by clearing watchdog option to 0.
* Reorganized watt hour modules (at last!).
* Disabled reading of STATUS in 6521_cli because the CE's status is always SAG.
* Tested with 6521_CLI; measurements seem to work.
* Fixed other builds.
*
* Revision 1.7 2005/09/28 20:54:01 tvander
* V/I phase displays for all phases,
* main edge count displays for both types,
* rewrote setup from defaults to group related functions.
*
* Revision 1.6 2005/09/27 01:28:56 tvander
* Moved CLI constants into global CLI .h file
*
* Revision 1.5 2005/09/13 19:26:53 tvander
* Release 6521 CLI version for early customers.
* RMS works.
* Accumulation interval to 1 second.
* Wrate slowed to 3.2 Kh/pulse for new accumulation interval.
* Pulse outputs inverted, so they start dark.
* LCD density increased from 1/3 bias to 1/2 bias, for demo PCB.
* VAh code is included, but untested.
*
* Revision 1.4 2005/09/12 07:47:27 tvander
* Power measurement is stable, with no creep.
* VARh measurement is stable, with no creep.
* Pulse sources work.
* Full access to MPU variables.
* Rolled date.
* Clock software works.
*
* Revision 1.3 2005/09/02 20:38:14 gmikef
* Modified to fit CeCode of 1.5Kbytes and support new "ce_merge".
*
* Revision 1.2 2005/08/31 05:51:09 gmikef
* First version w/ LAPIE interface.
*
* Revision 1.1 2005/08/28 02:21:23 gmikef
* *** empty log message ***
*
* Revision 1.3 2005/08/20 01:32:43 gmikef
* *** empty log message ***
*
* Revision 1.2 2005/08/19 01:04:36 gmikef
* *** empty log message ***
*
* Revision 1.1 2005/08/18 02:56:05 gmikef
* *** empty log message ***
*
* Revision 1.6 2005/08/03 18:34:44 tvander
* Changed copyright to "Teridian Semiconductor Co."
* Put in alt-mux change in MPU parameters in api_struct.h
* Revised validity date of cal.c
*
* Revision 1.5 2005/06/03 05:05:19 gmikef
* Added Pulse Counter support.
*
* Revision 1.4 2005/03/08 19:06:39 tvander
* Self calibration in all software models
*
* Revision 1.3 2005/02/22 22:50:19 tvander
* I-8 power command 'PS' is functional.
* I-70, I-73 80V sag detection code exists, but doesn't do anything.
* I-71 Creep bit in the MPU status is set when creep is detected on any conductor.
* I-72 main edge count is display on LCD using m13.1 and m13.2
*
* Revision 1.2 2005/02/17 18:32:16 tvander
* Added automatic check-in logging to all source code.
*
* 2003 OCTOBER 30; First Version.
* Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved.
* this program is fully protected by the United States copyright
* laws and is the property of Teridian Semiconductor Corporation.
***************************************************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -