Skip to content

Commit d89841c

Browse files
authored
Merge pull request #102 from eldruin/alpha.4-release
Prepare `-alpha.4` release
2 parents a1fb241 + 295bcf6 commit d89841c

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- 'async-tokio,gpio_cdev,gpio_sysfs,i2c,spi'
2323

2424
include:
25-
- rust: 1.60.0 # MSRV
25+
- rust: 1.65.0 # MSRV
2626
target: x86_64-unknown-linux-gnu
2727

2828
# Test nightly but don't fail

.github/workflows/clippy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: dtolnay/rust-toolchain@master
1515
with:
16-
toolchain: stable
16+
toolchain: 1.73.0
1717
components: clippy
1818
- run: cargo clippy --all-features -- --deny=warnings

CHANGELOG.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
### Changed
11-
- Updated to `embedded-hal` `1.0.0-rc.3` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-rc3---2023-12-14))
12-
- Updated to `embedded-hal-nb` `1.0.0-rc.3` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-nb/CHANGELOG.md#v100-rc3---2023-12-14))
13-
14-
## [v0.4.0-alpha.4] - 2023-11-10
10+
## [v0.4.0-alpha.4] - 2024-01-03
1511

1612
### Changed
1713
- [breaking-change] Replace serial-rs with the serialport-rs crate. `Serial::open` now needs a baud-rate argument as well.
1814
- [breaking-change] Split `Spidev` into `SpidevDevice` and `SpidevBus`, implementing the respective `SpiDevice` and `SpiBus` traits (#100)
19-
- Updated to `embedded-hal` `1.0.0-rc.1` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-rc1---2023-08-15))
20-
- Updated to `embedded-hal-nb` `1.0.0-rc.1` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-nb/CHANGELOG.md#v100-rc1---2023-08-15))
15+
- Updated to `embedded-hal` `1.0.0-rc.3` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-rc3---2023-12-14))
16+
- Updated to `embedded-hal-nb` `1.0.0-rc.3` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-nb/CHANGELOG.md#v100-rc3---2023-12-14))
2117
- Updated to `spidev` `0.6.0` release([API changes](https://github.com/rust-embedded/rust-spidev/blob/master/CHANGELOG.md#060--2023-08-03))
2218
- Updated to `i2cdev` `0.6.0` release([API changes](https://github.com/rust-embedded/rust-i2cdev/blob/master/CHANGELOG.md#v060---2023-08-03))
23-
- Updated to `nix` `0.26` to match `i2cdev`
19+
- Updated to `gpio_cdev` `0.6.0` release([API changes](https://github.com/rust-embedded/gpio-cdev/blob/master/CHANGELOG.md#v060--2023-09-11))
20+
- Updated to `nix` `0.27.1`
21+
- MSRV is now 1.65.0.
2422

2523
### Fixed
2624
- Fix using SPI transfer with unequal buffer sizes (#97, #98).

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords = ["Linux", "hal"]
99
license = "MIT OR Apache-2.0"
1010
name = "linux-embedded-hal"
1111
repository = "https://github.com/rust-embedded/linux-embedded-hal"
12-
version = "0.4.0-alpha.3"
12+
version = "0.4.0-alpha.4"
1313
edition = "2018"
1414

1515
[features]
@@ -24,13 +24,13 @@ default = [ "gpio_cdev", "gpio_sysfs", "i2c", "spi" ]
2424
[dependencies]
2525
embedded-hal = "=1.0.0-rc.3"
2626
embedded-hal-nb = "=1.0.0-rc.3"
27-
gpio-cdev = { version = "0.5.1", optional = true }
27+
gpio-cdev = { version = "0.6.0", optional = true }
2828
sysfs_gpio = { version = "0.6.1", optional = true }
2929
i2cdev = { version = "0.6.0", optional = true }
3030
nb = "1"
3131
serialport = { version = "4.2.0", default-features = false }
3232
spidev = { version = "0.6.0", optional = true }
33-
nix = "0.26.2"
33+
nix = "0.27.1"
3434

3535
[dev-dependencies]
3636
openpty = "0.2.0"

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[![crates.io](https://img.shields.io/crates/d/linux-embedded-hal.svg)](https://crates.io/crates/linux-embedded-hal)
2+
[![crates.io](https://img.shields.io/crates/v/linux-embedded-hal.svg)](https://crates.io/crates/linux-embedded-hal)
3+
[![Documentation](https://docs.rs/linux-embedded-hal/badge.svg)](https://docs.rs/linux-embedded-hal)
4+
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.65+-blue.svg)
5+
16
# `linux-embedded-hal`
27

38
> Implementation of the [`embedded-hal`] traits for Linux devices
@@ -29,7 +34,7 @@ With `default-features = false` you can enable the features `gpio_cdev`, `gpio_s
2934

3035
## Minimum Supported Rust Version (MSRV)
3136

32-
This crate is guaranteed to compile on stable Rust 1.60.0 and up. It *might*
37+
This crate is guaranteed to compile on stable Rust 1.65.0 and up. It *might*
3338
compile with older versions but that may change in any new patch release.
3439

3540
## License

src/cdev_pin.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,10 @@ impl CdevPin {
6969
// Drop self to free the line before re-requesting it in a new mode.
7070
std::mem::drop(self);
7171

72+
let is_active_low = output_flags.intersects(gpio_cdev::LineRequestFlags::ACTIVE_LOW);
7273
CdevPin::new(line.request(
7374
output_flags,
74-
state_to_value(
75-
state,
76-
output_flags.intersects(gpio_cdev::LineRequestFlags::ACTIVE_LOW),
77-
),
75+
state_to_value(state, is_active_low),
7876
&consumer,
7977
)?)
8078
}

0 commit comments

Comments
 (0)