[package]
    authors = ["Jalon Wong <jalonwong@gmail.com>"]
    categories = ["embedded", "hardware-support", "no-std"]
    description = "HAL for the STM32F1 family"
    documentation = "https://docs.rs/stm32f1-hal"
    edition = "2024"
    keywords = ["arm", "cortex-m", "stm32", "hal"]
    license = "MIT OR Apache-2.0"
    name = "stm32f1-hal"
    readme = "README.md"
    repository = "https://github.com/mcu-rust/stm32f1-hal"
    version = "0.3.0"

    [package.metadata.docs.rs]
        features = ["stm32f103", "xG"]

[features]
    critical-section-single-core = [
        "cortex-m/critical-section-single-core",
        "mcu",
    ]
    stm32f100 = ["stm32f1/stm32f100", "mcu"]
    stm32f101 = ["stm32f1/stm32f101", "mcu"]
    stm32f103 = ["stm32f1/stm32f103", "mcu"]
    stm32f105 = ["stm32f1/stm32f107", "connectivity", "mcu"]
    stm32f107 = ["stm32f1/stm32f107", "connectivity", "mcu"]
    x4 = []
    x6 = []
    x8 = ["medium"]
    xB = ["medium"]
    xC = ["high"]
    xD = ["high"]
    xE = ["high"]
    xF = ["xl"]
    xG = ["xl"]
    # Devices with 64 or 128 Kb ROM
    medium = []
    # Devices with 256 or 512 Kb ROM
    high = ["medium", "has-dac"]
    # Devices with 768 Kb ROM or more
    xl = ["high"]
    # Connectivity line devices (`stm32f105xx` and `stm32f107xx`)
    connectivity = ["medium", "has-can", "has-dac"]
    # Devices with CAN interface
    has-can = []
    # Devices with Dac
    has-dac = []
    mcu = ["dep:cortex-m", "dep:cortex-m-rt", "dep:stm32f1"]
    rtic = ["dep:rtic-monotonic"]
    std = []

[build-dependencies]
    sync-code = "0.1.1"

[dependencies]
    bitflags = "2"
    cfg-if = "1.0"
    cortex-m = { version = "0.7", optional = true }
    cortex-m-rt = { version = "0.7", optional = true }
    critical-section = "1.2"
    embedded-dma = "0.2"
    embedded-hal = "1.0"
    embedded-hal-nb = "1.0"
    embedded-io = "0.7"
    fugit = "0.3"
    fugit-timer = "0.1"
    nb = "1.1"
    rtic-monotonic = { version = "1.0", optional = true }
    rtrb = { version = "0.3", default-features = false }
    stm32f1 = { version = "0.16", optional = true }
    waiter-trait = "0.8"

[profile.release]
    codegen-units = 1
    debug = true
    lto = true
    opt-level = "s"

[workspace]
    exclude = ["examples"]
