feat: add Set B profiles and low-latency native haptics
Add schema-6 profiles, atomic catalog migration, shortcuts, Shift, configurable Turbo/Burst, macro recording and playback. Promote qualified 300 MHz native DualSense transport to AIO/XInput defaults with bounded bus transactions, credit batching and generation-safe persistent rumble.
This commit is contained in:
parent
44a474e103
commit
3c2d9fa723
75 changed files with 9599 additions and 1819 deletions
8
tests/bluepad32_native_stubs/btstack.h
Normal file
8
tests/bluepad32_native_stubs/btstack.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "btstack_run_loop.h"
|
||||
#include "uni.h"
|
||||
|
||||
uint16_t l2cap_get_remote_mtu_for_local_cid(uint16_t cid);
|
||||
uint8_t l2cap_request_can_send_now_event(uint16_t cid);
|
||||
uint8_t l2cap_send(uint16_t cid, const uint8_t* data, uint16_t size);
|
||||
|
|
@ -6,8 +6,14 @@ struct btstack_timer_source_t {
|
|||
void (*handler)(btstack_timer_source_t*);
|
||||
uint32_t timeout_ms;
|
||||
uint32_t add_count;
|
||||
uint64_t due_ms;
|
||||
};
|
||||
|
||||
#ifdef SWITCH_PICO_HAPTICS_EXPERIMENT
|
||||
void native_test_add_timer(btstack_timer_source_t* timer);
|
||||
int btstack_run_loop_remove_timer(btstack_timer_source_t* timer);
|
||||
#endif
|
||||
|
||||
inline void btstack_run_loop_set_timer_handler(
|
||||
btstack_timer_source_t* timer,
|
||||
void (*handler)(btstack_timer_source_t*)) {
|
||||
|
|
@ -21,6 +27,9 @@ inline void btstack_run_loop_set_timer(btstack_timer_source_t* timer,
|
|||
|
||||
inline void btstack_run_loop_add_timer(btstack_timer_source_t* timer) {
|
||||
++timer->add_count;
|
||||
#ifdef SWITCH_PICO_HAPTICS_EXPERIMENT
|
||||
native_test_add_timer(timer);
|
||||
#endif
|
||||
}
|
||||
uint32_t btstack_run_loop_get_time_ms();
|
||||
inline void btstack_run_loop_execute() {}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
void multicore_launch_core1(void (*entry)());
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
void multicore_launch_core1_with_stack(void (*entry)(), uint32_t* stack, size_t size);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
#pragma once
|
||||
#include <stdint.h>
|
||||
uint32_t time_us_32();
|
||||
uint64_t time_us_64();
|
||||
|
||||
void tight_loop_contents();
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ struct uni_controller_t {
|
|||
uint8_t battery;
|
||||
};
|
||||
|
||||
struct uni_hid_device_t;
|
||||
struct uni_hid_device_s;
|
||||
typedef struct uni_hid_device_s uni_hid_device_t;
|
||||
typedef void (*btstack_packet_handler_t)(uint8_t, uint16_t, uint8_t*,
|
||||
uint16_t);
|
||||
struct btstack_packet_callback_registration_t {
|
||||
|
|
@ -131,9 +132,19 @@ struct uni_bt_conn_t {
|
|||
bd_addr_t btaddr;
|
||||
hci_con_handle_t handle;
|
||||
uni_bt_conn_protocol_t protocol;
|
||||
bool connected;
|
||||
uint16_t interrupt_cid;
|
||||
uint16_t control_cid;
|
||||
};
|
||||
|
||||
struct uni_hid_device_t {
|
||||
struct uni_circular_buffer_t {
|
||||
unsigned queued;
|
||||
};
|
||||
inline uint8_t uni_circular_buffer_is_empty(const uni_circular_buffer_t* buffer) {
|
||||
return buffer->queued == 0;
|
||||
}
|
||||
|
||||
struct uni_hid_device_s {
|
||||
uint16_t vendor_id;
|
||||
uint16_t product_id;
|
||||
uni_bt_conn_t conn;
|
||||
|
|
@ -151,6 +162,7 @@ struct uni_hid_device_t {
|
|||
uint8_t lightbar_blue;
|
||||
int player_led_calls;
|
||||
uint8_t player_leds;
|
||||
uni_circular_buffer_t outgoing_buffer;
|
||||
};
|
||||
|
||||
struct uni_platform {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue