├── rust-toolchain.toml ├── .vscode └── settings.json ├── .gitignore ├── .cargo └── config.toml ├── Cargo.toml ├── LICENSE-MIT ├── src └── main.rs ├── LICENSE-APACHE └── Cargo.lock /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "esp" 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.checkOnSave.allTargets": false, 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | debug/ 4 | target/ 5 | 6 | # These are backup files generated by rustfmt 7 | **/*.rs.bk 8 | 9 | # MSVC Windows builds of rustc generate these, which store debugging information 10 | *.pdb 11 | -------------------------------------------------------------------------------- /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.xtensa-esp32s3-none-elf] 2 | runner = "espflash --monitor" 3 | 4 | [build] 5 | rustflags = [ 6 | "-C", "link-arg=-nostartfiles", 7 | "-C", "link-arg=-Wl,-Tlinkall.x", 8 | ] 9 | target = "xtensa-esp32s3-none-elf" 10 | 11 | [unstable] 12 | build-std = ["core"] 13 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hid_test" 3 | version = "0.1.0" 4 | authors = ["bjoernQ "] 5 | edition = "2021" 6 | license = "MIT OR Apache-2.0" 7 | 8 | [profile.dev] 9 | opt-level = 3 10 | 11 | [dependencies] 12 | esp32s3-hal = { git = "https://github.com/esp-rs/esp-hal/", package = "esp32s3-hal" } 13 | esp-backtrace = { version = "0.2.0", features = ["esp32s3", "panic-handler", "print-uart"] } 14 | esp-println = {version = "0.3.0", features = ["esp32s3"] } 15 | xtensa-lx-rt = { version = "0.13.0", features = ["esp32s3"], optional = true } 16 | 17 | usbd-hid-device = "0.1.0" 18 | usbd-hid = "0.6.1" 19 | usb-device = "0.2.9" 20 | critical-section = "1.1.1" 21 | 22 | [features] 23 | default = ["rt"] 24 | rt = ["xtensa-lx-rt"] 25 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright [year] [fullname] 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![no_std] 2 | #![no_main] 3 | 4 | use esp32s3_hal::{ 5 | clock::ClockControl, 6 | otg_fs::{UsbBus, USB}, 7 | pac::Peripherals, 8 | prelude::*, 9 | timer::TimerGroup, 10 | Rtc, IO, 11 | }; 12 | use esp_backtrace as _; 13 | use usb_device::prelude::{UsbDeviceBuilder, UsbVidPid}; 14 | use usbd_hid::descriptor::SerializedDescriptor; 15 | use usbd_hid::{descriptor::MouseReport, hid_class::HIDClass}; 16 | 17 | static mut EP_MEMORY: [u32; 1024] = [0; 1024]; 18 | 19 | pub const USB_VID: u16 = 0x0000; 20 | pub const USB_PID: u16 = 0x0000; 21 | 22 | #[xtensa_lx_rt::entry] 23 | fn main() -> ! { 24 | let peripherals = Peripherals::take().unwrap(); 25 | let mut system = peripherals.SYSTEM.split(); 26 | let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); 27 | 28 | // Disable the RTC and TIMG watchdog timers 29 | let mut rtc = Rtc::new(peripherals.RTC_CNTL); 30 | let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks); 31 | let mut wdt0 = timer_group0.wdt; 32 | let timer_group1 = TimerGroup::new(peripherals.TIMG1, &clocks); 33 | let mut wdt1 = timer_group1.wdt; 34 | 35 | rtc.rwdt.disable(); 36 | wdt0.disable(); 37 | wdt1.disable(); 38 | 39 | let io = IO::new(peripherals.GPIO, peripherals.IO_MUX); 40 | 41 | let usb = USB::new( 42 | peripherals.USB0, 43 | io.pins.gpio18, 44 | io.pins.gpio19, 45 | io.pins.gpio20, 46 | &mut system.peripheral_clock_control, 47 | ); 48 | 49 | let usb_bus = UsbBus::new(usb, unsafe { &mut EP_MEMORY }); 50 | 51 | let mut hid = HIDClass::new(&usb_bus, MouseReport::desc(), 60); 52 | 53 | let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(USB_VID, USB_PID)) 54 | .manufacturer("m") 55 | .product("p") 56 | .serial_number("123") 57 | .device_class(3) 58 | .build(); 59 | 60 | loop { 61 | if !usb_dev.poll(&mut [&mut hid]) { 62 | continue; 63 | } 64 | 65 | let _res = hid.push_input(&MouseReport { 66 | x: 0, 67 | y: 4, 68 | buttons: 0, 69 | wheel: 0, 70 | pan: 0, 71 | }); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.7.19" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anyhow" 16 | version = "1.0.66" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" 19 | 20 | [[package]] 21 | name = "autocfg" 22 | version = "1.1.0" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 25 | 26 | [[package]] 27 | name = "bare-metal" 28 | version = "1.0.0" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" 31 | 32 | [[package]] 33 | name = "bitfield" 34 | version = "0.13.2" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "46afbd2983a5d5a7bd740ccb198caf5b82f45c40c09c0eed36052d91cb92e719" 37 | 38 | [[package]] 39 | name = "byteorder" 40 | version = "1.4.3" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 43 | 44 | [[package]] 45 | name = "cfg-if" 46 | version = "1.0.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 49 | 50 | [[package]] 51 | name = "core-isa-parser" 52 | version = "0.2.0" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "23ec98e54b735872e54b2335c2e5a5c7fa7d9c3bfd45500f75280f84089a0083" 55 | dependencies = [ 56 | "anyhow", 57 | "enum-as-inner", 58 | "regex", 59 | "strum", 60 | "strum_macros", 61 | ] 62 | 63 | [[package]] 64 | name = "critical-section" 65 | version = "1.1.1" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" 68 | 69 | [[package]] 70 | name = "darling" 71 | version = "0.14.2" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" 74 | dependencies = [ 75 | "darling_core", 76 | "darling_macro", 77 | ] 78 | 79 | [[package]] 80 | name = "darling_core" 81 | version = "0.14.2" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" 84 | dependencies = [ 85 | "fnv", 86 | "ident_case", 87 | "proc-macro2", 88 | "quote", 89 | "strsim", 90 | "syn", 91 | ] 92 | 93 | [[package]] 94 | name = "darling_macro" 95 | version = "0.14.2" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" 98 | dependencies = [ 99 | "darling_core", 100 | "quote", 101 | "syn", 102 | ] 103 | 104 | [[package]] 105 | name = "embedded-dma" 106 | version = "0.2.0" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "994f7e5b5cb23521c22304927195f236813053eb9c065dd2226a32ba64695446" 109 | dependencies = [ 110 | "stable_deref_trait", 111 | ] 112 | 113 | [[package]] 114 | name = "embedded-hal" 115 | version = "0.2.7" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff" 118 | dependencies = [ 119 | "nb 0.1.3", 120 | "void", 121 | ] 122 | 123 | [[package]] 124 | name = "encode_unicode" 125 | version = "0.3.6" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" 128 | 129 | [[package]] 130 | name = "enum-as-inner" 131 | version = "0.4.0" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" 134 | dependencies = [ 135 | "heck", 136 | "proc-macro2", 137 | "quote", 138 | "syn", 139 | ] 140 | 141 | [[package]] 142 | name = "esp-backtrace" 143 | version = "0.2.0" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "1cc04e4a62fe7905eab18e12715feaded6cb51a5a878a0c067bbe29436bad96a" 146 | dependencies = [ 147 | "esp-println 0.2.2", 148 | "xtensa-lx-rt", 149 | ] 150 | 151 | [[package]] 152 | name = "esp-hal-common" 153 | version = "0.2.0" 154 | source = "git+https://github.com/esp-rs/esp-hal/#c4d77d6c66fc6af122b40e48ff1e51d87c43cf08" 155 | dependencies = [ 156 | "cfg-if", 157 | "critical-section", 158 | "embedded-dma", 159 | "embedded-hal", 160 | "esp-hal-procmacros", 161 | "esp-synopsys-usb-otg", 162 | "esp32s3", 163 | "fugit", 164 | "lock_api", 165 | "nb 1.0.0", 166 | "paste", 167 | "usb-device", 168 | "void", 169 | "xtensa-lx", 170 | "xtensa-lx-rt", 171 | ] 172 | 173 | [[package]] 174 | name = "esp-hal-procmacros" 175 | version = "0.1.0" 176 | source = "git+https://github.com/esp-rs/esp-hal/#c4d77d6c66fc6af122b40e48ff1e51d87c43cf08" 177 | dependencies = [ 178 | "darling", 179 | "proc-macro-error", 180 | "proc-macro2", 181 | "quote", 182 | "syn", 183 | ] 184 | 185 | [[package]] 186 | name = "esp-println" 187 | version = "0.2.2" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "dab33baae57ce7c0869c32885ff136f9c8405e0c201d039ccd767c3e7f79502b" 190 | 191 | [[package]] 192 | name = "esp-println" 193 | version = "0.3.1" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "adcfe5d532cf2029b11996cab6b4af948f41c24b131c76422115634711549aaa" 196 | 197 | [[package]] 198 | name = "esp-synopsys-usb-otg" 199 | version = "0.3.1" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "0879f2f008c0213b1a5959345e54afcbf1490c1591f5145a5e65bdff371b65af" 202 | dependencies = [ 203 | "critical-section", 204 | "embedded-hal", 205 | "usb-device", 206 | "vcell", 207 | ] 208 | 209 | [[package]] 210 | name = "esp32s3" 211 | version = "0.8.0" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "7b386f809a74303847184dee12763b5f49c1880fb11778b12b15e8790ba93c91" 214 | dependencies = [ 215 | "critical-section", 216 | "vcell", 217 | "xtensa-lx", 218 | "xtensa-lx-rt", 219 | ] 220 | 221 | [[package]] 222 | name = "esp32s3-hal" 223 | version = "0.2.0" 224 | source = "git+https://github.com/esp-rs/esp-hal/#c4d77d6c66fc6af122b40e48ff1e51d87c43cf08" 225 | dependencies = [ 226 | "bare-metal", 227 | "embedded-hal", 228 | "esp-hal-common", 229 | "xtensa-lx", 230 | "xtensa-lx-rt", 231 | ] 232 | 233 | [[package]] 234 | name = "fnv" 235 | version = "1.0.7" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 238 | 239 | [[package]] 240 | name = "fugit" 241 | version = "0.3.6" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "7ab17bb279def6720d058cb6c052249938e7f99260ab534879281a95367a87e5" 244 | dependencies = [ 245 | "gcd", 246 | ] 247 | 248 | [[package]] 249 | name = "gcd" 250 | version = "2.1.0" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "f37978dab2ca789938a83b2f8bc1ef32db6633af9051a6cd409eff72cbaaa79a" 253 | dependencies = [ 254 | "paste", 255 | ] 256 | 257 | [[package]] 258 | name = "heck" 259 | version = "0.4.0" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 262 | 263 | [[package]] 264 | name = "hid_test" 265 | version = "0.1.0" 266 | dependencies = [ 267 | "critical-section", 268 | "esp-backtrace", 269 | "esp-println 0.3.1", 270 | "esp32s3-hal", 271 | "usb-device", 272 | "usbd-hid", 273 | "usbd-hid-device", 274 | "xtensa-lx-rt", 275 | ] 276 | 277 | [[package]] 278 | name = "ident_case" 279 | version = "1.0.1" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 282 | 283 | [[package]] 284 | name = "lock_api" 285 | version = "0.4.9" 286 | source = "registry+https://github.com/rust-lang/crates.io-index" 287 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 288 | dependencies = [ 289 | "autocfg", 290 | "scopeguard", 291 | ] 292 | 293 | [[package]] 294 | name = "memchr" 295 | version = "2.5.0" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 298 | 299 | [[package]] 300 | name = "minijinja" 301 | version = "0.15.0" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "359c4820413be7706e93999171652e140578384f85faac14cb22d350bd0fbabf" 304 | dependencies = [ 305 | "serde", 306 | ] 307 | 308 | [[package]] 309 | name = "mutex-trait" 310 | version = "0.2.0" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a" 313 | 314 | [[package]] 315 | name = "nb" 316 | version = "0.1.3" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f" 319 | dependencies = [ 320 | "nb 1.0.0", 321 | ] 322 | 323 | [[package]] 324 | name = "nb" 325 | version = "1.0.0" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "546c37ac5d9e56f55e73b677106873d9d9f5190605e41a856503623648488cae" 328 | 329 | [[package]] 330 | name = "paste" 331 | version = "1.0.8" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22" 334 | 335 | [[package]] 336 | name = "proc-macro-error" 337 | version = "1.0.4" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 340 | dependencies = [ 341 | "proc-macro-error-attr", 342 | "proc-macro2", 343 | "quote", 344 | "syn", 345 | "version_check", 346 | ] 347 | 348 | [[package]] 349 | name = "proc-macro-error-attr" 350 | version = "1.0.4" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 353 | dependencies = [ 354 | "proc-macro2", 355 | "quote", 356 | "version_check", 357 | ] 358 | 359 | [[package]] 360 | name = "proc-macro2" 361 | version = "1.0.47" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 364 | dependencies = [ 365 | "unicode-ident", 366 | ] 367 | 368 | [[package]] 369 | name = "quote" 370 | version = "1.0.21" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 373 | dependencies = [ 374 | "proc-macro2", 375 | ] 376 | 377 | [[package]] 378 | name = "r0" 379 | version = "1.0.0" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "bd7a31eed1591dcbc95d92ad7161908e72f4677f8fabf2a32ca49b4237cbf211" 382 | 383 | [[package]] 384 | name = "regex" 385 | version = "1.7.0" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" 388 | dependencies = [ 389 | "aho-corasick", 390 | "memchr", 391 | "regex-syntax", 392 | ] 393 | 394 | [[package]] 395 | name = "regex-syntax" 396 | version = "0.6.28" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" 399 | 400 | [[package]] 401 | name = "rustversion" 402 | version = "1.0.9" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" 405 | 406 | [[package]] 407 | name = "scopeguard" 408 | version = "1.1.0" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 411 | 412 | [[package]] 413 | name = "serde" 414 | version = "1.0.147" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" 417 | 418 | [[package]] 419 | name = "spin" 420 | version = "0.9.4" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" 423 | dependencies = [ 424 | "lock_api", 425 | ] 426 | 427 | [[package]] 428 | name = "ssmarshal" 429 | version = "1.0.0" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "f3e6ad23b128192ed337dfa4f1b8099ced0c2bf30d61e551b65fda5916dbb850" 432 | dependencies = [ 433 | "encode_unicode", 434 | "serde", 435 | ] 436 | 437 | [[package]] 438 | name = "stable_deref_trait" 439 | version = "1.2.0" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 442 | 443 | [[package]] 444 | name = "strsim" 445 | version = "0.10.0" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 448 | 449 | [[package]] 450 | name = "strum" 451 | version = "0.24.1" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 454 | 455 | [[package]] 456 | name = "strum_macros" 457 | version = "0.24.3" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 460 | dependencies = [ 461 | "heck", 462 | "proc-macro2", 463 | "quote", 464 | "rustversion", 465 | "syn", 466 | ] 467 | 468 | [[package]] 469 | name = "syn" 470 | version = "1.0.103" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" 473 | dependencies = [ 474 | "proc-macro2", 475 | "quote", 476 | "unicode-ident", 477 | ] 478 | 479 | [[package]] 480 | name = "unicode-ident" 481 | version = "1.0.5" 482 | source = "registry+https://github.com/rust-lang/crates.io-index" 483 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 484 | 485 | [[package]] 486 | name = "usb-device" 487 | version = "0.2.9" 488 | source = "registry+https://github.com/rust-lang/crates.io-index" 489 | checksum = "1f6cc3adc849b5292b4075fc0d5fdcf2f24866e88e336dd27a8943090a520508" 490 | 491 | [[package]] 492 | name = "usbd-hid" 493 | version = "0.6.1" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "975bd411f4a939986751ea09992a24fa47c4d25c6ed108d04b4c2999a4fd0132" 496 | dependencies = [ 497 | "serde", 498 | "ssmarshal", 499 | "usb-device", 500 | "usbd-hid-macros", 501 | ] 502 | 503 | [[package]] 504 | name = "usbd-hid-descriptors" 505 | version = "0.1.2" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "dcbee8c6735e90894fba04770bc41e11fd3c5256018856e15dc4dd1e6c8a3dd1" 508 | dependencies = [ 509 | "bitfield", 510 | ] 511 | 512 | [[package]] 513 | name = "usbd-hid-device" 514 | version = "0.1.1" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "a6458a7119d68e106afc404af6b3a641fa03ddeaa98cda9b68a65bf3db6a98dd" 517 | dependencies = [ 518 | "embedded-hal", 519 | "usb-device", 520 | ] 521 | 522 | [[package]] 523 | name = "usbd-hid-macros" 524 | version = "0.6.0" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "261079a9ada015fa1acac7cc73c98559f3a92585e15f508034beccf6a2ab75a2" 527 | dependencies = [ 528 | "byteorder", 529 | "proc-macro2", 530 | "quote", 531 | "serde", 532 | "syn", 533 | "usbd-hid-descriptors", 534 | ] 535 | 536 | [[package]] 537 | name = "vcell" 538 | version = "0.1.3" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002" 541 | 542 | [[package]] 543 | name = "version_check" 544 | version = "0.9.4" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 547 | 548 | [[package]] 549 | name = "void" 550 | version = "1.0.2" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 553 | 554 | [[package]] 555 | name = "xtensa-lx" 556 | version = "0.7.0" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "b874b2b60f9c25682e0961fd53a802053e6950f7567bc6f2d6c734fb6d93f45a" 559 | dependencies = [ 560 | "bare-metal", 561 | "mutex-trait", 562 | "r0", 563 | "spin", 564 | ] 565 | 566 | [[package]] 567 | name = "xtensa-lx-rt" 568 | version = "0.13.0" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "33a17a83d25998da4f2dca85afb6456ea340d3bde0211bebac011eb45dcbd2f4" 571 | dependencies = [ 572 | "bare-metal", 573 | "core-isa-parser", 574 | "minijinja", 575 | "r0", 576 | "xtensa-lx-rt-proc-macros", 577 | ] 578 | 579 | [[package]] 580 | name = "xtensa-lx-rt-proc-macros" 581 | version = "0.1.0" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "21a8200930e2dbd515c231f7a46033bd6dfe1497a8e9a539878f0de8f0cd730b" 584 | dependencies = [ 585 | "proc-macro2", 586 | "quote", 587 | "syn", 588 | ] 589 | --------------------------------------------------------------------------------