-
Notifications
You must be signed in to change notification settings - Fork 255
Expand file tree
/
Copy pathCargo.toml
More file actions
70 lines (58 loc) · 2.55 KB
/
Cargo.toml
File metadata and controls
70 lines (58 loc) · 2.55 KB
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
[package]
name = "arduino-hal"
version = "0.1.0"
authors = ["Rahix <rahix@rahix.de>"]
edition = "2021"
description = "Board support crate for popular AVR dev-boards"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rahix/avr-hal"
keywords = ["avr", "arduino"]
categories = ["no-std", "embedded", "hardware-support"]
[features]
default = ["rt"]
rt = ["avr-device/rt"]
board-selected = []
mcu-atmega = []
mcu-attiny = []
arduino-diecimila = ["mcu-atmega", "atmega-hal/atmega168", "board-selected"]
arduino-leonardo = ["mcu-atmega", "atmega-hal/atmega32u4", "board-selected"]
arduino-mega2560 = ["mcu-atmega", "atmega-hal/atmega2560", "board-selected"]
arduino-mega1280 = ["mcu-atmega", "atmega-hal/atmega1280", "board-selected"]
arduino-nano = ["mcu-atmega", "atmega-hal/atmega328p", "atmega-hal/enable-extra-adc", "board-selected"]
arduino-uno = ["mcu-atmega", "atmega-hal/atmega328p", "board-selected"]
trinket-pro = ["mcu-atmega", "atmega-hal/atmega328p", "board-selected"]
sparkfun-promicro = ["mcu-atmega", "atmega-hal/atmega32u4", "board-selected"]
sparkfun-promini-3v3 = ["mcu-atmega", "atmega-hal/atmega328p", "atmega-hal/enable-extra-adc", "board-selected"]
sparkfun-promini-5v = ["mcu-atmega", "atmega-hal/atmega328p", "atmega-hal/enable-extra-adc", "board-selected"]
trinket = ["mcu-attiny", "attiny-hal/attiny85", "board-selected"]
nano168 = ["mcu-atmega", "atmega-hal/atmega168", "atmega-hal/enable-extra-adc", "board-selected"]
# We must select a board to build on docs.rs
docsrs = ["arduino-uno"]
[dependencies]
cfg-if = "1"
embedded-hal = "1.0"
ufmt = "0.2.0"
[dependencies.avr-hal-generic]
path = "../avr-hal-generic/"
[dependencies.atmega-hal]
path = "../mcu/atmega-hal/"
optional = true
# Because this crate has its own check that at least one device is selected, we
# can safely "circumvent" the check in `atmega-hal`. Due to compile order,
# this allows us to show our error instead of the one from `atmega-hal` (which
# is much less helpful in this situation).
features = ["disable-device-selection-error"]
[dependencies.attiny-hal]
path = "../mcu/attiny-hal/"
optional = true
[dependencies.avr-device]
version = "0.8"
# Because this crate has its own check that at least one device is selected, we
# can safely "circumvent" the check in `avr-device`.
#
# Why would we want that? Otherwise, as `avr-device` is compiled first, its
# error will be shown and ours won't which leads to a degraded user experience
# as the displayed error message does not really tell what needs to be done...
features = ["device-selected"]
[package.metadata.docs.rs]
features = ["docsrs"]