Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USB driver #19

Merged
merged 43 commits into from
Aug 23, 2024
Merged

Add USB driver #19

merged 43 commits into from
Aug 23, 2024

Conversation

HaoboGu
Copy link
Contributor

@HaoboGu HaoboGu commented Jul 6, 2024

No description provided.

@andelf
Copy link
Collaborator

andelf commented Jul 23, 2024

To handle DM/DP reuse in HPM5300(QFN48 and LQFP64):

Add a hpm5300-usb-pin-reuse feature, then if one wants to enable USB, it can be selected by

features = ["hpm5301", "hpm5300-usb-pin-reuse"]

This feature is disabled by default, which is safe.

impl<'d> Usb<'d> {
   pub fn new(peri: impl Peripheral<P = T> + 'd, 
             #[cfg(feature="hpm5300-usb-pin-reuse")] dp: impl Peripheral<P = impl DpPin<T>> + 'd, 
             #[cfg(feature="hpm5300-usb-pin-reuse")] dm: impl Peripheral<P = impl DmPin<T>> + 'd) 
     -> Self { ... }
}

@HaoboGu HaoboGu marked this pull request as ready for review August 18, 2024 14:24
HaoboGu added 28 commits August 23, 2024 17:13
@andelf andelf merged commit 50f6e24 into master Aug 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants