/* * Copyright (c) 2020-2021 ndeadly * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include "emulated_switch_controller.hpp" namespace ams::controller { struct ICadeInputReport0x01 { uint8_t keys[9]; } __attribute__((packed)); struct ICadeReportData { uint8_t id; union { ICadeInputReport0x01 input0x01; }; } __attribute__((packed)); class ICadeController : public EmulatedSwitchController { public: static constexpr const HardwareID hardware_ids[] = { {0x15e4, 0x0132} // ION iCade Controller }; ICadeController(const bluetooth::Address *address) : EmulatedSwitchController(address) { }; void UpdateControllerState(const bluetooth::HidReport *report); void ApplyButtonCombos(SwitchButtonData *buttons) override; }; }