⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 help.c

📁 TDK 6521 SOC 芯片 DEMO程序
💻 C
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************
 * This code and information is provided "as is" without warranty of any   *
 * kind, either expressed or implied, including but not limited to the     *
 * implied warranties of merchantability and/or fitness for a particular   *
 * purpose.                                                                *
 *                                                                         *
 * Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved.    *
 ***************************************************************************/
//*************************************************************************
//  DESCRIPTION: 71M652x POWER METER - Help Messages.
// 
//  AUTHOR:  MTF
//
//  HISTORY: See end of file.
//***************************************************************************
// File:  HELP.C
//               
#include "options.h"

#if HELP && CLI && (SERIAL0_CLI || SERIAL1_CLI)
//***************************************************************************
// How to use help
uint8r_t Usage_1[] = {"??       : Command Line Interpreter On-line help"};
uint8r_t Usage_2[] = {"Usage: ?<char> or ?? to get this help page"};
uint8r_t Usage_3[] = {"Where <char> is an uppercase letter of the command. "};
uint8r_t Usage_4[] = {"The following commands/<char> are available: "};
uint8r_t Usage_5[] = {"  ,  - Repeat last command    : /  - Ignore rest of line"};
uint8r_t Usage_6[] = {"  ]  - Access CE Data RAM     : )  - Access MPU Data RAM"};
uint8r_t Usage_7[] = {"  C  - Control metering       : I  - Information message"};
uint8r_t Usage_8[] = {"  M  - Meter Display Control  : PS - Power Save"};
uint8r_t Usage_9[] = {"  R  - SFR and I/O Control    : RT - RTC Control"};            
#if ENHANCED_TRIM
uint8r_t Usage_10[]= {"  T  - Trim Controls          : W  - Wait for watchdog reset"};
#else
uint8r_t Usage_10[]= {"  W  - Wait for watchdog reset"};
#endif
uint8r_t Usage_11[]= {"  Z  - Soft reset"};
#if TRACE10
uint8r_t Usage_12[]= {"  !  - CE Code access"};
#endif
#if !BROWNOUT_BATMODE
uint8r_t Usage_13[]= {"  (space) - Set serial port's bit rate, e.g. (space)9600"};
#else
uint8r_t Usage_13[]= {"  B - Battery mode commands"};
#endif
#if CLI_EEPROM
uint8r_t Usage_14[]= {"  EE - EEPROM Control"};
#endif
#if ERROR_RECORDING
uint8r_t Usage_15[]= {"  ER - Error Recording"};
#endif
#if FLASH
uint8r_t Usage_16[]= {"  F  - Flash Controls"};
#endif
#if LOAD
uint8r_t Usage_17[]= {"  L  - Load data to and from meter"};
#endif
#if PROFILE
uint8r_t Usage_18[]= {"  P  - Profile Meter"};
#endif
uint8r_t Usage_19[]= {""};
uint8r_t Usage_20[]= {"For Example: ?C to get help on Compute Engine Control."};

uint8r_t * code Usage[] = {
    Usage_1,    Usage_2,    Usage_3,    Usage_4,    Usage_5,
    Usage_6,    Usage_7,    Usage_8,    Usage_9,    Usage_10,
    Usage_11,   
	#if TRACE10
	Usage_12,
	#endif   
	Usage_13,
	#if CLI_EEPROM   
	Usage_14,   
	#endif
	#if ERROR_RECORDING
	Usage_15,
	#endif
	#if FLASH
	Usage_16,
	#endif
	#if LOAD
	Usage_17,
	#endif
	#if PROFILE
	Usage_18,
	#endif
	Usage_19, Usage_20,   
	NULL         
};

// Compute Engine Settings Control.
uint8r_t Help_C_1[]= {"C         : Compute Engine Controls"};
uint8r_t Help_C_2[]= {"CEn       : Compute Engine Enable (1 -> Enable)"};
#if CAL_SAVE || CAL_LDR || AUTOCAL
uint8r_t Help_C_3[]= {"CL...     : CaLibrations."};
#endif
#if PULSE_CNT
uint8r_t Help_C_4[]= {"CP...     : Pulse Counter."};
#endif
uint8r_t Help_C_5[]= {"CR...     : Select RTM outputs and enable/disable."};
uint8r_t Help_C_6[]= {"CTn       : Select TMUX input."};
uint8r_t Help_C_7[]= {""};
#if PULSE_CNT
#if CAL_SAVE || CAL_LDR || AUTOCAL
uint8r_t Help_C_8[]={"?CL, ?CP or ?CR for further help."};
#else
uint8r_t Help_C_8[]={"?CP or ?CR for further help."};
#endif
#else
#if AUTOCAL || CAL_SAVE || CAL_LDR
uint8r_t Help_C_8[]={"?CL or ?CR for further help."};
#else
uint8r_t Help_C_8[]={"?CR for further help."};
#endif
#endif

uint8r_t * code CHelp[] = {
    Help_C_1,   Help_C_2,
#if CAL_SAVE || CAL_LDR || AUTOCAL
    Help_C_3,  
#endif
#if PULSE_CNT
    Help_C_4,
#endif
    Help_C_5, Help_C_6,  Help_C_7,
    Help_C_8,
    NULL
};

#if TRACE10
// CE Code Memory Access.
uint8r_t Help_CA_1[] = {"!         : CE Code Access"};
uint8r_t Help_CA_2[] = {"!x..      : Starting CE code address"}; 
uint8r_t Help_CA_3[] = {" ..???..  : Read consecutive 16-bit words in Decimal"};
uint8r_t Help_CA_4[] = {" ..$$$..  : Read consecutive 16-bit words in Hex"};
uint8r_t Help_CA_5[] = {" ..=n=n.. : Write consecutive memory' values"};
uint8r_t Help_CA_6[] = {"!U        : Update default version of CE Code"};
uint8r_t Help_CA_7[] = {";         : Exit Memory Access"};
uint8r_t Help_CA_8[] = {"For example: !0$$$ - Read CE program words 0x000, 0x001 and 0x002."};
uint8r_t Help_CA_9[] = {"!1FD=$0001=$EDCB - Write two words starting @ 0x1FD"};

uint8r_t * code CAHelp[] = {
    Help_CA_1,  Help_CA_2,  Help_CA_3,  Help_CA_4,  Help_CA_5,   
    Help_CA_6,  Help_CA_7,  Help_CA_8,  Help_CA_9,  NULL
};
#endif

#if AUTOCAL
uint8r_t Help_CL_1[]= {"CL   : Calibration controls; )10=Vcal, )11=Ical"};
uint8r_t Help_CL_2[]= {"CLB  : Begin calibration for )F accum. intervals."};
#endif
#if CAL_LDR
uint8r_t Help_CL_3[]= {"CLC  : Load calibration via serial port."};
#endif
#if CAL_SAVE
uint8r_t Help_CL_4[]= {"CLS  : Save calibration to EEPROM."};
uint8r_t Help_CL_5[]= {"CLR  : Restore calibration from EEPROM."};
uint8r_t Help_CL_6[]= {"CLD  : Restore calibration to defaults."};
#endif

uint8r_t * code CLHelp[] = {
#if AUTOCAL
    Help_CL_1,  Help_CL_2,  
#endif
#if CAL_LDR
    Help_CL_3,  
#endif
#if CAL_SAVE
    Help_CL_4,  Help_CL_5,  Help_CL_6,
#endif
    NULL
};

#if PULSE_CNT
uint8r_t Help_CP_1[]= {"CP    : Pulse Counter controls"};
uint8r_t Help_CP_2[]= {"CPA   : Start accumulating periodic pulse counters."};
uint8r_t Help_CP_3[]= {"CPC   : Clear pulse counters accumulators."};
uint8r_t Help_CP_4[]= {"CPDn  : Duration in seconds for periodic pulse counters."};
uint8r_t * code CPHelp[] = {
    Help_CP_1,  Help_CP_2,  Help_CP_3,  Help_CP_4, NULL
};
#endif

uint8r_t Help_CR_1[]= {"CR         : CE RTM controls"};
uint8r_t Help_CR_2[]= {"CREn       : Enable/Disable RTM output."};
uint8r_t Help_CR_3[]= {"CRSn.n.n.n : Select four RTM outputs."};

uint8r_t * code CRHelp[] = {
    Help_CR_1,  Help_CR_2,  Help_CR_3,  NULL
};

#if BROWNOUT_BATMODE
// Battery mode commands
uint8r_t Help_B_1[] = {"B    : Battery mode commands- only in brownout mode"};
uint8r_t Help_B_2[] = {"BL   : LCD only battery mode"};
uint8r_t Help_B_3[] = {"BS   : Sleep mode"};
#if BATTERY_TEST
uint8r_t Help_B_4[] = {"BT   : Command a battery test- only in normal mode"};
#endif
uint8r_t Help_B_5[] = {"BWSn : Wake on nth second (+/-1.25), after LCD or sleep"};
uint8r_t Help_B_6[] = {"BWMn : Wake on nth minute after LCD or sleep"};
uint8r_t Help_B_7[] = {""};
uint8r_t Help_B_8[] = {"For example, power down V3P3, reset, get B> prompt indicating brownout mode, type:"};
uint8r_t Help_B_9[] = {"BWS7"};
uint8r_t Help_B_10[]= {"BS"};
uint8r_t Help_B_11[]= {"Will sleep for 7 seconds and then wake."};
uint8r_t * code BHelp[] = {
    Help_B_1,  Help_B_2,  Help_B_3,
#if BATTERY_TEST
    Help_B_4,
#endif
    Help_B_5,  Help_B_6,  Help_B_7,  Help_B_8,
    Help_B_9,  Help_B_10, Help_B_11, NULL
};
#endif

#if FLASH
// Flash control
uint8r_t Help_F_1[] = {"F       : (F)lash controls"};
uint8r_t Help_F_2[] = {"FRa.b   : Read Flash starting at 'a' for 'b' bytes"};
uint8r_t Help_F_3[] = {"FSc..cc : String of characters, sets length"};
uint8r_t Help_F_4[] = {"FTa     : Write Flash at addr 'a'"};
uint8r_t Help_F_5[] = {"FWn.n..n: String of bytes, sets write length"};
uint8r_t Help_F_6[] = {";       : Exit Flash Controls"};
uint8r_t Help_F_7[] = {""};
uint8r_t Help_F_8[] = {"For example: FSabcdef;T;"};
uint8r_t Help_F_9[] = {"Write 'abcdef' to Flash"};

uint8r_t * code FHelp[] = {
    Help_F_1,   Help_F_2,   Help_F_3,   Help_F_4,    
    Help_F_5,   Help_F_6,   Help_F_7,   Help_F_8,   Help_F_9,   NULL
};
#endif

// (I)nformation messages
uint8r_t Help_I_1[] = {"I           : Information messages"};
uint8r_t Help_I_2[] = {"I0          : Version number"};
uint8r_t Help_I_3[] = {"I1          : Demo Version String"};
uint8r_t Help_I_4[] = {"I1=string   : Change Demo Version string"};
uint8r_t Help_I_5[] = {"I2          : Copyright String"};
uint8r_t Help_I_6[] = {"I3          : CE Version String"};
uint8r_t Help_I_7[] = {"I3=string   : Change CE Version string"};
uint8r_t Help_I_8[] = {"For Example : I1 - returns Demo version"};

uint8r_t * code IHelp[] = {
    Help_I_1,   Help_I_2,   Help_I_3,
    Help_I_4,   Help_I_5,
    Help_I_6,   Help_I_7,   Help_I_8,   NULL
};

// Special Function (R)egister and I/O controls
uint8r_t Help_R_1[] = {"R          : User I/(O) control"};
uint8r_t Help_R_2[] = {"RIx..      : Select memory-mapped I/O, oring $2000 to x"};
uint8r_t Help_R_3[] = {"Rx..       : Select internal SFR"};
uint8r_t Help_R_4[] = {" ..???..   : Read consecutive registers in Decimal"};
uint8r_t Help_R_5[] = {" ..$$$..   : Read consecutive registers in Hex"};
uint8r_t Help_R_6[] = {" ..=n=n..  : Set consecutive registers' values"};
uint8r_t Help_R_7[] = {""};
uint8r_t Help_R_8[] = {"For example: RI1A$$ - Read I/O $201A and $201B in hex"};
uint8r_t Help_R_9[] = {"             RB2? - Read FLSHCTL in decimal at SFR $B2"};

uint8r_t * code RHelp[] = {
    Help_R_1,   Help_R_2,   Help_R_3,   Help_R_4,   Help_R_5,         
    Help_R_6,   Help_R_7,   Help_R_8,   Help_R_9,
    NULL
};

#if REAL_TIME_DATE
// (R)eal (T)ime Clock controls
uint8r_t Help_RT_1[] = {"RT        : Real Time Clock controls"};
uint8r_t Help_RT_2[] = {"RTDy.m.d.w: Day of year: (year, month, day, weekday [1=Sunday])."};
uint8r_t Help_RT_3[] = {"RTR       : Read Real Time Clock."};
uint8r_t Help_RT_4[] = {"RTTh.m.s  : Time of day: (hr, min, sec)."};
uint8r_t Help_RT_5[] = {"RTAs.t    : Real Time Adjust: (s=1=start, t=trim in ppb)"};
uint8r_t Help_RT_6[] = {"            Note: RTA's 't' is changed if the CE is on"};

uint8r_t * code RTHelp[] = {
    Help_RT_1,  Help_RT_2,  Help_RT_3,  Help_RT_4, Help_RT_5, Help_RT_6,
    NULL
};
#endif

#if !BROWNOUT_BATMODE 
// Serial Bit Rate Control.
// if there's no brownout mode, more than one rate is ok
uint8r_t Help_Rate_1[] = {"		: (space) - Bit Rate Control"};
uint8r_t Help_Rate_2[] = {" 38400	: Set Serial Port to 38400 bps"};
uint8r_t Help_Rate_3[] = {" 19200	: Set Serial Port to 19200 bps"};
uint8r_t Help_Rate_4[] = {" 9600	: Set Serial Port to  9600 bps"};
uint8r_t Help_Rate_5[] = {" 4800	: Set Serial Port to  4800 bps"};
uint8r_t Help_Rate_6[] = {" 2400	: Set Serial Port to  2400 bps"};
uint8r_t Help_Rate_7[] = {" 1200	: Set Serial Port to  1200 bps"};
uint8r_t Help_Rate_8[] = {"  600	: Set Serial Port to   600 bps"};
uint8r_t Help_Rate_9[] = {"  300	: Set Serial Port to   300 bps"};
uint8r_t Help_Rate_10[] = {"For Example: [space]9600 - set Serial Port bit rate at 9600"};

uint8r_t * code RateHelp[] = {
    Help_Rate_1,    Help_Rate_2,    Help_Rate_3,    Help_Rate_4,
    Help_Rate_5,    Help_Rate_6,    Help_Rate_7,    Help_Rate_8,
    Help_Rate_9,    Help_Rate_10,   NULL
};
#endif

#if CLI_EEPROM
// (EE)Prom controls.
uint8r_t Help_EE_1[]= {"EE         :EEPROM control"};
uint8r_t Help_EE_2[]= {"EECn       :Enable/Disable EEprom Access."};
uint8r_t Help_EE_3[]= {"EEE        :Erase the EEprom."};
uint8r_t Help_EE_4[]= {"EERa.b     :Read EEprom at address 'a' for 'b' bytes."};
uint8r_t Help_EE_5[]= {"EESc...cc; :Write characters to buffer (sets Write length)"};
uint8r_t Help_EE_6[]= {"EETa       :Transmit buffer to EEprom at address 'a'."};
uint8r_t Help_EE_7[]= {"EEWn.n...n :Write values to buffer"};
uint8r_t Help_EE_8[]= {"For example: EEShello;T$0210"};
uint8r_t Help_EE_9[]= {"             Write 'hello' starting at EEProm address 0x210."};

uint8r_t * code EEHelp[] = {
    Help_EE_1,  Help_EE_2,  Help_EE_3,  Help_EE_4,         
    Help_EE_5,  Help_EE_6,  Help_EE_7,  Help_EE_8,        
    Help_EE_9,
    NULL
};
#endif

#if ERROR_RECORDING
// Error Recording.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -