From cf8c5a31c76591ffadd5b241016b71534a3c9448 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Wed, 7 Apr 2021 00:23:29 -0400 Subject: [PATCH] I2C: Add as type and fix network definitions The first I2C was mysteriously missing, it is here now. In addition, I2C support will soon be requested so it has been given its own type. --- include/icsneo/communication/network.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/icsneo/communication/network.h b/include/icsneo/communication/network.h index d731a00..f4d219b 100644 --- a/include/icsneo/communication/network.h +++ b/include/icsneo/communication/network.h @@ -102,6 +102,7 @@ public: FlexRay = 85, FlexRay2 = 86, OP_Ethernet12 = 87, + I2C = 88, MOST25 = 90, MOST50 = 91, MOST150 = 92, @@ -133,6 +134,7 @@ public: LSFTCAN = 7, SWCAN = 8, ISO9141 = 9, + I2C = 10, Any = 0xFE, // Never actually set as type, but used as flag for filtering Other = 0xFF }; @@ -158,6 +160,8 @@ public: return "Low Speed Fault Tolerant CAN"; case Type::SWCAN: return "Single Wire CAN"; + case Type::I2C: + return "I²C"; case Type::Invalid: default: return "Invalid Type"; @@ -227,6 +231,11 @@ public: case NetID::ISO9141_3: case NetID::ISO9141_4: return Type::ISO9141; + case NetID::I2C: + case NetID::I2C2: + case NetID::I2C3: + case NetID::I2C4: + return Type::I2C; default: return Type::Other; } @@ -403,6 +412,8 @@ public: return "FlexRay 2"; case NetID::OP_Ethernet12: return "OP (BR) Ethernet 12"; + case NetID::I2C: + return "I2C"; case NetID::MOST25: return "MOST25"; case NetID::MOST50: