[package] name = "gd32-hal" version = "0.0.1" authors = ["Myrfy"] description = "Hardware abstraction layer for the GD32 MCUs" keywords = ["no-std", "gd32", "embedded", "embedded-hal"] categories = [ "embedded", "hardware-support", "no-std", ] repository = "https://github.com/gd32-rs/gd32-hal" documentation = "https://docs.rs/gd32-hal" readme = "README.md" license = "MIT" exclude = [".gitignore"] edition = "2021" [dependencies] cortex-m = "0.7.3" # Peripheral Access Crates gd32f3 = { version = "0.1.0-alpha.1", optional = true } # Embedded traits. Featured-gated with `embedded-hal`. embedded-hal = { version = "0.2.5", features = ["unproven"], optional = true } # nb is a non-blocking abstraction, eg for reading or writing one word at a time. # It's mainly for embedded-hal, and a few of our APIs that mimick it. nb = "1.0.0" # Chrono allows for basic time and date functionality, for use with the RTC. chrono = { version = "0.4.19", default-features = false } byteorder = { version = "1.4.3", optional = true, default-features = false } # Misc features cast = { version = "0.2.2", default-features = false } num-traits = { version = "0.2.14", default-features = false, features=["libm"] } # For sqrt in timers # Meta-programming; mainly used for feature-gating cfg-if = "1.0.0" # if/else blocks for feature-gating paste = "1.0.4" # Token pasting, to make macros easier [package.metadata.docs.rs] features = ["embedded-hal"] targets = ["thumbv7em-none-eabihf"] # For bright "supported by crate feature only" text on `embedded-hal`? rustdoc-args = ["--cfg", "docsrs"] # Compile with one of these "runtime" features if the program # will be directly flashed to an MCU; ie not a library. [features] f3rt = ["gd32f3/rt"] # Features defined here are those taken from the SVD-generated GD32 PACs. # The "f3" etc designator at the end lets us group by family when feature-gating. f303 = ["gd32f3/gd32f303", "f3"] #fd_can = ["fdcan"] embedded_hal = ["embedded-hal"] # These features are used to featured gate sections of code that apply # to an entire family. f3 = [] # todo: w feature to combine wb and wl since they often have feature parity?