# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "bmi323-driver"
version = "0.2.0"
authors = ["Janne Snabb"]
build = false
include = [
    "/Cargo.toml",
    "/LICENSE",
    "/README.md",
    "/examples/*.rs",
    "/src/*.rs",
    "/tests/*.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Generic no_std driver for the Bosch Sensortec BMI323 IMU"
documentation = "https://docs.rs/bmi323-driver"
readme = "README.md"
keywords = [
    "bmi323",
    "imu",
    "embedded-hal",
    "embassy",
    "sensor",
]
categories = [
    "embedded",
    "hardware-support",
    "no-std",
]
license = "MIT"
repository = "https://github.com/snabb/bmi323-driver"

[package.metadata.docs.rs]
features = ["defmt"]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
async = []
blocking = ["maybe-async/is_sync"]
default = []
defmt = ["dep:defmt"]

[lib]
name = "bmi323_driver"
path = "src/lib.rs"

[[example]]
name = "async_i2c_alt_config"
path = "examples/async_i2c_alt_config.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_any_motion"
path = "examples/async_i2c_any_motion.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_basic"
path = "examples/async_i2c_basic.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_flat"
path = "examples/async_i2c_flat.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_no_motion"
path = "examples/async_i2c_no_motion.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_orientation"
path = "examples/async_i2c_orientation.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_self_test"
path = "examples/async_i2c_self_test.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_significant_motion"
path = "examples/async_i2c_significant_motion.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_step_counter"
path = "examples/async_i2c_step_counter.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_tap"
path = "examples/async_i2c_tap.rs"
required-features = ["async"]

[[example]]
name = "async_i2c_tilt"
path = "examples/async_i2c_tilt.rs"
required-features = ["async"]

[[example]]
name = "blocking_i2c_basic"
path = "examples/blocking_i2c_basic.rs"
required-features = ["blocking"]

[[test]]
name = "i2c_transactions"
path = "tests/i2c_transactions.rs"

[[test]]
name = "i2c_transactions_async"
path = "tests/i2c_transactions_async.rs"
required-features = ["async"]

[[test]]
name = "i2c_transactions_blocking"
path = "tests/i2c_transactions_blocking.rs"
required-features = ["blocking"]

[[test]]
name = "spi_transactions"
path = "tests/spi_transactions.rs"

[[test]]
name = "spi_transactions_async"
path = "tests/spi_transactions_async.rs"
required-features = ["async"]

[[test]]
name = "spi_transactions_blocking"
path = "tests/spi_transactions_blocking.rs"
required-features = ["blocking"]

[dependencies.defmt]
version = "1.0.1"
optional = true

[dependencies.embedded-hal]
version = "1.0.0"

[dependencies.embedded-hal-async]
version = "1.0.0"

[dependencies.maybe-async]
version = "0.2.10"

[target.'cfg(not(target_os = "none"))'.dev-dependencies.embedded-hal-mock]
version = "0.11.1"
features = [
    "eh1",
    "embedded-hal-async",
]
default-features = false
