Skip to content

Commit

Permalink
Async support
Browse files Browse the repository at this point in the history
Optional async api that can be switched to with the "async" feature flag
  • Loading branch information
XLPhere committed Jan 26, 2025
1 parent 1edb243 commit 256ecf7
Show file tree
Hide file tree
Showing 33 changed files with 3,386 additions and 2,517 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
run: cargo build --examples --all-targets --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests (async)
run: cargo test --verbose --lib --tests --benches --features async
- name: Build docs
run: cargo doc
- name: Clippy
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ rust-version = "1.62"
[dependencies]
embedded-graphics-core = { version = "0.4", optional = true }
embedded-hal = "1.0.0"
embedded-hal-async = { version = "1.0.0", optional = true }
bit_field = "0.10.1"
maybe-async = { git = "https://github.com/XLPhere/maybe-async-rs.git", branch = "default_sync", features = ["default_sync"] }

[dev-dependencies]
embedded-graphics = "0.8"
Expand Down Expand Up @@ -47,11 +49,16 @@ required-features = ["linux-dev"]
name = "epd4in2"
required-features = ["linux-dev"]

[[example]]
name = "epd7in5_v2"
required-features = ["linux-dev"]

[features]
# Remove the linux-dev feature to build the tests on non unix systems
default = ["graphics", "linux-dev", "epd2in13_v3"]

graphics = ["embedded-graphics-core"]
async = ["embedded-hal-async", "maybe-async/is_async"]
epd2in13_v2 = []
epd2in13_v3 = []
linux-dev = []
Expand Down
Loading

0 comments on commit 256ecf7

Please sign in to comment.