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

Cleanup dma module #1480

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Cleanup dma module #1480

merged 3 commits into from
Apr 24, 2024

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Apr 19, 2024

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • My changes were added to the CHANGELOG.md in the proper section.

Extra:

Pull Request Details 📖

Description

  • address the TODO comments in the module (mostly having errors handled by the Futures)
  • seal traits where needed
  • improve documentation
    • hide docs for internal types which technically need to be public
    • remove hal-developer focused content from module documentation
  • mark unsafe functions unsafe (Clippy was right IMHO)
  • hide Instance and InstanceDma in SPI module

Testing

All examples should exactly work as before. This has some potential to break things - we should be careful

@bjoernQ bjoernQ added the skip-changelog No changelog modification needed label Apr 19, 2024
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Initial review will probably follow up next week, but overall looking great! Thanks for doing this, having better error handling is going to be really nice because I think we can close a bunch of issues around this topic.

@bjoernQ bjoernQ marked this pull request as draft April 19, 2024 14:41
@bjoernQ
Copy link
Contributor Author

bjoernQ commented Apr 19, 2024

Converted to draft since I decided to think about a few things a bit more. Probably already start reviewing it wouldn't hurt

@bjoernQ bjoernQ force-pushed the cleanup-dma-module branch from 1454710 to 38e0ab0 Compare April 22, 2024 08:32
@bjoernQ bjoernQ marked this pull request as ready for review April 22, 2024 08:40
Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

Code LGTM!
I tried some DMA-related examples and on ESP32 the embassy_spi doesn't print any data transferred, main branch works fine. Others examples seems to be working fine for me.

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Apr 23, 2024

Code LGTM! I tried some DMA-related examples and on ESP32 the embassy_spi doesn't print any data transferred, main branch works fine. Others examples seems to be working fine for me.

Thanks for testing ... I can reproduce this!

@bjoernQ bjoernQ force-pushed the cleanup-dma-module branch from 38e0ab0 to 80cddba Compare April 23, 2024 12:27
@bjoernQ
Copy link
Contributor Author

bjoernQ commented Apr 23, 2024

@JurajSadel embassy_spi now works for me on ESP32

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bjoernQ bjoernQ force-pushed the cleanup-dma-module branch from 80cddba to 3ff7508 Compare April 23, 2024 13:59
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you, very nice improvements. Very excited to have error handling for async!

}

impl<'a, TX> core::future::Future for DmaTxFuture<'a, TX>
where
TX: Tx,
{
type Output = (); // TODO handle DMA errors
type Output = Result<(), DmaError>;
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@MabezDev MabezDev added this pull request to the merge queue Apr 24, 2024
Merged via the queue into esp-rs:main with commit fa99a1a Apr 24, 2024
21 checks passed
@bjoernQ bjoernQ deleted the cleanup-dma-module branch November 26, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants