Changed serial TTL display string; added necessary voltage state tracking
This commit is contained in:
parent
9c5f16fd41
commit
8e78b2eb01
|
@ -12,12 +12,17 @@
|
||||||
|
|
||||||
// Map a mode -> text value
|
// Map a mode -> text value
|
||||||
char* modeToText[4] = {
|
char* modeToText[4] = {
|
||||||
"Phone UART",
|
"Serial TTL",
|
||||||
"DB9 - Normal",
|
|
||||||
"DB9 - Null Mdm",
|
"DB9 - Null Mdm",
|
||||||
"Cisco console"
|
"Cisco console"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char* voltageToText[3] = {
|
||||||
|
"1.8V",
|
||||||
|
"3.3V",
|
||||||
|
"5.0V"
|
||||||
|
};
|
||||||
|
|
||||||
// Known and supported line speeds
|
// Known and supported line speeds
|
||||||
linespeedinfo linespeeds[6] = {
|
linespeedinfo linespeeds[6] = {
|
||||||
{ "2400b", 2400 },
|
{ "2400b", 2400 },
|
||||||
|
|
|
@ -30,11 +30,9 @@
|
||||||
// Serial modes supported
|
// Serial modes supported
|
||||||
// Abused in for loops / lookup tables -- DO NOT CHANGE none or set values
|
// Abused in for loops / lookup tables -- DO NOT CHANGE none or set values
|
||||||
enum serialmode {
|
enum serialmode {
|
||||||
phone,
|
ttl,
|
||||||
db9_norm,
|
|
||||||
db9_null,
|
db9_null,
|
||||||
cisco,
|
cisco,
|
||||||
modelinespeed,
|
|
||||||
none=-1
|
none=-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,6 +52,15 @@ enum linespeed {
|
||||||
zero=-1
|
zero=-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum voltage {
|
||||||
|
onePointEight,
|
||||||
|
threePointThree,
|
||||||
|
five,
|
||||||
|
zero=-1
|
||||||
|
};
|
||||||
|
|
||||||
|
extern char* voltageToText[];
|
||||||
|
|
||||||
// Description / speed scruct to use in lookup table
|
// Description / speed scruct to use in lookup table
|
||||||
struct linespeedinfo {
|
struct linespeedinfo {
|
||||||
char* description;
|
char* description;
|
||||||
|
@ -67,5 +74,8 @@ extern linespeedinfo linespeeds[];
|
||||||
extern serialmode currentMode;
|
extern serialmode currentMode;
|
||||||
extern serialmode selectedMode;
|
extern serialmode selectedMode;
|
||||||
extern linespeed currentLineSpeed;
|
extern linespeed currentLineSpeed;
|
||||||
|
extern linespeed selectedLineSpeed;
|
||||||
|
extern voltage currentVoltage;
|
||||||
|
extern voltage selectedVoltage;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
serialmode currentMode = none;
|
serialmode currentMode = none;
|
||||||
serialmode selectedMode = none;
|
serialmode selectedMode = none;
|
||||||
linespeed currentLineSpeed = zero;
|
linespeed currentLineSpeed = zero;
|
||||||
|
linespeed selectedLineSpeed = zero;
|
||||||
|
voltage currentVoltage = zero;
|
||||||
|
voltage selectedVoltage = zero;
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
void setDefaults() {
|
void setDefaults() {
|
||||||
|
|
Reference in a new issue