Skip to content

Commit

Permalink
Merge pull request #728 from stm32-rs/r020
Browse files Browse the repository at this point in the history
release 0.20
  • Loading branch information
burrbull authored Jan 14, 2024
2 parents 2f8b2f8 + 0eeb670 commit ccb29f2
Show file tree
Hide file tree
Showing 16 changed files with 154 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .lapce/settings.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[lapce-rust]
check.allTargets = false
check.targets = "thumbv7em-none-eabihf"
cargo.features = ["rtic", "stm32f411"]
cargo.features = ["defmt", "rtic1", "stm32f411"]
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rust-analyzer.check.targets": "thumbv7em-none-eabihf",
"rust-analyzer.cargo.features": [
"defmt",
"rtic",
"rtic1",
"stm32f411"
],
}
54 changes: 36 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.20.0] - 2024-01-14

### Changed

- shorten gpio ptr access
- bump embedded-hal to `1.0` (no more RC!)
- make `embedded-hal` `1.0` main implementation
- add `embedded-hal-nb::serial`
- rename `rtic` feature to `rtic1`, add `rtic2`
- shorten gpio ptr access [#719]
- bump embedded-hal to `1.0` (no more RC!) [#723]
- make `embedded-hal` `1.0` main implementation [#720]
- add `embedded-hal-nb::serial` [#726]
- rename `rtic` feature to `rtic1`, add `rtic2` [#727]
- rename `stm32_i2s_v12x` feature to `i2s` [#718]
- Check features enabled in `build-rs` [#718]

[#718]: https://github.com/stm32-rs/stm32f4xx-hal/pull/718
[#719]: https://github.com/stm32-rs/stm32f4xx-hal/pull/719
[#720]: https://github.com/stm32-rs/stm32f4xx-hal/pull/720
[#723]: https://github.com/stm32-rs/stm32f4xx-hal/pull/723
[#726]: https://github.com/stm32-rs/stm32f4xx-hal/pull/726
[#727]: https://github.com/stm32-rs/stm32f4xx-hal/pull/727

## [v0.19.0] - 2023-12-11

Expand All @@ -22,42 +33,48 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added an example to show how to do DMA with UART (Rx only) [#698]

### Changed

- Check features enabled in `build-rs`
- bump embedded-hal to `1.0-rc2`
- Use `as_ptr` for register address casting
- Updated `synopsys-usb-otg` to `0.4.0`
- use `repr(u32)` for flags, revert `spi::CrcError` clean,
- revert `spi::check_read`/`check_write`
- bump embedded-hal to `1.0-rc2` [#704]
- Use `as_ptr` for register address casting [#703]
- Updated `synopsys-usb-otg` to `0.4.0` [#699]
- use `repr(u32)` for flags, revert `spi::CrcError` clean [#709]
- revert `spi::check_read`/`check_write` [#712]

### Fixed

- Wait at least given time in `embedded-hal` `delay`
- Wait at least given time in `embedded-hal` `delay` [#704]

## [v0.18.0] - 2023-11-19

- bump embedded-hal to `1.0-rc1` (remove `serial` part)
- bump embedded-hal to `1.0-rc1` (remove `serial` part) [#694]
- complete and rework Dma Stream API [#666]
- Use `enumflags2::BitFlags` for interrupt flags and events [#673]
- SPI bidi takes 2 pins [#526]
- `Fast Read Quad I/O (EBh)` in `qspi-w25q` example now matches W25QXX datasheet. [#682]
- `embedded-storage` version bumped to 0.3
- `embedded-storage` version bumped to 0.3 [#693]

### Fixed

- fix serial RxN & TxN alises
- fix serial RxN & TxN alises [#680]

### Added

- add `.set_count()` for QEI, add `.write_count()` for TIM [#677]
- add `.set_count()` for QEI, add `.write_count()` for TIM [#677]
- add "Fast start" section in README [#678]

[#526]: https://github.com/stm32-rs/stm32f4xx-hal/pull/526
[#666]: https://github.com/stm32-rs/stm32f4xx-hal/pull/666
[#673]: https://github.com/stm32-rs/stm32f4xx-hal/pull/673
[#677]: https://github.com/stm32-rs/stm32f4xx-hal/pull/677
[#678]: https://github.com/stm32-rs/stm32f4xx-hal/pull/678
[#680]: https://github.com/stm32-rs/stm32f4xx-hal/pull/680
[#682]: https://github.com/stm32-rs/stm32f4xx-hal/pull/682
[#693]: https://github.com/stm32-rs/stm32f4xx-hal/pull/693
[#694]: https://github.com/stm32-rs/stm32f4xx-hal/pull/694
[#699]: https://github.com/stm32-rs/stm32f4xx-hal/pull/699
[#703]: https://github.com/stm32-rs/stm32f4xx-hal/pull/703
[#704]: https://github.com/stm32-rs/stm32f4xx-hal/pull/704
[#709]: https://github.com/stm32-rs/stm32f4xx-hal/pull/709
[#712]: https://github.com/stm32-rs/stm32f4xx-hal/pull/712

## [v0.17.1] - 2023-07-24

Expand Down Expand Up @@ -981,7 +998,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Support for stm32f407 and stm32f429.

[Unreleased]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.19.0...HEAD
[Unreleased]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.20.0...HEAD
[v0.20.0]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.19.0...v0.20.0
[v0.19.0]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.18.0...v0.19.0
[v0.18.0]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.17.1...v0.18.0
[v0.17.1]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.17.0...v0.17.1
Expand Down
21 changes: 12 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ license = "0BSD"
name = "stm32f4xx-hal"
readme = "README.md"
repository = "https://github.com/stm32-rs/stm32f4xx-hal"
version = "0.19.0"
version = "0.20.0"

[package.metadata.docs.rs]
features = ["stm32f429", "usb_fs", "can", "i2s", "fsmc_lcd", "rtic1", "defmt"]
targets = ["thumbv7em-none-eabihf"]

[dependencies]
defmt = { version = "0.3.4", optional = true }
defmt = { version = "0.3.5", optional = true }
bxcan = { version = "0.7", optional = true }
cortex-m = { version = "0.7.7", features = ["critical-section-single-core"]}
cortex-m-rt = "0.7.3"
Expand All @@ -39,12 +39,13 @@ sdio-host = { version = "0.6.0", optional = true }
embedded-dma = "0.2.0"
bare-metal = { version = "1" }
void = { default-features = false, version = "1.0.2" }
display-interface = { version = "0.4.1", optional = true }
display-interface = { version = "0.5.0", optional = true }
display-interface-04 = { package = "display-interface", version = "0.4.1", optional = true }
fugit = "0.3.7"
fugit-timer = "0.1.3"
# rtic1
rtic-monotonic = { version = "1.0", optional = true }
systick-monotonic = { version = "1.0", optional = true }
systick-monotonic = { version = "1.0.1", optional = true }
cortex-m-rtic = { version = "1.1.4", features = ["test-critical-section"], optional = true }
# rtic2
rtic-time = { version = "1.3", optional = true }
Expand Down Expand Up @@ -83,20 +84,22 @@ panic-semihosting = "0.6.0"
cortex-m-semihosting = "0.5.0"
heapless = "0.8"
panic-halt = "0.2.0"
ssd1306 = "0.7.1"
embedded-graphics = "0.7.1"
ssd1306 = "0.8.4"
embedded-graphics = "0.8.1"
embedded-graphics-07 = { package = "embedded-graphics", version = "0.7.1" }
usb-device = "0.3.1"
usbd-serial = "0.2.0"
micromath = "2"
dwt-systick-monotonic = "1.1"
st7789 = "0.7.0"
rtt-target = { version = "0.4.0" }
rtt-target = { version = "0.5.0" }
display-interface-spi = "0.4.1"
ist7920 = "0.1.1"
smart-leds = "0.3.0"
ws2812-spi = { version = "0.4.0", features = [] }
hd44780-driver = "0.4.0"
display-interface = "0.4"
display-interface = "0.5"
display-interface-04 = { package = "display-interface", version = "0.4.1" }
ft6x06 = "0.1.2"
ushell = "0.3.5"

Expand Down Expand Up @@ -288,7 +291,7 @@ usb_fs = ["dep:synopsys-usb-otg", "synopsys-usb-otg/fs"]
usb_hs = ["dep:synopsys-usb-otg", "synopsys-usb-otg/hs"]

## LCD support via FMC/FSMC peripheral. See [display-interface](https://crates.io/crates/display-interface)
fsmc_lcd = ["dep:display-interface"]
fsmc_lcd = ["dep:display-interface", "dep:display-interface-04"]

## SDIO peripheral support. See [sdio-host](https://crates.io/crates/sdio-host)
sdio-host = ["dep:sdio-host"]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ single model.

### Other optional features

* `rtic` — support monotonic timers that can be used by [RTIC framework](https://crates.io/crates/cortex-m-rtic).
* `rtic1` — support [RTICv1 framework](https://crates.io/crates/cortex-m-rtic).
* `rtic2` — support [RTICv2 framework](https://crates.io/crates/rtic) (incompatible with `rtic1`, require nightly compiller).
* `defmt` — implementation of `defmt::Format` for public enums and structures. See [defmt](https://crates.io/crates/defmt).
* `can` — bxCAN peripheral support. See [bxcan](https://crates.io/crates/bxcan).
* `i2s` — I2S peripheral support. See [stm32_i2s_v12x](https://crates.io/crates/stm32_i2s_v12x).
Expand Down
2 changes: 1 addition & 1 deletion examples/analog-stopwatch-with-spi-ssd1306.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn main() -> ! {
let mut format_buf = String::<10>::new();
format_elapsed(&mut format_buf, elapsed);

disp.clear();
disp.clear_buffer();

let state = free(|cs| STATE.borrow(cs).get());
let state_msg = match state {
Expand Down
2 changes: 1 addition & 1 deletion examples/display-touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use stm32f4xx_hal::{
rcc::Rcc,
};

use embedded_graphics::{
use embedded_graphics_07::{
pixelcolor::Rgb565,
prelude::*,
primitives::{Circle, PrimitiveStyle},
Expand Down
16 changes: 8 additions & 8 deletions examples/f413disco-lcd-ferris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#![no_std]

use panic_halt as _;
use rtt_target::{self, rtt_init_print};
use rtt_target::{self, rtt_init_print, ChannelMode};

use stm32f4xx_hal as hal;

Expand All @@ -22,14 +22,14 @@ use crate::hal::{
prelude::*,
};

use embedded_graphics::geometry::Size;
use embedded_graphics::image::*;
use embedded_graphics::pixelcolor::Rgb565;
use embedded_graphics::prelude::*;
use embedded_graphics::primitives::*;
use embedded_graphics_07::geometry::Size;
use embedded_graphics_07::image::*;
use embedded_graphics_07::pixelcolor::Rgb565;
use embedded_graphics_07::prelude::*;
use embedded_graphics_07::primitives::*;
use st7789::*;

pub use display_interface::{DisplayError, WriteOnlyDataCommand};
pub use display_interface_04::{DisplayError, WriteOnlyDataCommand};

/// Define the lovely ferris crab sprite
const FERRIS: [u8; 11008] = [
Expand Down Expand Up @@ -694,7 +694,7 @@ const FERRIS: [u8; 11008] = [
#[cortex_m_rt::entry]
fn main() -> ! {
// Initialise RTT so you can see panics and other output in your `probe-run` output
rtt_init_print!(NoBlockTrim);
rtt_init_print!(ChannelMode::NoBlockTrim);

if let (Some(p), Some(cp)) = (Peripherals::take(), CorePeripherals::take()) {
// Split all the GPIO blocks we need
Expand Down
2 changes: 1 addition & 1 deletion examples/rng-display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn main() -> ! {
let mut format_buf = String::<20>::new();
loop {
//display clear
disp.clear();
disp.clear_buffer();

//this will continuously report an error if RNG_CLK < HCLK/16
let rand_val = rand_source.next_u32();
Expand Down
4 changes: 2 additions & 2 deletions examples/rtic-dual-i2s-audio-in-out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ mod app {
let channels = rtt_init! {
up: {
0: {
size: 128
size: 128,
name: "Logs"
}
1: {
size: 128
size: 128,
name: "Panics"
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/rtic-i2s-audio-in-out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ mod app {
let channels = rtt_init! {
up: {
0: {
size: 128
size: 128,
name: "Logs"
}
1: {
size: 128
size: 128,
name: "Panics"
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/rtic-usart-shell-ssd1306.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ mod usart_shell {
} else {
write!(ledstr, "LED is OFF").unwrap();
}
ldisp.clear();
ldisp.clear_buffer();
Text::with_baseline(fpsstr.as_str(), Point::zero(), text_style, Baseline::Top)
.draw(ldisp)
.unwrap();
Expand Down
6 changes: 3 additions & 3 deletions examples/st7789-lcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ use core::slice::Iter;
use cortex_m_rt::entry;
use panic_semihosting as _;

use embedded_graphics::pixelcolor::Rgb565;
use embedded_graphics::prelude::*;
use embedded_graphics_07::pixelcolor::Rgb565;
use embedded_graphics_07::prelude::*;

use embedded_graphics::primitives::{Circle, PrimitiveStyle};
use embedded_graphics_07::primitives::{Circle, PrimitiveStyle};
use st7789::ST7789;
use stm32f4xx_hal::fsmc_lcd::{DataPins16, FsmcLcd, LcdPins, Timing};
use stm32f4xx_hal::pac::{CorePeripherals, Peripherals};
Expand Down
4 changes: 2 additions & 2 deletions examples/stopwatch-with-ssd1306-and-interrupts-and-dma-i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use core::ops::DerefMut;
use core::sync::atomic::{AtomicBool, Ordering};
use cortex_m::interrupt::{free, CriticalSection, Mutex};
use cortex_m_rt::entry;
use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand};
use display_interface_04::{DataFormat, DisplayError, WriteOnlyDataCommand};
use embedded_graphics::{
mono_font::{
ascii::{FONT_6X12, FONT_9X15},
Expand Down Expand Up @@ -226,7 +226,7 @@ fn main() -> ! {
let mut format_buf = String::<10>::new();
format_elapsed(&mut format_buf, elapsed);

disp.clear();
disp.clear_buffer();

let state = free(|cs| STATE.borrow(cs).get());
let state_msg = match state {
Expand Down
2 changes: 1 addition & 1 deletion examples/stopwatch-with-ssd1306-and-interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn main() -> ! {
let mut format_buf = String::<10>::new();
format_elapsed(&mut format_buf, elapsed);

disp.clear();
disp.clear_buffer();

let state = free(|cs| STATE.borrow(cs).get());
let state_msg = match state {
Expand Down
Loading

0 comments on commit ccb29f2

Please sign in to comment.