Skip to content

Commit

Permalink
Fix unused variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
M3gaFr3ak committed Sep 25, 2024
1 parent 07972ee commit f13d310
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
12 changes: 12 additions & 0 deletions embassy-nrf/src/usb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@ impl<'d, T: Instance, V: VbusDetect + 'd> driver::Driver<'d> for Driver<'d, T, V
}

fn grow_endpoint_in_buffer(&mut self, ep: &mut Self::EndpointIn, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}

fn grow_endpoint_out_buffer(&mut self, ep: &mut Self::EndpointOut, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}
}
Expand Down Expand Up @@ -318,18 +322,26 @@ impl<'d, T: Instance, V: VbusDetect> driver::Bus for Bus<'d, T, V> {
}

fn endpoint_set_buffersize(&mut self, ep_addr: EndpointAddress, buf_size: u16) {
let _ = ep_addr;
let _ = buf_size;
warn!("Not implemented yet!!!");
}

fn endpoint_set_sync_type(&mut self, ep_addr: EndpointAddress, synchronization_type: SynchronizationType) {
let _ = ep_addr;
let _ = synchronization_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_usage_type(&mut self, ep_addr: EndpointAddress, usage_type: UsageType) {
let _ = ep_addr;
let _ = usage_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_type(&mut self, ep_addr: EndpointAddress, ep_type: EndpointType) {
let _ = ep_addr;
let _ = ep_type;
warn!("Not implemented yet!!!");
}

Expand Down
16 changes: 15 additions & 1 deletion embassy-stm32/src/usb/otg.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use core::marker::PhantomData;

use embassy_hal_internal::{into_ref, Peripheral};
use embassy_usb_driver::{EndpointAddress, EndpointAllocError, EndpointType, Event, SynchronizationType, Unsupported, UsageType};
use embassy_usb_driver::{
EndpointAddress, EndpointAllocError, EndpointType, Event, SynchronizationType, Unsupported, UsageType,
};
use embassy_usb_synopsys_otg::otg_v1::vals::Dspd;
use embassy_usb_synopsys_otg::otg_v1::Otg;
pub use embassy_usb_synopsys_otg::Config;
Expand Down Expand Up @@ -236,10 +238,14 @@ impl<'d, T: Instance> embassy_usb_driver::Driver<'d> for Driver<'d, T> {
}

fn grow_endpoint_in_buffer(&mut self, ep: &mut Self::EndpointIn, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}

fn grow_endpoint_out_buffer(&mut self, ep: &mut Self::EndpointOut, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}
}
Expand Down Expand Up @@ -329,18 +335,26 @@ impl<'d, T: Instance> embassy_usb_driver::Bus for Bus<'d, T> {
}

fn endpoint_set_buffersize(&mut self, ep_addr: EndpointAddress, buf_size: u16) {
let _ = ep_addr;
let _ = buf_size;
warn!("Not implemented yet!!!");
}

fn endpoint_set_sync_type(&mut self, ep_addr: EndpointAddress, synchronization_type: SynchronizationType) {
let _ = ep_addr;
let _ = synchronization_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_usage_type(&mut self, ep_addr: EndpointAddress, usage_type: UsageType) {
let _ = ep_addr;
let _ = usage_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_type(&mut self, ep_addr: EndpointAddress, ep_type: EndpointType) {
let _ = ep_addr;
let _ = ep_type;
warn!("Not implemented yet!!!");
}

Expand Down
13 changes: 12 additions & 1 deletion embassy-stm32/src/usb/usb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,14 @@ impl<'d, T: Instance> driver::Driver<'d> for Driver<'d, T> {
}

fn grow_endpoint_in_buffer(&mut self, ep: &mut Self::EndpointIn, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}


fn grow_endpoint_out_buffer(&mut self, ep: &mut Self::EndpointOut, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}
}
Expand Down Expand Up @@ -652,18 +655,26 @@ impl<'d, T: Instance> driver::Bus for Bus<'d, T> {
}

fn endpoint_set_buffersize(&mut self, ep_addr: EndpointAddress, buf_size: u16) {
let _ = ep_addr;
let _ = buf_size;
warn!("Not implemented yet!!!");
}

fn endpoint_set_sync_type(&mut self, ep_addr: EndpointAddress, synchronization_type: SynchronizationType) {
let _ = ep_addr;
let _ = synchronization_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_usage_type(&mut self, ep_addr: EndpointAddress, usage_type: UsageType) {
let _ = ep_addr;
let _ = usage_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_type(&mut self, ep_addr: EndpointAddress, ep_type: EndpointType) {
let _ = ep_addr;
let _ = ep_type;
warn!("Not implemented yet!!!");
}

Expand Down
15 changes: 14 additions & 1 deletion embassy-usb-synopsys-otg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ use core::task::Poll;

use embassy_sync::waitqueue::AtomicWaker;
use embassy_usb_driver::{
Bus as _, Direction, EndpointAddress, EndpointAllocError, EndpointError, EndpointIn, EndpointInfo, EndpointOut, EndpointType, Event, SynchronizationType, Unsupported, UsageType
Bus as _, Direction, EndpointAddress, EndpointAllocError, EndpointError, EndpointIn, EndpointInfo, EndpointOut,
EndpointType, Event, SynchronizationType, Unsupported, UsageType,
};

pub mod otg_v1;
Expand Down Expand Up @@ -497,10 +498,14 @@ impl<'d, const MAX_EP_COUNT: usize> embassy_usb_driver::Driver<'d> for Driver<'d
}

fn grow_endpoint_in_buffer(&mut self, ep: &mut Self::EndpointIn, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}

fn grow_endpoint_out_buffer(&mut self, ep: &mut Self::EndpointOut, new_max_packet_size: u16) {
let _ = new_max_packet_size;
let _ = ep;
warn!("Not implemented yet!!!");
}
}
Expand Down Expand Up @@ -889,18 +894,26 @@ impl<'d, const MAX_EP_COUNT: usize> embassy_usb_driver::Bus for Bus<'d, MAX_EP_C
}

fn endpoint_set_buffersize(&mut self, ep_addr: EndpointAddress, buf_size: u16) {
let _ = ep_addr;
let _ = buf_size;
warn!("Not implemented yet!!!");
}

fn endpoint_set_sync_type(&mut self, ep_addr: EndpointAddress, synchronization_type: SynchronizationType) {
let _ = ep_addr;
let _ = synchronization_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_usage_type(&mut self, ep_addr: EndpointAddress, usage_type: UsageType) {
let _ = ep_addr;
let _ = usage_type;
warn!("Not implemented yet!!!");
}

fn endpoint_set_type(&mut self, ep_addr: EndpointAddress, ep_type: EndpointType) {
let _ = ep_addr;
let _ = ep_type;
warn!("Not implemented yet!!!");
}

Expand Down

0 comments on commit f13d310

Please sign in to comment.