Initial node implementation (#4)
Reviewed-on: #4 Co-authored-by: Zack <zack@bfpower.io> Co-committed-by: Zack <zack@bfpower.io>
This commit is contained in:
155
Cargo.toml
Normal file
155
Cargo.toml
Normal file
@ -0,0 +1,155 @@
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Workspace ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[workspace]
|
||||
members = [
|
||||
# Device types
|
||||
"node",
|
||||
"commander",
|
||||
# Peripherals
|
||||
|
||||
# Peripheral components
|
||||
"peripheral-components/ads1256/*",
|
||||
# Macros
|
||||
"macros/node-poll-variants",
|
||||
# Examples
|
||||
"examples/ads1256"
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
repository = "https://git.bfpower.io/BFPOWER/physical"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
|
||||
#----- no-std ----------------------------------
|
||||
# Math
|
||||
[workspace.dependencies.libm]
|
||||
version = "0.2.*"
|
||||
# Units of measurement
|
||||
[workspace.dependencies.uom]
|
||||
version = "0.34.*"
|
||||
default-features = false
|
||||
features = ["f32", "si"]
|
||||
# Logging
|
||||
[workspace.dependencies.tracing]
|
||||
version = "0.1.*"
|
||||
[workspace.dependencies.defmt]
|
||||
version = "0.3.*"
|
||||
[workspace.dependencies.defmt-rtt]
|
||||
version = "0.4.*"
|
||||
# Serialization
|
||||
[workspace.dependencies.parity-scale-codec]
|
||||
version = "3.6.*"
|
||||
default-features = false
|
||||
# Embedded-HAL
|
||||
[workspace.dependencies.embedded-hal]
|
||||
version = "1.0.0-alpha.10"
|
||||
[workspace.dependencies.embedded-hal-async]
|
||||
version = "0.2.0-alpha.1"
|
||||
# Memory
|
||||
[workspace.dependencies.static_cell]
|
||||
version = "1.1.*"
|
||||
[workspace.dependencies.heapless]
|
||||
version = "0.7.*"
|
||||
# Other embedded utilities
|
||||
[workspace.dependencies.cortex-m]
|
||||
version = "0.7.*"
|
||||
[workspace.dependencies.cortex-m-rt]
|
||||
version = "0.7.*"
|
||||
[workspace.dependencies.panic-probe]
|
||||
version = "0.3.*"
|
||||
features = ["print-defmt"]
|
||||
# BFPOWER Drivers
|
||||
[workspace.dependencies.ads1256-types]
|
||||
git = "https://git.bfpower.io/BFPOWER/bfpower-drivers.git"
|
||||
features = ["defmt"]
|
||||
[workspace.dependencies.ads1256]
|
||||
git = "https://git.bfpower.io/BFPOWER/bfpower-drivers.git"
|
||||
features = ["uom"]
|
||||
# Embassy
|
||||
[workspace.dependencies.embassy-futures]
|
||||
version = "0.1.*"
|
||||
[workspace.dependencies.embassy-time]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "nightly", ]
|
||||
[workspace.dependencies.embassy-sync]
|
||||
version = "0.1.*"
|
||||
features = ["defmt"]
|
||||
[workspace.dependencies.embassy-embedded-hal]
|
||||
version = "0.1.*"
|
||||
features = ["nightly"]
|
||||
[workspace.dependencies.embassy-executor]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "arch-cortex-m", "integrated-timers", "executor-interrupt", "executor-thread", "nightly"]
|
||||
[workspace.dependencies.embassy-stm32]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "unstable-traits", "unstable-pac", "nightly"]
|
||||
[workspace.dependencies.embassy-nrf]
|
||||
version = "0.1.*"
|
||||
features = ["defmt", "unstable-traits", "nightly"]
|
||||
# Macros
|
||||
[workspace.dependencies.syn]
|
||||
version = "2.0.*"
|
||||
features = ["extra-traits", "parsing"]
|
||||
[workspace.dependencies.quote]
|
||||
version = "1.0.*"
|
||||
[workspace.dependencies.trybuild]
|
||||
version = "1.0.*"
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Patch ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[patch.crates-io]
|
||||
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-embedded-hal = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-nrf = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-stm32 = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "047ea9066f0d946fd4d706577b21df38fd3b1647" }
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Package ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[package]
|
||||
name = "physical"
|
||||
description = "Physical is a library for interacting with the physical world."
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
repository.workspace = true
|
||||
readme.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[features]
|
||||
thermocouple_k = []
|
||||
lm35 = []
|
||||
|
||||
[dependencies]
|
||||
uom = { workspace = true }
|
||||
parity-scale-codec = { workspace = true }
|
||||
libm = { workspace = true }
|
||||
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
#----- Profiles ------------------------
|
||||
#---------------------------------------------------------------------------------------------------------------------
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
panic = "abort"
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 3
|
||||
debug = true
|
||||
debug-assertions = true
|
||||
overflow-checks = true
|
||||
lto = true
|
||||
panic = "abort"
|
||||
incremental = false
|
||||
codegen-units = 1
|
Reference in New Issue
Block a user