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