feat: support Switch 2 controllers and expanded profiles
This commit is contained in:
parent
4e48b7a9e7
commit
a87917bf0b
51 changed files with 4371 additions and 365 deletions
22
tests/switch2_parser_native_stubs/protocol_fixture.h
Normal file
22
tests/switch2_parser_native_stubs/protocol_fixture.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <btstack.h>
|
||||
#include "uni_hid_device.h"
|
||||
|
||||
// The parser uses the SDK's actual GATT types/accessors. Only the asynchronous
|
||||
// radio, run loop, platform admission and persistence endpoints are simulated.
|
||||
enum fixture_query { QUERY_NONE, QUERY_SERVICE, QUERY_CHARACTERISTICS, QUERY_DESCRIPTORS, QUERY_CCCD, QUERY_WRITE };
|
||||
struct fixture_peer {
|
||||
uni_hid_device_t device;
|
||||
bool used, link_alive;
|
||||
enum fixture_query query;
|
||||
btstack_packet_handler_t callback;
|
||||
uint16_t descriptor_value, cccd_handle;
|
||||
uint8_t command[32];
|
||||
uint16_t command_length;
|
||||
const uint8_t* pending_write;
|
||||
uint16_t pending_length;
|
||||
uint8_t rumble[33];
|
||||
uint16_t rumble_length;
|
||||
unsigned commands, rumbles;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue