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

bump stm32f1 0.10.0 #185

Merged
merged 2 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Breaking changes

- Bump `stm32f1` dependency (`0.10.0`)
Copy link
Member

Choose a reason for hiding this comment

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

It's a breaking change, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't remember any change for f1 in stm32-rs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Technically it is as this is a semver incompatible version export. If a user depend on stm32f1 0.9 and this half, it will break compilation as the 2 types will be different.

- Make traits `rcc::Enable` and `rcc::Reset` public, but `RccBus` sealed

### Added

- Extend the Pwm implementation to cover the full embedded_hal::Pwm API
- Add `QeiOptions` struct to configure slave mode and auto reload value of QEI interface

### Changed

- Replace default blocking spi Write implementation with an optimized one
- Use `Deref` for SPI generic implementations instead of macros
- Make traits `rcc::Enable` and `rcc::Reset` public, but `RccBus` sealed
- Add `QeiOptions` struct to configure slave mode and auto reload value of QEI interface

### Fixed

- Fix PWM on `TIM1`

## [v0.5.3] - 2020-01-20
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ required-features = ["rt"]
cortex-m = "0.6.0"
nb = "0.1.2"
cortex-m-rt = "0.6.8"
stm32f1 = "0.9.0"
stm32f1 = "0.10.0"
as-slice = "0.1"

[dependencies.void]
Expand Down
8 changes: 3 additions & 5 deletions examples/exti.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use stm32f1xx_hal::{
use cortex_m_rt::entry;
use pac::interrupt;
use core::mem::MaybeUninit;
use embedded_hal::digital::v2::OutputPin;
use stm32f1xx_hal::gpio::*;

// These two are owned by the ISR. main() may only access them during the initialization phase,
Expand All @@ -31,7 +30,7 @@ fn EXTI9_5() {
let int_pin = unsafe { &mut *INT_PIN.as_mut_ptr()};

if int_pin.check_interrupt() {
led.toggle();
led.toggle().unwrap();

// if we don't clear this bit, the ISR would trigger indefinitely
int_pin.clear_interrupt_pending_bit();
Expand All @@ -42,7 +41,7 @@ fn EXTI9_5() {
fn main() -> ! {
// initialization phase
let p = pac::Peripherals::take().unwrap();
let cp = cortex_m::peripheral::Peripherals::take().unwrap();
let _cp = cortex_m::peripheral::Peripherals::take().unwrap();
{
// the scope ensures that the int_pin reference is dropped before the first ISR can be executed.

Expand All @@ -61,8 +60,7 @@ fn main() -> ! {
int_pin.enable_interrupt(&p.EXTI);
} // initialization ends here

let mut nvic = cp.NVIC;
nvic.enable(pac::Interrupt::EXTI9_5);
unsafe { pac::NVIC::unmask(pac::Interrupt::EXTI9_5); }
TeXitoi marked this conversation as resolved.
Show resolved Hide resolved

loop {}
}