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

Porting i2c to the extension trait pattern #28

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

hargoniX
Copy link
Member

See #27

@richardeoin
Copy link
Member

LGTM

I can't reproduce the CI failure though. Let's try re-running it.

@richardeoin
Copy link
Member

richardeoin commented Jul 28, 2019

The CI fail looks like a breakage from svd2rust 0.15.0 (changelog)

  • [breaking-change] for access to alternate registers functions now used instead of untagged_unions (no more nightly features)

Creating an issue #29

richardeoin added a commit to richardeoin/stm32h7xx-hal that referenced this pull request Jul 28, 2019
svd2rust makes the following breaking change

> [breaking-change] for access to alternate registers functions now
  used instead of untagged_unions (no more nightly features)

Fix by making function calls for `cmrrX_output`.

Fixing this will be a breaking change for anyone building `stm32-rs`
locally. To bring your build enviroment up-to-date:

```
cargo install svd2rust --force
```

Closes stm32-rs#29

Unblocks stm32-rs#28 and others
@richardeoin richardeoin added this to the v0.2.0 release milestone Jul 28, 2019
@hargoniX
Copy link
Member Author

Also as this is apparently 0.2.0 now I wanted to add another thought, the busy_wait macro in this implementation, responsible for waiting for an ACK on the bus would send the program to an infinite loop if there was no ACK present, it would probably be better to implement it so it actually throws an error, however I'm not exactly sure how to do that as this is the only way proposed in the reference manual for ACK detection I could find

bors bot added a commit that referenced this pull request Jul 29, 2019
30: svd2rust: breaking changes from update to v0.15.0 r=jordens a=richardeoin

