Gate new controller pairing behind BOOTSEL

This commit is contained in:
Joey Yakimowich-Payne 2026-09-01 07:49:03 -06:00
commit 74a62f035b
6 changed files with 172 additions and 12 deletions

View file

@ -26,6 +26,13 @@ struct btstack_link_key_iterator_t {
enum {
ERROR_CODE_SUCCESS = 0,
HCI_EVENT_PACKET = 4,
HCI_EVENT_USER_CONFIRMATION_REQUEST = 0x33,
HCI_EVENT_USER_PASSKEY_REQUEST = 0x34,
SM_STK_GENERATION_METHOD_JUST_WORKS = 0x01,
SM_STK_GENERATION_METHOD_OOB = 0x02,
SM_STK_GENERATION_METHOD_PASSKEY = 0x04,
SM_STK_GENERATION_METHOD_NUMERIC_COMPARISON = 0x08,
};
typedef int uni_property_idx_t;
typedef int uni_platform_oob_event_t;
@ -80,6 +87,12 @@ struct uni_controller_t {
};
struct uni_hid_device_t;
typedef void (*btstack_packet_handler_t)(uint8_t, uint16_t, uint8_t*,
uint16_t);
struct btstack_packet_callback_registration_t {
void* item;
btstack_packet_handler_t callback;
};
typedef void (*uni_play_dual_rumble_t)(uni_hid_device_t*, uint16_t,
uint16_t, uint8_t, uint8_t);
typedef void (*uni_set_player_leds_t)(uni_hid_device_t*, uint8_t);
@ -148,5 +161,20 @@ void uni_bt_bredr_scan_start();
void uni_bt_bredr_scan_stop();
void uni_bt_le_scan_start();
void uni_bt_le_scan_stop();
void gap_set_bondable_mode(int enabled);
void gap_ssp_set_auto_accept(int auto_accept);
void sm_set_accepted_stk_generation_methods(
uint8_t accepted_stk_generation_methods);
int gap_ssp_confirmation_response(const bd_addr_t address);
int gap_ssp_confirmation_negative(const bd_addr_t address);
int gap_ssp_passkey_response(const bd_addr_t address, uint32_t passkey);
int gap_ssp_passkey_negative(const bd_addr_t address);
void hci_add_event_handler(
btstack_packet_callback_registration_t* callback_handler);
uint8_t hci_event_packet_get_type(const uint8_t* packet);
void hci_event_user_confirmation_request_get_bd_addr(
const uint8_t* packet, bd_addr_t address);
void hci_event_user_passkey_request_get_bd_addr(
const uint8_t* packet, bd_addr_t address);
void uni_platform_set_custom(uni_platform* platform);
int uni_init(int argc, const char** argv);