diff options
| author | Boris Faure <[email protected]> | 2024-04-15 19:53:46 +0200 |
|---|---|---|
| committer | Boris Faure <[email protected]> | 2024-04-15 19:57:18 +0200 |
| commit | ae4fb433aef33cfc7993516f880de85d87fa37d8 (patch) | |
| tree | 24adf6e37574e6e4f04616c2c22c77387b6c6b46 /embassy-usb/src/class/hid.rs | |
| parent | 9341ef3b47f67b549b3d202974a2d4a0d62587f1 (diff) | |
usb-hid: all the RequestHandler method accept &mut self
Diffstat (limited to 'embassy-usb/src/class/hid.rs')
| -rw-r--r-- | embassy-usb/src/class/hid.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-usb/src/class/hid.rs b/embassy-usb/src/class/hid.rs index 7d27c2578..6d9e0aced 100644 --- a/embassy-usb/src/class/hid.rs +++ b/embassy-usb/src/class/hid.rs | |||
| @@ -378,7 +378,7 @@ pub trait RequestHandler { | |||
| 378 | /// Reads the value of report `id` into `buf` returning the size. | 378 | /// Reads the value of report `id` into `buf` returning the size. |
| 379 | /// | 379 | /// |
| 380 | /// Returns `None` if `id` is invalid or no data is available. | 380 | /// Returns `None` if `id` is invalid or no data is available. |
| 381 | fn get_report(&self, id: ReportId, buf: &mut [u8]) -> Option<usize> { | 381 | fn get_report(&mut self, id: ReportId, buf: &mut [u8]) -> Option<usize> { |
| 382 | let _ = (id, buf); | 382 | let _ = (id, buf); |
| 383 | None | 383 | None |
| 384 | } | 384 | } |
| @@ -394,7 +394,7 @@ pub trait RequestHandler { | |||
| 394 | /// If `id` is `None`, get the idle rate for all reports. Returning `None` | 394 | /// If `id` is `None`, get the idle rate for all reports. Returning `None` |
| 395 | /// will reject the control request. Any duration at or above 1.024 seconds | 395 | /// will reject the control request. Any duration at or above 1.024 seconds |
| 396 | /// or below 4ms will be returned as an indefinite idle rate. | 396 | /// or below 4ms will be returned as an indefinite idle rate. |
| 397 | fn get_idle_ms(&self, id: Option<ReportId>) -> Option<u32> { | 397 | fn get_idle_ms(&mut self, id: Option<ReportId>) -> Option<u32> { |
| 398 | let _ = id; | 398 | let _ = id; |
| 399 | None | 399 | None |
| 400 | } | 400 | } |
| @@ -403,7 +403,7 @@ pub trait RequestHandler { | |||
| 403 | /// | 403 | /// |
| 404 | /// If `id` is `None`, set the idle rate of all input reports to `dur`. If | 404 | /// If `id` is `None`, set the idle rate of all input reports to `dur`. If |
| 405 | /// an indefinite duration is requested, `dur` will be set to `u32::MAX`. | 405 | /// an indefinite duration is requested, `dur` will be set to `u32::MAX`. |
| 406 | fn set_idle_ms(&self, id: Option<ReportId>, duration_ms: u32) { | 406 | fn set_idle_ms(&mut self, id: Option<ReportId>, duration_ms: u32) { |
| 407 | let _ = (id, duration_ms); | 407 | let _ = (id, duration_ms); |
| 408 | } | 408 | } |
| 409 | } | 409 | } |
