[package]
name = "booster"
# Keep versions in Cargo.toml and py/setup.py synchronized.
version = "0.6.0"
resolver = "2"
authors = [
	"Ryan Summers <ryan.summers@vertigo-designs.com>",
	"Robert Jördens <rj@quartiq.de>",
]
description = "Firmware for the Sinara Booster device (STM32F4, Ethernet, RF power amplifiers)"
categories = ["embedded", "no-std", "hardware-support", "science"]
license = "MIT OR Apache-2.0"
keywords = ["ethernet", "stm32f4", "adc", "physics"]
repository = "https://github.com/quartiq/booster"
readme = "README.md"
documentation = "https://quartiq.de/booster-doc/"
edition = "2021"
build = "build.rs"
exclude = [
	".gitignore",
	"book/",
	"book/*"
]

[dependencies]
embedded-storage = "0.3"
embedded-storage-async = "0.4"
embedded-io = "0.6"
serde_with = { version = "3.9", default-features = false, features = ["macros"] }
serde-json-core = "0.6"
cortex-m = "0.7.7"
cortex-m-rt = "0.7"
fugit = "0.3"
rtic-sync = "1"
sequential-storage = "3"
rtic = {version = "2.1", features = ["thumbv7-backend"] }
embassy-futures = { version = "0.1", default-features = false }
rtic-monotonics = { version = "2.0", features = ["cortex-m-systick"] }
rand_core = "0.6"
mono-clock = "0.1"
cortex-m-log = { version = "0.8.0", features = ["log-integration"] }
log = "0.4.22"
heapless = { version = "0.8", features = ["serde"] }
bit_field = "0.10.2"
debouncr = "0.2"
serde = {version = "1.0", features = ["derive"], default-features = false }
bbqueue = "0.5"
embedded-hal-bus = "0.2"
usb-device = "0.3.2"
usbd-serial = "0.2.2"
encdec = { version = "0.9", default-features = false }
crc-any = { version = "2.5.0", default-features = false }
panic-persist = { version = "0.3", features = ["custom-panic-handler", "utf8"] }
miniconf = { version = "0.13", features = ["json-core", "derive", "postcard"]}
miniconf_mqtt = "0.13"
# Note: Keep `py/pyproject.toml` version in sync with the Minimq version used in FW.
minimq = "0.9.0"
w5500 = "0.5"
smlang= "0.8"
minireq = "0.5"
rtt-target = "0.5"
enum-iterator = { version = "2.1", default-features = false }
enc424j600 = "0.4"
embedded-hal = "1"
smoltcp-nal = { version = "0.5", features=["shared-stack"] }

serial-settings = "0.1"
stm32f4xx-hal = {version = "0.21.0", features = ["stm32f407", "usb_fs"] }

postcard = "1"

[build-dependencies]
built = { version = "0.7", features = ["git2"], default-features = false }

[dependencies.ad5627]
path = "ad5627"
version = "0.2"

[patch.crates-io.smoltcp]
# Locking to a patch where the poll() function no longer loops infinitely during packet floods. This
# can be removed once smoltcp is re-released.
git = "https://github.com/smoltcp-rs/smoltcp"
rev = "53caf70f640d5ccb3cd1492e1cb178bc7dfa3cdd"

[dependencies.ads7924]
path = "ads7924"
version = "0.2"

[dependencies.dac7571]
path = "dac7571"
version = "0.2"

[dependencies.max6639]
path = "max6639"
version = "0.2"

[dependencies.max6642]
path = "max6642"
version = "0.2"

[dependencies.mcp3221]
path = "mcp3221"
version = "0.2"

[dependencies.microchip-24aa02e48]
path = "microchip-24aa02e48"
version = "0.2"

[dependencies.tca9548]
path = "tca9548"
version = "0.2"

[profile.dev]
# Note: Opt-level 1 is required to avoid issues with stack overflow during hardware configuration.
opt-level = 1

[profile.release]
codegen-units = 1 # better optimizations
debug = true # symbols are nice and they don't increase the size on Flash
lto = true # better optimizations
