[package]
name = "sw2303"
version = "0.0.1"
authors = ["Ivan Li <ivanli2048@gmail.com>"]
edition = "2024"
license = "MIT OR Apache-2.0"
description = "SW2303 USB PD controller driver for embedded systems with async/sync support"
keywords = ["embedded-hal-driver", "no-std", "sw2303", "usb-pd", "async"]
repository = "https://github.com/IvanLi-CN/sw2303-rs"
categories = ["embedded", "hardware-support"]

[dependencies]
embedded-hal = { version = "1.0.0", default-features = false }
embedded-hal-async = { version = "1.0.0", optional = true, default-features = false }
defmt = { version = "1.0.1", optional = true }
bitflags = "2.9"
maybe-async-cfg = "0.2.5"

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

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

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

[profile.dev]
opt-level = 0

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