forked from NaxdyOrg/NaxGCC-FW
adjust config
This commit is contained in:
parent
550e9e089e
commit
fc3c82c8fc
1 changed files with 17 additions and 4 deletions
|
@ -300,7 +300,22 @@ pub async fn usb_transfer_task(raw_serial: [u8; 8], driver: Driver<'static, USB>
|
|||
info!("Detected flash with unique serial number {}", serial);
|
||||
|
||||
trace!("Start of config");
|
||||
let mut usb_config = embassy_usb::Config::new(0x057e, 0x0337);
|
||||
let mut usb_config: embassy_usb::Config;
|
||||
if input_consistency_mode == InputConsistencyMode::XInput {
|
||||
// TODO: might need to change more configs
|
||||
usb_config = embassy_usb::Config::new(0x045e, 0x028e);
|
||||
// necessary?
|
||||
usb_config.device_class = 255;
|
||||
usb_config.device_protocol = 255;
|
||||
usb_config.device_sub_class = 255;
|
||||
} else {
|
||||
usb_config = embassy_usb::Config::new(0x057e, 0x0337);
|
||||
// necessary?
|
||||
usb_config.device_class = 0;
|
||||
usb_config.device_protocol = 0;
|
||||
usb_config.device_sub_class = 0;
|
||||
};
|
||||
|
||||
usb_config.manufacturer = Some("Naxdy");
|
||||
usb_config.product = Some(match input_consistency_mode {
|
||||
InputConsistencyMode::Original => "NaxGCC (OG Mode)",
|
||||
|
@ -312,10 +327,8 @@ pub async fn usb_transfer_task(raw_serial: [u8; 8], driver: Driver<'static, USB>
|
|||
usb_config.serial_number = Some(serial);
|
||||
usb_config.max_power = 200;
|
||||
usb_config.max_packet_size_0 = 64;
|
||||
usb_config.device_class = 0;
|
||||
usb_config.device_protocol = 0;
|
||||
usb_config.self_powered = false;
|
||||
usb_config.device_sub_class = 0;
|
||||
|
||||
usb_config.supports_remote_wakeup = true;
|
||||
|
||||
let mut device_descriptor = [0; 256];
|
||||
|
|
Loading…
Reference in a new issue