📄 mystrings.c
字号:
/*************************************************************************
mystrings.c
This file declares various string names
Copyright (C) 2001-2004 by Cirrus Logic Inc. All Rights Reserved
*************************************************************************/
#include <string.h>
#pragma psect code=mystrings //store strings in specific memory location
//see makefile to determine location.
//update the version information here.
code char s_Intro1[] =
"\r\nEV-2 CobraLine version 2.3.2 copyright 2004 Cirrus Logic, Inc.";
code char str_Revision[] = "2.3.2"; //format is major.minor.revision
//command strings here
code char str_Com_testev[] = "testev";
code char str_Com_route[] = "route";
code char str_Com_audio[] = "audio";
code char str_Com_peekev[] = "peekev";
code char str_Com_pokeev[] = "pokeev";
code char str_Com_peek[] = "peek";
code char str_Com_poke[] = "poke";
code char str_Com_read[] = "read";
code char str_Com_write[] = "write";
code char str_Com_led[] = "led";
code char str_Com_packet[] = "packet";
code char str_Com_query[] = "query";
//miscellaneous string
code char str_SysName[] = "PEAK_AUDIO_COBRANET_EV2_"; //system name
code char str_ColonSpace[] = ": ";
code char str_Arrow[] = " <-- ";
code char str_CRLF[] = "\r\n";
code char str_Pass[] = "PASS: ";
code char str_Fail[] = "FAIL: ";
code char str_HexAscii[] = "0123456789ABCDEF";
code char str_SysDescr[] = "Description: ";
code char str_Contact[] = "Contact: ";
code char str_Name[] = "Name: ";
code char str_Location[] = "Location: ";
code char str_IFDesc[] = "IF Description: ";
code char str_MAC[] = "MAC #: ";
code char str_CNIP[] = "IP Address: ";
code char str_CobraNet[] = "CobraNet";
code char str_EV2V[] = "EV-2 MCU8051";
code char str_FPGAV[] = "EV-2 FPGA";
code char str_SysStatus[] = "System status: ";
code char str_Ready[] = "Ready";
code char str_Calibrating[] = "Calibrating";
code char str_HexSwitches[] = "Hex switches: ";
code char str_Version[] = " Version: ";
code char str_Waiting[] = "Waiting... press any key to continue.";
code char str_NoHost[] = "Host port not responding";
code char str_Read[] = "Read: ";
code char str_Wrote[] = "Wrote: ";
code char str_HexPrefix[] = "0x";
code char str_un[] = "un";
code char str_CM[] = "CM";
code char str_Zero[] = "0";
code char str_One[] = "1";
code char str_Two[] = "2";
code char str_Space3[] = " ";
code char str_Prompt[] = ">";
code char str_Space[] = " ";
code char str_Period[] = ".";
//command.c
code char str_list[] = "List of commands:";
code char str_Info[] = "Type '<Command> ?' for detailed info. Example: led ?";
code char str_unknown[] = "Unknown Command. Type ? for a list of commands.";
code char str_sales[] =
"CobraNet Sales: 949.643.1114, Cirrus Logic,Inc: 800.888.5016";
code unsigned short code gMAC_Destination[ 3 ] = {
0x0160,
0x2BFF,
0xFF01
};
//************************************************************************
// error strings *
//************************************************************************
//these are the strings for error.c
code char noErrorStr[] = " ";
code char str_ErrorColon[] = "Error: ";
code char str_err_BadArg[] = "Invalid argument. ";
code char errorStr2[] = "Too many characters.";
code char errorStr3[] = "Missing characters.";
code char errorStr4[] = "Bad Hex Character(s).";
code char errorStr5[] = "Bad Hex Format.";
code char errorStr6[] = "Missing argument(s).";
code char errorStr7[] = "Bad decimal format.";
code char errorStr8[] = "Parameter out of range.";
code char errorStr9[] = "Too few characters";
code char errorStr10[] = "CobraNet Module not found. System halted.";
//these are other error messages
code char str_err_BadAddr[] = "Invalid <address>: ";
code char str_err_BadValue[] = "Invalid <value>: ";
code char hmi_Str1[] = "Bad <target>: Invalid MIB name or ";
code char hmi_Str3[] = "Peek error: ";
code char hmi_Str4[] = "Poke error: ";
code char hmi_Str5[] = "Bad count value.";
code char err_Timeout_str[] = "Translate Timeout.";
code char err_Test_str1[] = "Mute Not Found";
code char err_Test_str2[] = "No WatchDawg";
code char err_Test_str3[] = "Host Failure";
code char err_Test_str4[] = "Memory Error";
code char err_CM1_str1[] = "TRDY Timeout.";
code char err_CM1_str2[] = "HF2 High Wait.";
code char err_CM1_str3[] = "HF2 Low Wait.";
code char err_CM1_str4[] = "RXDF Timeout.";
code char err_CM1_str5[] = "TXDE Timeout.";
code char err_CM1_str6[] = "TRDY Read Timeout.";
code char err_ReadLength[] = "read length error: ";
//************************************************************************
// led.c strings *
//************************************************************************
code char str_green[] = "green";
code char str_red[] = "red";
code char str_yellow[] = "yellow";
code char str_all[] = "all";
code char str_on[] = "on";
code char str_off[] = "off";
code char str_blinkon[] = "blink+";
code char str_blinkoff[] = "blink-";
code char str_toggle[] = "toggle";
code char * code led_color_arguments[] = {
str_green,
str_red,
str_yellow,
str_all,
NULL
};
code char * code led_operation_arguments[] = {
str_on,
str_off,
str_blinkon,
str_blinkoff,
str_toggle,
NULL
};
//************************************************************************
// audio.c strings *
//************************************************************************
code char str_ssi0[] = "ssi0";
code char str_ssi1[] = "ssi1";
code char str_ssi2[] = "ssi2";
code char str_ssi3[] = "ssi3";
code char str_dac[] = "dac";
code char str_aes[] = "aes";
code char str_adc1[] = "adc1";
code char str_adc2[] = "adc2";
code char str_sine[] = "sine";
code char str_mute[] = "mute";
code char * code audio_outputs[] = {
str_ssi0,
str_ssi1,
str_ssi2,
str_ssi3,
str_dac,
str_aes,
NULL
};
code char * code audio_inputs[] = {
str_ssi0,
str_ssi1,
str_ssi2,
str_ssi3,
str_adc1,
str_aes,
str_adc2,
str_sine,
str_mute,
NULL
};
code char str_0dB[] = "0db";
code char str_6dB[] = "-6db";
code char str_12dB[] = "-12db";
code char str_18dB[] = "-18db";
code char str_48k[] = "48k";
code char str_96k[] = "96k";
code char str_48kd[] = "48kd";
code char str_192k[] = "192k";
code char str_samplerate[] = "samplerate";
code char str_calibrate[] = "calibrate";
code char str_gain[] = "gain";
code char str_frequency[] = "frequency";
code char * code audio_ops[] = {
str_samplerate,
str_calibrate,
str_gain,
str_frequency,
NULL
};
code char * code str_Gain[] = {
str_0dB,
str_6dB,
str_12dB,
str_18dB,
NULL
};
code char * code str_SampleRate[] = {
str_48k,
str_96k,
str_48kd,
str_192k,
NULL
};
//************************************************************************
// host_reg.c strings *
//************************************************************************
code char str_msg[] = "msg";
code char str_data[] = "data";
code char str_msga[] = "msga";
code char str_msgb[] = "msgb";
code char str_msgc[] = "msgc";
code char str_msgd[] = "msgd";
code char str_dataa[] = "dataa";
code char str_datab[] = "datab";
code char str_datac[] = "datac";
code char str_datad[] = "datad";
code char str_icr[] = "icr";
code char str_cvr[] = "cvr";
code char str_isr[] = "isr";
code char str_ivr[] = "ivr";
code char str_unused[] = "unused";
code char str_drh[] = "drh";
code char str_drm[] = "drm";
code char str_drl[] = "drl";
code char str_control[] = "control";
code char str_status[] = "status";
code char * code reg_arguments[] = {
str_msg,
str_data,
str_msga,
str_msgb,
str_msgc,
str_msgd,
str_dataa,
str_datab,
str_datac,
str_datad,
str_icr,
str_cvr,
str_isr,
str_ivr,
str_unused,
str_drh,
str_drm,
str_drl,
str_control,
str_status,
NULL
};
//************************************************************************
// query.c strings *
//************************************************************************
code char str_system[] = "system";
code char str_hex[] = "hex";
code char str_cnmute[] = "cnmute";
code char str_mac[] = "mac";
code char str_device[] = "device";
code char str_hack[] = "hack";
code char str_hreq[] = "hreq";
code char str_route[] = "route";
code char str_freq[] = "frequency";
code char * code query_arguments[] = {
str_system,
str_hex,
str_status,
str_cnmute,
str_mac,
str_device,
str_hack,
str_hreq,
str_mute,
str_route,
str_gain,
str_freq,
NULL
};
//************************************************************************
// test.c strings *
//************************************************************************
code char str_memory[] = "memory";
code char str_watchdog[] = "watchdog";
code char str_host[] = "host";
code char str_resetcn[] = "resetcn";
code char * code testev_arguments[] = {
str_memory,
str_watchdog,
str_host,
str_resetcn,
NULL
};
code unsigned char pattern_memCode[] = {
0x00,0x55,0xaa,0x33,0xcc,0x99,0x66,0xa5,0x5a,0xc3,0x3c,0x96,0x69,0x7e,0x81,0xff
};
//************************************************************************
// packet.c strings *
//************************************************************************
code char str_command[] = "command";
code char str_text[] = "text";
code char str_testtx[] = "testtx";
code char str_testrx[] = "testrx";
code char * code packet_arguments[] = {
str_command,
str_text,
str_on,
str_off,
str_testtx,
str_testrx,
NULL
};
//************************************************************************
// HELP strings *
//************************************************************************
//audio help strings
code char audio_str_help1[] = "audio <operation> [value]";
code char audio_str_help2[] = " <operation>:\r\n"
" samplerate [value]: 48k, 96k\r\n"
" calibrate\r\n"
" gain [value]: 0dB, -6dB, -12dB, -18dB\r\n"
" frequency [value]: 0x1 to 0x8 = multiple of fundamental";
//led help strings
code char led_str_help1[] = "led <color> <operation>";
code char led_str_help2[] = " <color>: green, red, yellow, all\r\n"
" <operation>: on, off, blink+, "
"blink-, toggle\r\n"
" Example: led green toggle";
code char packet_str_help1[] = "packet <operation> <parameter>";
code char packet_str_help2[] = " <operation>:\r\n"
" command\r\n"
" <parameter> = any valid line command\r\n"
" text\r\n"
" <parameter> = any text here\r\n"
" on - turn packet processing on\r\n"
" off - turn packet processing off\r\n"
" Example: packet command query system.\r\n"
" Example: packet text just type anything here!";
//peek and poke help strings
code char peek_str_help1[] = "peek <target> [offset]";
code char peek_str_help2[] = " <target>: either a 3-byte hex format "
"with 0x suffix or a MIB variable name.\r\n"
" [offset]: optional, hex format, used with "
"multi-value MIB variables.\r\n"
" Example: peek 0x12468A\r\n"
" Example: peek sysdescr\r\n"
" Example: peek txBundle 0x1";
code char poke_str_help1[] = "poke <target> <value> [offset]";
code char poke_str_help2[] = " <target>: either a 3-byte hex format with "
"0x suffix or a MIB variable name.\r\n"
" <value>: hex format with 0x suffix\r\n"
" [offset]: optional, hex format, used with "
"multi-value MIB variables.\r\n"
" Example: poke 0x24001 0xE100\r\n"
" Example: poke serialBaud 0xE100";
//peekev help strings
code char peekev_str_help1[] = "peekev <target>";
code char peekev_str_help2[] = " <target>: 2-byte hex format with 0x suffix.\r\n"
" Example: peekev 0x1246";
//pokeev help strings
code char pokeev_str_help1[] = "pokeev <target> <value>";
code char pokeev_str_help2[] = " <target>: 2-byte hex format with 0x suffix.\r\n"
" <value>: 1-byte hex format with 0x suffix.\r\n"
" Example: pokeev 0x2400 0xE1";
code char query_str_help1[] = "query <what>";
code char query_str_help2[] = " <what>: system, hex, status, cnmute,"
" mac, device, hack, hreq, mute, route,"
" gain, frequency\r\n"
" Example: query system";
code char regwr_str_help1[] = "write <register> <value>";
code char regwr_str_help2[] = " <register>:\r\n"
" CM2: msg, data, msga, msgb, msgc, msgd, "
"dataa, datab, datac, datad\r\n"
" CM1: icr, cvr, isr, ivr, drh, drm, drl\r\n"
" <value>: hex format with '0x' suffix.\r\n"
" Example: write msg 0x31AB123F";
code char regrd_str_help1[] = "read <register>";
code char regrd_str_help2[] = " <register>:\r\n"
" CM2: msg, data, msga, msgb, msgc, msgd, "
"dataa, datab, datac, datad, control, status\r\n"
" CM1: icr, cvr, isr, ivr, drh, drm, drl\r\n"
" Example: read data";
//route help strings
code char route_str_help1[] = "route <input> <output>";
code char route_str_help2[] = " <input>: ssi0, ssi1, ssi2, ssi3, "
"adc1, adc2, aes, sine, mute\r\n"
" <output>: ssi0, ssi1, ssi2, ssi3, "
"dac, aes\r\n"
" Example: route adc1 ssi2";
code char test_str_help1[] = "testev <what>";
code char test_str_help2[] = " <what>: memory, watchdog, host, resetcn\r\n"
" Example: testev memory";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -