Skip to content

Commit b7eb1d0

Browse files
authored
Merge pull request #43 from bugadani/eh1
Prepare changes for embedded-hal 1.0 release
2 parents 65fd627 + e65eaf6 commit b7eb1d0

File tree

17 files changed

+54
-138
lines changed

17 files changed

+54
-138
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,3 @@ jobs:
2929
with:
3030
command: build
3131
args: --package display-interface-parallel-gpio
32-
- uses: actions-rs/cargo@v1
33-
with:
34-
command: build
35-
args: --workspace --features=async

CHANGELOG.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
## Added
1111

12-
- Updated to embedded-hal 1.0.0-rc.1 and embedded-hal-async 1.0.0-rc.1
13-
- New `AsyncWriteOnlyDataCommand` trait. Available after enabling the `async` feature.
14-
- i2c, spi: `async/await` support via the `async` feature.
12+
- Updated to embedded-hal 1.0.0 and embedded-hal-async 1.0.0
13+
- New `AsyncWriteOnlyDataCommand` trait.
14+
- i2c, spi: `async/await` support.
1515
- parallel-gpio: Added `Generic16BitBus`
1616
- parallel-gpio: Added `PGPIO16BitInterface`
17+
- added `defmt-03` feature
1718

1819
## Changed
1920

20-
- spi: `SPIInterface` now wraps objects that implement the `SpiDeviceWrite` trait from embedded-hal 1.0.0-alpha.10.
21-
- spi: `SPIInterface` now wraps objects that implement the `SpiDeviceWrite` trait from embedded-hal-async 0.2.0-alpha.1.
21+
- **Breaking** raised MSRV to 1.75
22+
- spi: `SPIInterface` now wraps objects that implement the `SpiDeviceWrite` trait from embedded-hal 1.0.0
23+
- spi: `SPIInterface` now wraps objects that implement the `SpiDeviceWrite` trait from embedded-hal-async 1.0.0
2224
- parallel-gpio: Fixed bug with fallible pins
2325
- **Breaking** parallel-gpio: `GenericxBitBus::new` is now infallible
2426

Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "display-interface"
33
description = "Traits for interfaces used to drive displays"
4-
version = "0.5.0-alpha.1"
4+
version = "0.5.0"
55
authors = ["Daniel Egger <[email protected]>"]
66
repository = "https://github.com/therealprof/display-interface"
77
documentation = "https://docs.rs/display-interface"
@@ -12,13 +12,13 @@ license = "MIT OR Apache-2.0"
1212
exclude = [
1313
".gitignore",
1414
]
15-
edition = "2018"
15+
edition = "2021"
16+
rust-version = "1.75"
1617

1718
[package.metadata.docs.rs]
1819
all-features = true
1920

2021
[dependencies]
21-
async-trait = { version = "0.1.68", optional = true }
2222
defmt = { version = "0.3", optional = true }
2323

