diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-02-17 10:56:57 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-02-17 10:56:57 +0000 |
| commit | fbdd2e7a77929739d1b079818a28b46835b2d132 (patch) | |
| tree | e0c266fb361fd7dc4e011498faee6864025243c8 | |
| parent | 897d42e01214396b448e5aae06a4186a4c282e7a (diff) | |
| parent | 5d6877cbc6c8f5570cce7b311cc06e2667897afb (diff) | |
Merge pull request #3892 from mkj/pr/otg-outbuf
otg: Allow exact out buffer size
| -rw-r--r-- | embassy-usb-synopsys-otg/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-usb-synopsys-otg/src/lib.rs b/embassy-usb-synopsys-otg/src/lib.rs index 44b2bd093..fc4428b54 100644 --- a/embassy-usb-synopsys-otg/src/lib.rs +++ b/embassy-usb-synopsys-otg/src/lib.rs | |||
| @@ -357,7 +357,7 @@ impl<'d, const MAX_EP_COUNT: usize> Driver<'d, MAX_EP_COUNT> { | |||
| 357 | ); | 357 | ); |
| 358 | 358 | ||
| 359 | if D::dir() == Direction::Out { | 359 | if D::dir() == Direction::Out { |
| 360 | if self.ep_out_buffer_offset + max_packet_size as usize >= self.ep_out_buffer.len() { | 360 | if self.ep_out_buffer_offset + max_packet_size as usize > self.ep_out_buffer.len() { |
| 361 | error!("Not enough endpoint out buffer capacity"); | 361 | error!("Not enough endpoint out buffer capacity"); |
| 362 | return Err(EndpointAllocError); | 362 | return Err(EndpointAllocError); |
| 363 | } | 363 | } |
