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

e-hal-v1 #172

Merged
merged 15 commits into from
Jan 19, 2025
Merged

e-hal-v1 #172

merged 15 commits into from
Jan 19, 2025

Conversation

usbalbin
Copy link
Member

This is a rebased version of @techmccat's #129 with the addition of 4982a32 to make syst delay work more like before

@usbalbin usbalbin changed the title E hal 1 e-hal-v1 Jan 19, 2025
examples/uart.rs Outdated

let mut cnt = 0;
loop {
match block!(usart.read()) {
match block!(embedded_hal_old::serial::Read::read(&mut usart)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's because the name conflicts with the new trait's
We might want to switch to embedded-io altogether for the examples?

Copy link
Member Author

Choose a reason for hiding this comment

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

Something like this? 1b768d7

Copy link
Contributor

Choose a reason for hiding this comment

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

looks fine

@usbalbin usbalbin force-pushed the e-hal-1 branch 2 times, most recently from 9dcaba8 to 3ee9a6d Compare January 19, 2025 19:12
@usbalbin usbalbin marked this pull request as ready for review January 19, 2025 19:19
@usbalbin usbalbin merged commit c317681 into stm32-rs:main Jan 19, 2025
23 checks passed
@usbalbin
Copy link
Member Author

Again thanks a lot @techmccat for this! :)

usbalbin added a commit that referenced this pull request Jan 27, 2025
* Export pac as pac (#156)

* rm remaining fdcan files (#160)

* defmt format for rcc clocks (#163)

* export PwrExt in prelude (#164)

* e-hal-v1 (#172)

* Implement SpiBus from embedded-hal 1

* i2c: implement embedded-hal traits

* gpio: implement embedded-hal 1 digital traits

* pwm: implement SetDutyCycle from embedded-hal 1

* delay: temporary DelayNs impl (μs-resolution)

* serial: implement embedded-io traits for UART

* bump hal-1, remove ToggleableOutputPin impls

* remove embedded-hal 0.2 from prelude, rename hals

embedded-hal 1.0 renamed from embedded-hal-one to embedded-hal
embedded-hal 0.2 renamed from embedded-hal to embedded-hal-old, still
re-exported as hal-02

* pwm: use set_duty_cycle_percent in example

* run cargo fmt

* remove unused dependencies

I had added them by accident for an example that didn't end up in the PR

* time: fix duration variable names, add doc

* docs: fix cargo doc warnings

* Try to make syst delay work as before

* Cleanup examples

---------

Co-authored-by: techmccat <[email protected]>

---------

Co-authored-by: AdinAck <[email protected]>
Co-authored-by: techmccat <[email protected]>
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