2424
[workspace]
@@ -31,6 +31,4 @@ members = [
3131

3232
[features]
3333
default = []
34-
async = ["async-trait"]
35-
defmt = ["dep:defmt"]
36-
nightly = []
34+
defmt-03 = ["dep:defmt"]

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ code duplication and missing implementations.
99

1010
Additional features can be enabled by adding the following features to your Cargo.toml.
1111

12-
- `async`: enables `AsyncWriteOnlyDataCommand`. This feature uses `#[async_trait]` and can be
13-
used with rustc 1.56 and newer. Using this feature requires allocator support.
14-
- `nightly`: Enables support for nightly-only, unstable features. Together with `async`, this will
15-
enable the `async_fn_in_trait` and `impl_trait_projections` unstable features,
16-
and removes the `#[async_trait]` workaround as well as the allocator requirement.
17-
This feature requires a nightly Rust compiler released on or after 2022-11-17.
12+
- `defmt-03`: implements `defmt::Format` for `DisplayError`.
1813

1914
## License
2015

i2c/Cargo.toml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "display-interface-i2c"
33
description = "Generic I2C implementation for display interfaces"
4-
version = "0.5.0-alpha.1"
4+
version = "0.5.0"
55
authors = ["Daniel Egger <[email protected]>"]
66
repository = "https://github.com/therealprof/display-interface"
77
documentation = "https://docs.rs/display-interface-i2c"
@@ -10,18 +10,13 @@ keywords = ["graphics", "display", "embedded"]
1010
readme = "README.md"
1111
license = "MIT OR Apache-2.0"
1212
exclude = [".gitignore"]
13-
edition = "2018"
13+
edition = "2021"
14+
rust-version = "1.75"
1415

1516
[package.metadata.docs.rs]
1617
all-features = true
1718

1819
[dependencies]
19-
async-trait = { version = "0.1.68", optional = true }
20-
embedded-hal = "1.0.0-rc.1"
21-
embedded-hal-async = { version = "1.0.0-rc.1", optional = true }
22-
display-interface = { version = "0.5.0-alpha.1", path = ".." }
23-
24-
[features]
25-
default = []
26-
async = ["async-trait", "embedded-hal-async", "display-interface/async"]
27-
nightly = ["display-interface/nightly"]
20+
embedded-hal = "1.0.0"
21+
embedded-hal-async = "1.0.0"
22+
display-interface = { version = "0.5.0", path = ".." }

i2c/README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
# I2C interface for display interface
22

33
This Rust crate contains a generic I2C implementation of a data/command
4-
interface for displays over any I2C driver implementing the `embedded-hal`
5-
`blocking::I2C::Write` trait.
6-
7-
## Crate features
8-
9-
Additional features can be enabled by adding the following features to your Cargo.toml.
10-
11-
- `async`: enables `AsyncWriteOnlyDataCommand`. This feature uses `#[async_trait]` and can be
12-
used with rustc 1.56 and newer. Using this feature requires allocator support.
13-
- `nightly`: Enables support for nightly-only, unstable features. Together with `async`, this will
14-
enable the `async_fn_in_trait` and `impl_trait_projections` unstable features,
15-
and removes the `#[async_trait]` workaround as well as the allocator requirement.
16-
This feature requires a nightly Rust compiler released on or after 2022-11-17.
4+
interface for displays over any I2C driver implementing the `embedded-hal`/`embedded-hal-async`
5+
`i2c::I2c` trait(s).
176

187
## License
198

i2c/src/asynch.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ use display_interface::{AsyncWriteOnlyDataCommand, DataFormat, DisplayError};
22

33
use crate::I2CInterface;
44

5-
#[cfg(not(feature = "nightly"))]
6-
use alloc::boxed::Box;
7-
8-
#[cfg_attr(not(feature = "nightly"), async_trait::async_trait(?Send))]
95
impl<I2C> AsyncWriteOnlyDataCommand for I2CInterface<I2C>
106
where
117
I2C: embedded_hal_async::i2c::I2c,

i2c/src/lib.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
#![no_std]
2-
#![cfg_attr(
3-
all(feature = "async", feature = "nightly"),
4-
allow(incomplete_features, unknown_lints, stable_features, async_fn_in_trait),
5-
feature(async_fn_in_trait, impl_trait_projections)
6-
)]
7-
81
//! Generic I2C interface for display drivers
92
10-
#[cfg(all(feature = "async", not(feature = "nightly")))]
11-
extern crate alloc;
3+
#![no_std]
124

13-
#[cfg(feature = "async")]
14-
pub mod asynch;
5+
mod asynch;
156

167
use display_interface::{DataFormat, DisplayError, WriteOnlyDataCommand};
178

@@ -22,10 +13,7 @@ pub struct I2CInterface<I2C> {
2213
data_byte: u8,
2314
}
2415

25-
impl<I2C> I2CInterface<I2C>
26-
where
27-
I2C: embedded_hal::i2c::I2c,
28-
{
16+
impl<I2C> I2CInterface<I2C> {
2917
/// Create new I2C interface for communication with a display driver
3018
pub fn new(i2c: I2C, addr: u8, data_byte: u8) -> Self {
3119
Self {
@@ -36,7 +24,7 @@ where
3624
}
3725

3826
/// Consume the display interface and return
39-
/// the underlying peripherial driver
27+
/// the underlying peripheral driver
4028
pub fn release(self) -> I2C {
4129
self.i2c
4230
}

parallel-gpio/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "display-interface-parallel-gpio"
33
description = "Generic parallel GPIO interface for display interfaces"
4-
version = "0.7.0-alpha.1"
4+
version = "0.7.0"
55
authors = ["Daniel Egger <[email protected]>"]
66
repository = "https://github.com/therealprof/display-interface"
77
documentation = "https://docs.rs/display-interface-parallel-gpio"
@@ -10,11 +10,12 @@ keywords = ["graphics", "display", "embedded"]
1010
readme = "README.md"
1111
license = "MIT OR Apache-2.0"
1212
exclude = [".gitignore"]
13-
edition = "2018"
13+
edition = "2021"
14+
rust-version = "1.75"
1415

1516
[package.metadata.docs.rs]
1617
all-features = true
1718

1819
[dependencies]
19-
embedded-hal = "1.0.0-rc.1"
20-
display-interface = { version = "0.5.0-alpha.1", path = ".." }
20+
embedded-hal = "1.0.0"
21+
display-interface = { version = "0.5.0", path = ".." }

parallel-gpio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This Rust crate contains a generic parallel implementation of a data/command
44
interface for displays over any GPIO driver implementing the `embedded-hal`
5-
`digital::v2::OutputPin` trait.
5+
`digital::OutputPin` trait.
66

77
## License
88

0 commit comments

Comments
 (0)