From 45bcf9e8f0249a984a90e021e69e93b96733ddd4 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 25 Jul 2016 20:42:17 +0200 Subject: CAN: Unify interface names Mostly, the interfaces now simply start with can0 and the number increases for every next interface. Some vendors distinguish between e.g. PCI and USB interfaces. In this case, the interfaces are named usb0 and pci0, with increasing numbers, respectively. Multiple channels per device are accessed by adding the channel number after a dot: can0.0 for the first channel in the first device (TinyCAN). SocketCAN is still a bit different, as it allows arbitrary interface names to be mapped to the hardware or virtual CAN busses. [ChangeLog][QtSerialBus][Unify interface names] The interface names of the different backends were unified to follow a common rule: The prefixes were unified, the numbering now always starts with zero. Change-Id: Ia2ca76a9be01b9123aed1ede90debf69871bb82c Reviewed-by: Denis Shienkov Reviewed-by: Alex Blasche --- src/plugins/canbus/tinycan/tinycanbackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/canbus/tinycan') diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp index 2f9c191..ee2b347 100644 --- a/src/plugins/canbus/tinycan/tinycanbackend.cpp +++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp @@ -305,9 +305,9 @@ QString TinyCanBackendPrivate::systemErrorString(int errorCode) static int channelIndexFromName(const QString &interfaceName) { - if (interfaceName == QStringLiteral("channela")) + if (interfaceName == QStringLiteral("can0.0")) return INDEX_CAN_KANAL_A; - else if (interfaceName == QStringLiteral("channelb")) + else if (interfaceName == QStringLiteral("can0.1")) return INDEX_CAN_KANAL_B; else return INDEX_INVALID; -- cgit v1.2.3