Skip to content

Commit d0019cd

Browse files
committed
Async support
Optional async api that can be switched to with the "async" feature flag
1 parent 1edb243 commit d0019cd

33 files changed

Lines changed: 3387 additions & 2518 deletions

File tree

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
run: cargo build --examples --all-targets --verbose
2828
- name: Run tests
2929
run: cargo test --verbose
30+
- name: Run tests (async)
31+
run: cargo test --verbose --lib --tests --benches --features async
3032
- name: Build docs
3133
run: cargo doc
3234
- name: Clippy

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ rust-version = "1.62"
1616
[dependencies]
1717
embedded-graphics-core = { version = "0.4", optional = true }
1818
embedded-hal = "1.0.0"
19+
embedded-hal-async = { version = "1.0.0", optional = true }
1920
bit_field = "0.10.1"
21+
maybe-async = { git = "https://github.com/XLPhere/maybe-async-rs.git", branch = "default_sync", features = ["default_sync"] }
2022

2123
[dev-dependencies]
2224
embedded-graphics = "0.8"
@@ -47,11 +49,16 @@ required-features = ["linux-dev"]
4749
name = "epd4in2"
4850
required-features = ["linux-dev"]
4951

52+
[[example]]
53+
name = "epd7in5_v2"
54+
required-features = ["linux-dev"]
55+
5056
[features]
5157
# Remove the linux-dev feature to build the tests on non unix systems
5258
default = ["graphics", "linux-dev", "epd2in13_v3"]
5359

5460
graphics = ["embedded-graphics-core"]
61+
async = ["embedded-hal-async", "maybe-async/is_async"]
5562
epd2in13_v2 = []
5663
epd2in13_v3 = []
5764
linux-dev = []

0 commit comments

Comments
 (0)