Merge pull request #3892 from mkj/pr/otg-outbuf

otg: Allow exact out buffer size
This commit is contained in:
Dario Nieuwenhuis 2025-02-17 10:56:57 +00:00 committed by GitHub
commit fbdd2e7a77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -357,7 +357,7 @@ impl<'d, const MAX_EP_COUNT: usize> Driver<'d, MAX_EP_COUNT> {
); );
if D::dir() == Direction::Out { 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"); error!("Not enough endpoint out buffer capacity");
return Err(EndpointAllocError); return Err(EndpointAllocError);
} }