Add Wii MotionPlus support and calibrated Nunchuk controls
This commit is contained in:
parent
46f42a26dc
commit
fa38123873
27 changed files with 3003 additions and 57 deletions
19
tests/bluepad32_native_stubs/parser/uni_hid_parser_wii.h
Normal file
19
tests/bluepad32_native_stubs/parser/uni_hid_parser_wii.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <uni.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum wii_flags {
|
||||
WII_MODE_HORIZONTAL = 0,
|
||||
WII_MODE_VERTICAL = 1,
|
||||
WII_MODE_ACCEL = 2,
|
||||
} wii_mode_t;
|
||||
|
||||
void uni_hid_parser_wii_set_mode(uni_hid_device_t* device, wii_mode_t mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -83,6 +83,11 @@ enum {
|
|||
MISC_BUTTON_CAPTURE = 1 << 3,
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
CONTROLLER_TYPE_UnknownController = 0,
|
||||
CONTROLLER_TYPE_WiiController = 35,
|
||||
} uni_controller_type_t;
|
||||
|
||||
typedef enum {
|
||||
CONTROLLER_SUBTYPE_NONE = 0,
|
||||
CONTROLLER_SUBTYPE_WIIMOTE_HORIZONTAL,
|
||||
|
|
@ -163,6 +168,7 @@ inline uint8_t uni_circular_buffer_is_empty(const uni_circular_buffer_t* buffer)
|
|||
struct uni_hid_device_s {
|
||||
uint16_t vendor_id;
|
||||
uint16_t product_id;
|
||||
uni_controller_type_t controller_type;
|
||||
uni_controller_subtype_t controller_subtype;
|
||||
uni_bt_conn_t conn;
|
||||
int idx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue