- 精华
- 0
- 帖子
- 3821
- 威望
- 0 点
- 积分
- 3896 点
- 种子
- 729 点
- 注册时间
- 2013-2-21
- 最后登录
- 2025-5-15
|
发表于 2025-2-8 18:04 · 上海
|
显示全部楼层
typedef struct {
// Screw this I'll leave it to hid-sony maintainer's internal doc S:
// No he won't implement it. So maybe use DS4Windows docs for now.
uint8_t type; // TODO. 0x6: vibrating, 0x23: 2step
uint8_t params[10]; // 0x6: 0: frequency (1-255), 1: off time (1-255). 0x23: 0: step1 resistance (0-15), 1: step2 resistance (0-15)
} ds5_trigger_t;
typedef struct {
uint16_t flags; // @ 0-1. bitfield fedcba9876543210. 012: rumble emulation (seems that the lowest nibble has to be 0x7 (????????????0111) in order to trigger this), 2: trigger_r, 3: trigger_l, 8: mic_led, a: lightbar, c: player_led
uint8_t rumble_r; // @ 2
uint8_t rumble_l; // @ 3
uint8_t unk3[4]; // @ 4-7
uint8_t mic_led; // @ 8. 0: off, 1: on, 2: pulse
uint8_t unk9; // @ 9
ds5_trigger_t trigger_r;// 10-20
ds5_trigger_t trigger_l; // 21-31
uint8_t unk28[11]; // @ 32-42
uint8_t player_led; // @ 43. 5-bit. LSB is left.
union {
uint8_t lightbar_rgb[3];
struct {
uint8_t lightbar_r;
uint8_t lightbar_g;
uint8_t lightbar_b;
};
}; // @ 44-46
} ds5_feedback_t;
ds5的震动结构体从ds4改了,不过变化不大 |
|