diff --git a/.gitignore b/.gitignore index 3160116..f27971e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target Cargo.lock -src/mouse_config.rs \ No newline at end of file +src/mouse_hid/mouse_config.rs +src/usb_serial/serial_config.rs \ No newline at end of file diff --git a/build.rs b/build.rs index 5ede928..13a35b2 100644 --- a/build.rs +++ b/build.rs @@ -122,4 +122,9 @@ fn main() { "src/mouse_hid/mouse_config.rs", "MouseConfig", ); + create_config_struct( + include_str!("serial.conf"), + "src/usb_serial/serial_config.rs", + "SerialConfig", + ); } diff --git a/serial.conf b/serial.conf new file mode 100644 index 0000000..39384db --- /dev/null +++ b/serial.conf @@ -0,0 +1,5 @@ +vendor_id: 0xc0de +product_id: 0xcafe +manufacturer: "MeMyselfAndI" +product: "Pico Serial" +serial_number: "13371337" \ No newline at end of file diff --git a/src/mouse_hid/mouse_config.rs b/src/mouse_hid/mouse_config.rs deleted file mode 100644 index 01ad942..0000000 --- a/src/mouse_hid/mouse_config.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub struct MouseConfig<'a> { - pub vendor_id: i32, - pub product_id: i32, - pub manufacturer: &'a str, - pub product: &'a str, - pub serial_number: &'a str, -} - -impl<'a> MouseConfig<'a> { - pub const fn new() -> Self { - Self { - vendor_id: 0x046d, - product_id: 0x101b, - manufacturer: "Logitech", - product: "Performance Plus M705", - serial_number: "B14D65DA", - } - } -}