-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
88 lines (76 loc) · 2.47 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[package]
name = "ht32f1yyy-hal"
version = "0.1.0"
edition = "2021"
authors = ["Jonas Spanoghe <jonas@spanoghe.net>"]
categories = ["embedded", "hardware-support", "no-std"]
description = "Hardware Abstraction Layer implementation for HT32F1yyy series microcontrollers"
keywords = ["arm", "cortex-m", "ht32", "hal", "embedded-hal"]
license = "MIT"
repository = "https://github.com/ht32-rs/ht32f1yyy-hal"
readme = "README.md"
exclude = [".gitignore"]
[package.metadata.docs.rs]
features = ["critical-section-impl", "rt", "ht32f175x"]
targets = ["thumbv7m-none-eabi"]
[dependencies]
embedded-hal = "1.0.0"
cortex-m = "0.7"
ht32f1yyy = "0.2.0"
ht32-usbd = "0.1.1"
nb = "1.1.0"
fugit = "0.3.7"
vcell = "0.1.3"
[dev-dependencies]
cortex-m-rt = "0.7"
critical-section = "1.1.2"
defmt = "0.3"
defmt-rtt = "0.4"
panic-probe = { version = "0.3", features = ["print-defmt"] }
usb-device = "0.3.1"
usbd-serial = "0.2.0"
embedded-hal-bus = "0.1.0"
[features]
default = ["rt", "critical-section-impl"]
rt = ["ht32f1yyy/rt"]
critical-section-impl = ["ht32f1yyy/critical-section", "cortex-m/critical-section-single-core"]
device-selected = []
afio4 = [] # device GPIO pins only have 4 alternate functions available
dppu = [] # device has internal pull-up on USB DP line
ht32f1251 = ["ht32f1yyy/ht32f125x", "device-selected", "afio4"]
ht32f1252 = ["ht32f1yyy/ht32f125x", "device-selected", "afio4"]
ht32f1253 = ["ht32f1yyy/ht32f125x", "device-selected", "afio4"]
ht32f1653 = ["ht32f1yyy/ht32f1653_54", "device-selected", "dppu"]
ht32f1654 = ["ht32f1yyy/ht32f1653_54", "device-selected", "dppu"]
ht32f1655 = ["ht32f1yyy/ht32f1655_56", "device-selected", "dppu"]
ht32f1656 = ["ht32f1yyy/ht32f1655_56", "device-selected", "dppu"]
ht32f1755 = ["ht32f1yyy/ht32f175x", "device-selected", "afio4"]
ht32f1765 = ["ht32f1yyy/ht32f175x", "device-selected", "afio4"]
# TODO: should we add this, even though it is a "HT32F2" device?
# ht32f2755 = ["ht32f1yyy/ht32f175x", "device-selected"]
[profile.dev]
codegen-units = 1
debug = true
opt-level = 2
incremental = false
[profile.release]
codegen-units = 1
debug = true
lto = true
opt-level = "s"
[[example]]
name = "clocks"
required-features = ["rt", "ht32f1755"]
[[example]]
name = "gpio"
required-features = ["rt", "ht32f1755"]
[[example]]
name = "i2c"
required-features = ["rt", "ht32f1755"]
[[example]]
# This example also requires a change in the default memory.x
name = "spi"
required-features = ["rt", "ht32f1654"]
[[example]]
name = "usb_serial"
required-features = ["rt", "ht32f1755"]