Skip to content

Commit

Permalink
Release v0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh3Rm4n committed Jan 6, 2024
1 parent a0cfead commit 1e77b8a
Show file tree
Hide file tree
Showing 16 changed files with 220 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
toolchain: stable
target: thumbv7em-none-eabihf
- run: cargo build --features=${{ matrix.mcu }} --lib --examples
- run: "cargo build --features=${{ matrix.mcu }}' rt ld cortex-m/critical-section-single-core' --lib --examples"

check-minimal-feature-set:
name: Check minimal feature set
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

No changes.

## [v0.10.0] - 2023-11-30

### Breaking changes

- Update `stm32f3` pac to v0.15.1 ([#335])
Expand Down Expand Up @@ -732,7 +736,8 @@ let clocks = rcc
[#2]: https://github.com/stm32-rs/stm32f3xx-hal/pull/2

<!-- cargo-release: latest tag -->
[v0.9.1]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.9.1
[v0.10.0]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.10.0
[v0.9.2]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.9.2
[v0.9.0]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.9.0
[v0.8.1]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.8.1
[v0.8.0]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v0.8.0
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name = "stm32f3xx-hal"
readme = "README.md"
repository = "https://github.com/stm32-rs/stm32f3xx-hal"
documentation = "https://docs.rs/stm32f3xx-hal"
version = "0.9.2"
version = "0.10.0"
exclude = ["codegen", ".markdownlint.yml"]
resolver = "2"
rust-version = "1.60"
Expand Down Expand Up @@ -51,10 +51,10 @@ cortex-m-semihosting = "0.5.0"
defmt = "0.3.5"
defmt-rtt = "0.4.0"
defmt-test = "0.3.1"
panic-probe = "0.3.1"
panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] }
panic-probe = { version = "0.3.1", features = ["defmt", "print-defmt"] }
panic-rtt-target = { version = "0.1.3" }
panic-semihosting = "0.6.0"
rtt-target = { version = "0.4.0" }
rtt-target = "0.5.0"
systick-monotonic = "1.0"
usb-device = "0.3.1"
usbd-serial = "0.2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cortex-m-rt = { version = "0.7.3", features = ["device"] }
# Panic behavior, see https://crates.io/keywords/panic-impl for alternatives
panic-halt = "0.2.0"
# Replace stm32f303xc with your target chip, see next section for more info
stm32f3xx-hal = { version = "0.9.2", features = ["ld", "rt", "stm32f303xc"] }
stm32f3xx-hal = { version = "0.10.0", features = ["ld", "rt", "stm32f303xc"] }
```

We also need to tell Rust about target architecture and how to link our
Expand Down
20 changes: 9 additions & 11 deletions examples/serial_dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#![no_std]
#![no_main]

use panic_semihosting as _;
use defmt_rtt as _;
use panic_probe as _;

use cortex_m::{asm, singleton};
use cortex_m_rt::entry;
Expand Down Expand Up @@ -40,8 +41,7 @@ fn main() -> ! {
.pa10
.into_af_push_pull(&mut gpioa.moder, &mut gpioa.otyper, &mut gpioa.afrh),
);
let serial = Serial::new(dp.USART1, pins, 9600.Bd(), clocks, &mut rcc.apb2);
let (tx, rx) = serial.split();
let mut serial = Serial::new(dp.USART1, pins, 9600.Bd(), clocks, &mut rcc.apb2);

let dma1 = dp.DMA1.split(&mut rcc.ahb);

Expand All @@ -57,23 +57,21 @@ fn main() -> ! {
let (tx_channel, rx_channel) = (dma1.ch4, dma1.ch5);

// start separate DMAs for sending and receiving the data
let sending = tx.write_all(tx_buf, tx_channel);
let receiving = rx.read_exact(rx_buf, rx_channel);
let transfer = serial.transfer_exact(rx_buf, rx_channel, tx_buf, tx_channel);

// block until all data was transmitted and received
let (tx_buf, tx_channel, tx) = sending.wait();
let (rx_buf, rx_channel, rx) = receiving.wait();
let ((rx_buf, tx_buf), (rx_channel, tx_channel)) = transfer.wait();
// let transfer = serial.read_exact(rx_buf, rx_channel);
// let (rx_buf, rx_channel) = transfer.wait();

assert_eq!(tx_buf, rx_buf);

// After a transfer is finished its parts can be re-used for another one.
tx_buf.copy_from_slice(b"hi again!");

let sending = tx.write_all(tx_buf, tx_channel);
let receiving = rx.read_exact(rx_buf, rx_channel);
let transfer = serial.transfer_exact(rx_buf, rx_channel, tx_buf, tx_channel);

let (tx_buf, ..) = sending.wait();
let (rx_buf, ..) = receiving.wait();
let ((rx_buf, tx_buf), _) = transfer.wait();

assert_eq!(tx_buf, rx_buf);

Expand Down
4 changes: 2 additions & 2 deletions src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! It can be built for the `STM32F3Discovery` running
//! `cargo build --example adc --features=stm32f303xc`
//!
//! [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.9.1/examples/adc.rs
//! [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.10.0/examples/adc.rs
use core::ops::Deref;
use core::{convert::TryInto, marker::PhantomData};
Expand Down Expand Up @@ -256,7 +256,7 @@ macro_rules! sp_pins {
///
/// Code example can be seen in [examples/adc.rs].
///
/// [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.9.1/examples/adc.rs
/// [examples/adc.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.10.0/examples/adc.rs
/// [RM0316]: https://www.st.com/resource/en/reference_manual/dm00094349.pdf
// FIXME(Sh3Rm4n): Soundness hole: Still mutliple sensor objects can be created.
// An idea might be to split out the sensors from CommonAdc similar to the
Expand Down
2 changes: 1 addition & 1 deletion src/can.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! A usage example of the can peripheral can be found at [examples/can.rs]
//!
//! [examples/can.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.9.1/examples/can.rs
//! [examples/can.rs]: https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.10.0/examples/can.rs
use crate::gpio::{gpioa, gpiob};
use crate::gpio::{PushPull, AF9};
Expand Down
Loading

0 comments on commit 1e77b8a

Please sign in to comment.