[package]
name = "vorago-shared-hal"
version = "0.2.0"
description = "Peripheral HAL components shared between Vorago families"
edition = "2024"
homepage = "https://egit.irs.uni-stuttgart.de/rust/vorago-rs"
repository = "https://egit.irs.uni-stuttgart.de/rust/vorago-rs"
license = "Apache-2.0"

[dependencies]
cortex-m = { version = "0.7" }
cfg-if = "1"
derive-mmio = "0.6"
bitbybit = "2"
arbitrary-int = "2"
static_assertions = "1.1"
nb = "1"
heapless = "0.9"
critical-section = "1"
embedded-hal = "1.0"
embedded-hal-async = "1"
embedded-hal-nb = "1"
embedded-io = "0.7"
embedded-io-async = "0.7"
raw-slicee = "0.1"
thiserror = { version = "2", default-features = false }
paste = "1"
fugit = "0.3"
defmt = { version = "1", optional = true }
va108xx = { version = "0.6", path = "../va108xx/va108xx", default-features = false, optional = true }
va416xx = { version = "0.5", path = "../va416xx/va416xx", default-features = false, optional = true }
embassy-sync = "0.7"
embassy-time-driver = "0.2"
embassy-time-queue-utils = "0.3"
once_cell = { version = "1", default-features = false, features = [
  "critical-section",
] }

[target.thumbv6m-none-eabi.dependencies]
portable-atomic = { version = "1", features = ["unsafe-assume-single-core"] }
[target.thumbv7em-none-eabihf.dependencies]
portable-atomic = "1"
[target.'cfg(not(any(target_arch = "arm", target_os = "none")))'.dependencies]
portable-atomic = "1"

[features]
vor1x = ["_family-selected", "dep:va108xx"]
vor4x = ["_family-selected", "dep:va416xx"]
va41628 = []
defmt = [
  "dep:defmt",
  "arbitrary-int/defmt",
  "fugit/defmt",
  "embedded-hal/defmt-03",
  "va108xx/defmt"
]

_family-selected = []

[package.metadata.cargo-machete]
ignored = ["raw-slicee"]

[package.metadata.docs.rs]
features = ["vor1x", "defmt"]
rustdoc-args = ["--generate-link-to-definition"]
