# 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"
name = "sw2303"
version = "0.0.1"
authors = ["Ivan Li <ivanli2048@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "SW2303 USB PD controller driver for embedded systems with async/sync support"
readme = "README.md"
keywords = [
    "embedded-hal-driver",
    "no-std",
    "sw2303",
    "usb-pd",
    "async",
]
categories = [
    "embedded",
    "hardware-support",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/IvanLi-CN/sw2303-rs"

[features]
async = ["dep:embedded-hal-async"]
defmt = ["dep:defmt"]

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

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

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

[dependencies.bitflags]
version = "2.9"

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

[dependencies.embedded-hal]
version = "1.0.0"
default-features = false

[dependencies.embedded-hal-async]
version = "1.0.0"
optional = true
default-features = false

[dependencies.maybe-async-cfg]
version = "0.2.5"

[dev-dependencies.embedded-hal-mock]
version = "0.11.1"

[profile.dev]
opt-level = 0

[profile.release]
opt-level = "z"
lto = "fat"
codegen-units = 1
debug = 2
debug-assertions = false
overflow-checks = false
incremental = false
