diff --git a/Universal_Serial_Adapter/Project.cpp b/Universal_Serial_Adapter/Project.cpp index 628f786..a4ca947 100644 --- a/Universal_Serial_Adapter/Project.cpp +++ b/Universal_Serial_Adapter/Project.cpp @@ -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 }, diff --git a/Universal_Serial_Adapter/Project.h b/Universal_Serial_Adapter/Project.h index 337225f..b95df17 100644 --- a/Universal_Serial_Adapter/Project.h +++ b/Universal_Serial_Adapter/Project.h @@ -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 diff --git a/Universal_Serial_Adapter/Universal_Serial_Adapter.ino b/Universal_Serial_Adapter/Universal_Serial_Adapter.ino index 1205947..3467ab7 100644 --- a/Universal_Serial_Adapter/Universal_Serial_Adapter.ino +++ b/Universal_Serial_Adapter/Universal_Serial_Adapter.ino @@ -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() {