aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32l5/src/bin/usb_hid_mouse.rs
diff options
context:
space:
mode:
authorBoris Faure <[email protected]>2024-04-15 19:53:46 +0200
committerBoris Faure <[email protected]>2024-04-15 19:57:18 +0200
commitae4fb433aef33cfc7993516f880de85d87fa37d8 (patch)
tree24adf6e37574e6e4f04616c2c22c77387b6c6b46 /examples/stm32l5/src/bin/usb_hid_mouse.rs
parent9341ef3b47f67b549b3d202974a2d4a0d62587f1 (diff)
usb-hid: all the RequestHandler method accept &mut self
Diffstat (limited to 'examples/stm32l5/src/bin/usb_hid_mouse.rs')
-rw-r--r--examples/stm32l5/src/bin/usb_hid_mouse.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32l5/src/bin/usb_hid_mouse.rs b/examples/stm32l5/src/bin/usb_hid_mouse.rs
index b340c5df5..3f8c52b82 100644
--- a/examples/stm32l5/src/bin/usb_hid_mouse.rs
+++ b/examples/stm32l5/src/bin/usb_hid_mouse.rs
@@ -112,7 +112,7 @@ async fn main(_spawner: Spawner) {
112struct MyRequestHandler {} 112struct MyRequestHandler {}
113 113
114impl RequestHandler for MyRequestHandler { 114impl RequestHandler for MyRequestHandler {
115 fn get_report(&self, id: ReportId, _buf: &mut [u8]) -> Option<usize> { 115 fn get_report(&mut self, id: ReportId, _buf: &mut [u8]) -> Option<usize> {
116 info!("Get report for {:?}", id); 116 info!("Get report for {:?}", id);
117 None 117 None
118 } 118 }
@@ -122,11 +122,11 @@ impl RequestHandler for MyRequestHandler {
122 OutResponse::Accepted 122 OutResponse::Accepted
123 } 123 }
124 124
125 fn set_idle_ms(&self, id: Option<ReportId>, dur: u32) { 125 fn set_idle_ms(&mut self, id: Option<ReportId>, dur: u32) {
126 info!("Set idle rate for {:?} to {:?}", id, dur); 126 info!("Set idle rate for {:?} to {:?}", id, dur);
127 } 127 }
128 128
129 fn get_idle_ms(&self, id: Option<ReportId>) -> Option<u32> { 129 fn get_idle_ms(&mut self, id: Option<ReportId>) -> Option<u32> {
130 info!("Get idle rate for {:?}", id); 130 info!("Get idle rate for {:?}", id);
131 None 131 None
132 } 132 }