aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-04-07 02:21:38 +0200
committerDario Nieuwenhuis <[email protected]>2023-04-07 02:28:36 +0200
commit8469a2409c9ded4bb66040475f365c60b261b51f (patch)
tree42b3f2f6b061bf826ef1458f8cfff4a2cca134e0
parentdee1d51ad3089b03c67aaa75c7985cf95ce90eec (diff)
stm32/otg: add U5 support.
-rw-r--r--embassy-stm32/src/usb_otg/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-stm32/src/usb_otg/mod.rs b/embassy-stm32/src/usb_otg/mod.rs
index 84fef78cb..193e0df0d 100644
--- a/embassy-stm32/src/usb_otg/mod.rs
+++ b/embassy-stm32/src/usb_otg/mod.rs
@@ -89,6 +89,9 @@ foreach_interrupt!(
89 } else if #[cfg(stm32h7)] { 89 } else if #[cfg(stm32h7)] {
90 const FIFO_DEPTH_WORDS: u16 = 1024; 90 const FIFO_DEPTH_WORDS: u16 = 1024;
91 const ENDPOINT_COUNT: usize = 9; 91 const ENDPOINT_COUNT: usize = 9;
92 } else if #[cfg(stm32u5)] {
93 const FIFO_DEPTH_WORDS: u16 = 320;
94 const ENDPOINT_COUNT: usize = 6;
92 } else { 95 } else {
93 compile_error!("USB_OTG_FS peripheral is not supported by this chip."); 96 compile_error!("USB_OTG_FS peripheral is not supported by this chip.");
94 } 97 }
@@ -137,6 +140,9 @@ foreach_interrupt!(
137 ))] { 140 ))] {
138 const FIFO_DEPTH_WORDS: u16 = 1024; 141 const FIFO_DEPTH_WORDS: u16 = 1024;
139 const ENDPOINT_COUNT: usize = 9; 142 const ENDPOINT_COUNT: usize = 9;
143 } else if #[cfg(stm32u5)] {
144 const FIFO_DEPTH_WORDS: u16 = 1024;
145 const ENDPOINT_COUNT: usize = 9;
140 } else { 146 } else {
141 compile_error!("USB_OTG_HS peripheral is not supported by this chip."); 147 compile_error!("USB_OTG_HS peripheral is not supported by this chip.");
142 } 148 }