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

[WIP] USB support #133

Closed
wants to merge 3 commits into from
Closed

[WIP] USB support #133

wants to merge 3 commits into from

Conversation

jonas-schievink
Copy link
Contributor

I have not managed to get this to enumerate yet, but it tries. Also had to work around an erratum that just makes the peripheral Not Work ™️ unless some magic values are written to magic addresses.

Comment on lines +1 to +10
/// Writes `val` to `addr`. Used to apply Errata workarounds.
unsafe fn poke(addr: u32, val: u32) {
*(addr as *mut u32) = val;
}

/// Reads 32 bits from `addr`.
unsafe fn peek(addr: u32) -> u32 {
*(addr as *mut u32)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be volatile operations ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought I made them volatile...

@japaric japaric mentioned this pull request May 11, 2020
@jonas-schievink
Copy link
Contributor Author

Closing in favor of #144

@jonas-schievink jonas-schievink deleted the usb branch May 14, 2020 11:23
wez added a commit that referenced this pull request Feb 14, 2021
Fixes compilation by pointing to current versions and takes in
@unrelentingtech's fork of usb-device and suggestion in
#144 (review)

I folded in the hello world portion from japaric's PR summary text.

refs: rust-embedded-community/usb-device#51

closes: #144
Disasm pushed a commit to Disasm/nrf-hal that referenced this pull request Feb 17, 2021
Fixes compilation by pointing to current versions and takes in
@unrelentingtech's fork of usb-device and suggestion in
nrf-rs#144 (review)

I folded in the hello world portion from japaric's PR summary text.

refs: rust-embedded-community/usb-device#51

closes: nrf-rs#144
fnafnio pushed a commit to fnafnio/nrf-hal that referenced this pull request May 12, 2021
Fixes compilation by pointing to current versions and takes in
@unrelentingtech's fork of usb-device and suggestion in
nrf-rs#144 (review)

I folded in the hello world portion from japaric's PR summary text.

refs: rust-embedded-community/usb-device#51

closes: nrf-rs#144
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