From 954c41d6e981b22d1ce99edd2ef8ae4582177232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 18 Jan 2017 22:32:22 +0100 Subject: [PATCH] IOS: Move out common USB structures Some structures will be reused and shared between several IOS USB device implementations. This prepares for the upcoming USB PR. I've also removed GetPointer calls in the trivial case (BT passthrough) --- Source/Core/Common/Logging/Log.h | 1 + Source/Core/Common/Logging/LogManager.cpp | 1 + Source/Core/Core/CMakeLists.txt | 2 + Source/Core/Core/Core.vcxproj | 4 + Source/Core/Core/Core.vcxproj.filters | 14 +- Source/Core/Core/IOS/USB/Bluetooth/BTBase.cpp | 27 ---- Source/Core/Core/IOS/USB/Bluetooth/BTBase.h | 29 ---- Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp | 44 ++--- Source/Core/Core/IOS/USB/Bluetooth/BTEmu.h | 11 +- Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp | 152 +++++++++--------- Source/Core/Core/IOS/USB/Bluetooth/BTReal.h | 11 +- Source/Core/Core/IOS/USB/Common.cpp | 31 ++++ Source/Core/Core/IOS/USB/Common.h | 114 +++++++++++++ Source/Core/Core/IOS/USB/USBV0.cpp | 47 ++++++ Source/Core/Core/IOS/USB/USBV0.h | 45 ++++++ Source/Core/Core/IOS/USB/USB_HIDv4.cpp | 28 ++-- Source/Core/Core/IOS/USB/USB_HIDv4.h | 68 +------- 17 files changed, 387 insertions(+), 242 deletions(-) create mode 100644 Source/Core/Core/IOS/USB/Common.cpp create mode 100644 Source/Core/Core/IOS/USB/Common.h create mode 100644 Source/Core/Core/IOS/USB/USBV0.cpp create mode 100644 Source/Core/Core/IOS/USB/USBV0.h diff --git a/Source/Core/Common/Logging/Log.h b/Source/Core/Common/Logging/Log.h index b225fe8dbd2..ce46bcb8e2f 100644 --- a/Source/Core/Common/Logging/Log.h +++ b/Source/Core/Common/Logging/Log.h @@ -36,6 +36,7 @@ enum LOG_TYPE IOS_SD, IOS_SSL, IOS_STM, + IOS_USB, IOS_WC24, IOS_WIIMOTE, MASTER_LOG, diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp index 1d3281ff63e..4cb786095b9 100644 --- a/Source/Core/Common/Logging/LogManager.cpp +++ b/Source/Core/Common/Logging/LogManager.cpp @@ -70,6 +70,7 @@ LogManager::LogManager() m_Log[LogTypes::IOS_SSL] = new LogContainer("IOS_SSL", "IOS - SSL"); m_Log[LogTypes::IOS_STM] = new LogContainer("IOS_STM", "IOS - State Transition Manager"); m_Log[LogTypes::IOS_NET] = new LogContainer("IOS_NET", "IOS - Network"); + m_Log[LogTypes::IOS_USB] = new LogContainer("IOS_USB", "IOS - USB"); m_Log[LogTypes::IOS_WC24] = new LogContainer("IOS_WC24", "IOS - WiiConnect24"); m_Log[LogTypes::IOS_WIIMOTE] = new LogContainer("IOS_WIIMOTE", "IOS - Wii Remote"); m_Log[LogTypes::MASTER_LOG] = new LogContainer("*", "Master Log"); diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index c38ed5859e0..8600ac87a4a 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -151,6 +151,8 @@ set(SRCS ActionReplay.cpp IOS/Network/SSL.cpp IOS/SDIO/SDIOSlot0.cpp IOS/STM/STM.cpp + IOS/USB/Common.cpp + IOS/USB/USBV0.cpp IOS/USB/USB_KBD.cpp IOS/USB/USB_VEN.cpp IOS/USB/Bluetooth/BTBase.cpp diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj index 02196974530..ea2bb187b80 100644 --- a/Source/Core/Core/Core.vcxproj +++ b/Source/Core/Core/Core.vcxproj @@ -183,6 +183,8 @@ + +