2021-03-14 13:24:34 +00:00
|
|
|
/*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#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:
|
2021-07-28 19:30:47 +00:00
|
|
|
static constexpr const HardwareID hardware_ids[] = {
|
2021-03-14 13:24:34 +00:00
|
|
|
{0x15e4, 0x0132} // ION iCade Controller
|
|
|
|
};
|
|
|
|
|
2021-07-28 19:30:47 +00:00
|
|
|
ICadeController(const bluetooth::Address *address, HardwareID id)
|
|
|
|
: EmulatedSwitchController(address, id) { }
|
2021-03-14 13:24:34 +00:00
|
|
|
|
|
|
|
void UpdateControllerState(const bluetooth::HidReport *report);
|
|
|
|
void ApplyButtonCombos(SwitchButtonData *buttons) override;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|