mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-27 12:20:56 +00:00

* Separate the alloc and run lists * Replace circular task list with ready queue * Remove separate SCHEDULER_STATE static * Move scheduler to new file * Reorganize, allow restarting scheduler * Fix InternalMemory polyfill * Use SingleShotTimer internally * Implement a simple timer queue * Extract run queue, wake tasks, store reason of scheduler event * Add inherent function to get current task ptr * Reimplement usleep with the timer queue * Store current task in timer queue * Sleep in timer queue task * Remove ability to sleep arbitrary tasks * More logging * Clear timer interrupt in timer handler * Even more logging * Merge mutexes into semaphores
82 lines
2.9 KiB
TOML
82 lines
2.9 KiB
TOML
[package]
|
|
name = "esp-preempt"
|
|
version = "0.0.1"
|
|
edition = "2024"
|
|
rust-version = "1.86.0"
|
|
description = "A task scheduler for Espressif devices"
|
|
documentation = "https://docs.espressif.com/projects/rust/esp-preempt/latest/"
|
|
keywords = ["esp32", "espressif", "no-std"]
|
|
categories = ["embedded", "hardware-support", "no-std"]
|
|
repository = "https://github.com/esp-rs/esp-hal"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[package.metadata.docs.rs]
|
|
default-target = "riscv32imac-unknown-none-elf"
|
|
features = ["esp32c6"]
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
esp-hal = { version = "1.0.0-rc.0", path = "../esp-hal", features = [
|
|
"requires-unstable",
|
|
"__esp_radio_builtin_scheduler",
|
|
] }
|
|
|
|
cfg-if = "1"
|
|
|
|
# Unstable dependencies that are not (strictly) part of the public API
|
|
allocator-api2 = { version = "0.3.0", default-features = false, features = ["alloc"] }
|
|
document-features = "0.2.11"
|
|
esp-alloc = { version = "0.8.0", path = "../esp-alloc", optional = true }
|
|
esp-config = { version = "0.5.0", path = "../esp-config" }
|
|
esp-sync = { version = "0.0.0", path = "../esp-sync" }
|
|
esp-radio-preempt-driver = { version = "0.0.1", path = "../esp-radio-preempt-driver" }
|
|
portable-atomic = { version = "1.11.0", default-features = false }
|
|
|
|
# Logging interfaces, they are mutually exclusive so they need to be behind separate features.
|
|
defmt = { version = "1.0", optional = true }
|
|
log-04 = { package = "log", version = "0.4.27", optional = true }
|
|
|
|
[build-dependencies]
|
|
esp-config = { version = "0.5.0", path = "../esp-config", features = ["build"] }
|
|
esp-metadata-generated = { version = "0.1.0", path = "../esp-metadata-generated", features = ["build-script"] }
|
|
|
|
[dev-dependencies]
|
|
esp-hal = { version = "1.0.0-rc.0", path = "../esp-hal", features = ["unstable"] }
|
|
|
|
[features]
|
|
default = ["esp-alloc"]
|
|
|
|
## Enable the use of the `esp-alloc` crate for dynamic memory allocation.
|
|
##
|
|
## If you opt-out, you need to provide implementations for the following functions:
|
|
## - `pub extern "C" fn malloc_internal(size: usize) -> *mut u8`
|
|
## - `pub extern "C" fn free_internal(ptr: *mut u8)`
|
|
esp-alloc = ["dep:esp-alloc"]
|
|
|
|
#! ### Chip selection
|
|
#! One of the following features must be enabled to select the target chip:
|
|
|
|
##
|
|
esp32 = ["esp-hal/esp32", "esp-metadata-generated/esp32"]
|
|
##
|
|
esp32c2 = ["esp-hal/esp32c2", "esp-metadata-generated/esp32c2"]
|
|
##
|
|
esp32c3 = ["esp-hal/esp32c3", "esp-metadata-generated/esp32c3"]
|
|
##
|
|
esp32c6 = ["esp-hal/esp32c6", "esp-metadata-generated/esp32c6"]
|
|
##
|
|
esp32h2 = ["esp-hal/esp32h2", "esp-metadata-generated/esp32h2"]
|
|
##
|
|
esp32s2 = ["esp-hal/esp32s2", "esp-metadata-generated/esp32s2"]
|
|
##
|
|
esp32s3 = ["esp-hal/esp32s3", "esp-metadata-generated/esp32s3"]
|
|
|
|
#! ### Logging Feature Flags
|
|
## Enable logging output using version 0.4 of the `log` crate.
|
|
log-04 = ["dep:log-04", "esp-hal/log-04"]
|
|
|
|
## Enable logging output using `defmt` and implement `defmt::Format` on certain types.
|
|
defmt = ["dep:defmt", "esp-hal/defmt"]
|