mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 04:10:25 +00:00
otg: Allow exact out buffer size
The existing check required N+1 buffer size.
This commit is contained in:
parent
897d42e012
commit
5d6877cbc6
@ -357,7 +357,7 @@ impl<'d, const MAX_EP_COUNT: usize> Driver<'d, MAX_EP_COUNT> {
|
||||
);
|
||||
|
||||
if D::dir() == Direction::Out {
|
||||
if self.ep_out_buffer_offset + max_packet_size as usize >= self.ep_out_buffer.len() {
|
||||
if self.ep_out_buffer_offset + max_packet_size as usize > self.ep_out_buffer.len() {
|
||||
error!("Not enough endpoint out buffer capacity");
|
||||
return Err(EndpointAllocError);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user