svd2rust v0.15.0 makes the following breaking change ([changelog](https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#v0150---2019-07-25))

> [breaking-change] for access to alternate registers functions now
  used instead of untagged_unions (no more nightly features)

Fix by making function calls for `cmrrX_output`.

Fixing this will be a breaking change for anyone building `stm32-rs`
locally. To bring your build enviroment up-to-date:

```
cargo install svd2rust --force
```

Closes #29

Unblocks #28 and others

Co-authored-by: Richard Meadows <[email protected]>
@richardeoin richardeoin self-requested a review July 29, 2019 17:45
@richardeoin
Copy link
Member

@hargoniX : The meaning of the milestone is something that should resolved before 0.2.0 is released. These changes look good and are simple, so merging now.

The ACK issue is interesting, there's definitely an argument for passing a delay/timer so the HAL can timeout. It should be the subject of another Issue/PR though.

bors r+

bors bot added a commit that referenced this pull request Jul 29, 2019
19: timers, bugfix: fix periodic CountDown timer r=richardeoin a=richardeoin

Previously the `CountDown` timer failed to start a new countdown if the periodic timer was running and no `wait()` call was made in the previous period. This was as the UIF bit was already set.

See embedded-hal docs for the contract:
https://docs.rs/embedded-hal/0.2.3/embedded_hal/timer/trait.CountDown.html#tymethod.start

Add  example to demonstrate correct behaviour.

26: rcc: add options to configure more PLL outputs r=richardeoin a=richardeoin

* All 3 outputs of PLL1 can be configured.
* Moving closer to a generic interface for PLL2/PLL3; just needs macro
  definitions and call to setup.
* An `assert` will occour if pll1_p_ck is set independently when it is
  requried for sys_ck.
* When `pll1_r_ck` is `None` in the configuration struct, it is set if
  required to keep `traceclk` running. Afaict there's no documentation
  on acceptable frequencies for `traceclk`, set p_ck/2 as a sensible
  choice (can be overridden by setting some `pll1_r_ck`).

27: Init traits prelude r=richardeoin a=richardeoin

adc: Add initialisation trait

Simplifies usage:

```rust
let _ = adc::Adc::adc3(dp.ADC3, &mut delay, &mut ccdr);
```
to
```rust
let _ = dp.ADC3.adc(&mut delay, &mut ccdr);
```

Previous method still works.

Re-work arguments for timer, doesn't break anything as there aren't any examples yet.

Closes #20 

28: Porting i2c to the extension trait pattern r=richardeoin a=hargoniX

See #27 

31: dependencies: use stm32h7 PAC 0.8 r=richardeoin a=jordens

* remove and warnings notes on using the local build of stm32h7
* bump cortex-m-rt to 0.6.10 (.ARM.exidx section)
* mention that this works with beta

close: #5 

Co-authored-by: Richard Meadows <[email protected]>
Co-authored-by: Henrik Böving <[email protected]>
Co-authored-by: Robert Jördens <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jul 29, 2019

Timed out (retrying...)

bors bot added a commit that referenced this pull request Jul 29, 2019
27: Init traits prelude r=richardeoin a=richardeoin

adc: Add initialisation trait

Simplifies usage:

```rust
let _ = adc::Adc::adc3(dp.ADC3, &mut delay, &mut ccdr);
```
to
```rust
let _ = dp.ADC3.adc(&mut delay, &mut ccdr);
```

Previous method still works.

Re-work arguments for timer, doesn't break anything as there aren't any examples yet.

Closes #20 

28: Porting i2c to the extension trait pattern r=richardeoin a=hargoniX

See #27 

31: dependencies: use stm32h7 PAC 0.8 r=richardeoin a=jordens

* remove and warnings notes on using the local build of stm32h7
* bump cortex-m-rt to 0.6.10 (.ARM.exidx section)
* mention that this works with beta

close: #5 

Co-authored-by: Richard Meadows <[email protected]>
Co-authored-by: Henrik Böving <[email protected]>
Co-authored-by: Robert Jördens <[email protected]>
@bors bors bot merged commit 6096232 into stm32-rs:master Jul 29, 2019
@bors
Copy link
Contributor

bors bot commented Jul 29, 2019

Build succeeded

  • continuous-integration/travis-ci/push

mtthw-meyer pushed a commit to mtthw-meyer/stm32h7xx-hal that referenced this pull request Jul 9, 2020
svd2rust makes the following breaking change

> [breaking-change] for access to alternate registers functions now
  used instead of untagged_unions (no more nightly features)

Fix by making function calls for `cmrrX_output`.

Fixing this will be a breaking change for anyone building `stm32-rs`
locally. To bring your build enviroment up-to-date:

```
cargo install svd2rust --force
```

Closes stm32-rs#29

Unblocks stm32-rs#28 and others
mtthw-meyer pushed a commit to mtthw-meyer/stm32h7xx-hal that referenced this pull request Jul 9, 2020
30: svd2rust: breaking changes from update to v0.15.0 r=jordens a=richardeoin

svd2rust v0.15.0 makes the following breaking change ([changelog](https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#v0150---2019-07-25))

> [breaking-change] for access to alternate registers functions now
  used instead of untagged_unions (no more nightly features)

Fix by making function calls for `cmrrX_output`.

Fixing this will be a breaking change for anyone building `stm32-rs`
locally. To bring your build enviroment up-to-date:

```
cargo install svd2rust --force
```

Closes stm32-rs#29

Unblocks stm32-rs#28 and others

Co-authored-by: Richard Meadows <[email protected]>
mtthw-meyer pushed a commit to mtthw-meyer/stm32h7xx-hal that referenced this pull request Jul 9, 2020
27: Init traits prelude r=richardeoin a=richardeoin

adc: Add initialisation trait

Simplifies usage:

```rust
let _ = adc::Adc::adc3(dp.ADC3, &mut delay, &mut ccdr);
```
to
```rust
let _ = dp.ADC3.adc(&mut delay, &mut ccdr);
```

Previous method still works.

Re-work arguments for timer, doesn't break anything as there aren't any examples yet.

Closes stm32-rs#20 

28: Porting i2c to the extension trait pattern r=richardeoin a=hargoniX

See stm32-rs#27 

31: dependencies: use stm32h7 PAC 0.8 r=richardeoin a=jordens

* remove and warnings notes on using the local build of stm32h7
* bump cortex-m-rt to 0.6.10 (.ARM.exidx section)
* mention that this works with beta

close: stm32-rs#5 

Co-authored-by: Richard Meadows <[email protected]>
Co-authored-by: Henrik Böving <[email protected]>
Co-authored-by: Robert Jördens <[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.

3 participants