11[package ]
22name = " attiny-hal"
3- version = " 0.1 .0"
3+ version = " 0.2 .0"
44
55authors = [
" Rahix <[email protected] >" ]
66edition = " 2021"
@@ -12,33 +12,66 @@ categories = ["no-std", "embedded", "hardware-support"]
1212
1313[features ]
1414rt = [" avr-device/rt" ]
15- device-selected = []
16- attiny84 = [" avr-device/attiny84" , " device-selected" ]
17- attiny85 = [" avr-device/attiny85" , " device-selected" ]
18- attiny88 = [" avr-device/attiny88" , " device-selected" ]
19- attiny167 = [" avr-device/attiny167" , " device-selected" ]
20- attiny2313 = [" avr-device/attiny2313" , " device-selected" ]
15+
16+ # MCU-specific targets. Due to use of deprecated globals, only one MCU can be selected at a time
17+ # In attiny-hal 0.30 the defaults will change to no deprecated globals
18+ attiny84 = [" attiny84-deprecated-globals" ]
19+ attiny85 = [" attiny85-deprecated-globals" ]
20+ attiny88 = [" attiny88-deprecated-globals" ]
21+ attiny167 = [" attiny167-deprecated-globals" ]
22+ attiny2313 = [" attiny2313-deprecated-globals" ]
23+
24+ # MCU-specific targets with deprecated globals. This is the default in attiny-hal <0.3.0
25+ attiny84-deprecated-globals = [" _mcu-attiny84" , " deprecated-globals" ]
26+ attiny85-deprecated-globals = [" _mcu-attiny85" , " deprecated-globals" ]
27+ attiny88-deprecated-globals = [" _mcu-attiny88" , " deprecated-globals" ]
28+ attiny167-deprecated-globals = [" _mcu-attiny167" , " deprecated-globals" ]
29+ attiny2313-deprecated-globals = [" _mcu-attiny2313" , " deprecated-globals" ]
30+
31+ # MCU-specific targets without deprecated globals. This will be the default in attiny-hal 0.3.0
32+ attiny84-no-deprecated-globals = [" _mcu-attiny84" ]
33+ attiny85-no-deprecated-globals = [" _mcu-attiny85" ]
34+ attiny88-no-deprecated-globals = [" _mcu-attiny88" ]
35+ attiny167-no-deprecated-globals = [" _mcu-attiny167" ]
36+ attiny2313-no-deprecated-globals = [" _mcu-attiny2313" ]
2137
2238critical-section-impl = [" avr-device/critical-section-impl" ]
2339
24- # Allow certain downstream crates to overwrite the device selection error by themselves.
25- disable-device-selection-error = []
40+ default = []
41+
42+ docsrs = [
43+ " attiny84-no-deprecated-globals" ,
44+ " attiny85-no-deprecated-globals" ,
45+ " attiny88-no-deprecated-globals" ,
46+ " attiny167-no-deprecated-globals" ,
47+ " attiny2313-no-deprecated-globals" ,
48+ ]
49+
50+ # Include soon-to-be-deprecated globals in the crate. Only one MCU can be selected if deprecated globals are enabled
51+ deprecated-globals = []
52+
53+ # When using this crate from another lib crate, you can use this feature to turn suppress the chip selection error in favor of your own error
54+ disable-device-selection-error = [" _mcu-selected" ]
55+
56+ # MCU-specific implementation features
57+ # Do not use directly; use either an <mcu>-deprecated-globals feature or any number of <mcu>-no-deprecated-globals features
58+ _mcu-attiny84 = [" _mcu-selected" , " _peripheral-simple-pwm" , " avr-device/attiny84" ]
59+ _mcu-attiny85 = [" _mcu-selected" , " _peripheral-adc" , " _peripheral-simple-pwm" , " avr-device/attiny85" ]
60+ _mcu-attiny88 = [" _mcu-selected" , " _peripheral-adc" , " _peripheral-spi" , " _peripheral-simple-pwm" , " avr-device/attiny88" ]
61+ _mcu-attiny167 = [" _mcu-selected" , " _peripheral-adc" , " _peripheral-spi" , " avr-device/attiny167" ]
62+ _mcu-attiny2313 = [" _mcu-selected" , " avr-device/attiny2313" ]
63+
64+ _mcu-selected = []
65+ _peripheral-adc = []
66+ _peripheral-spi = []
67+ _peripheral-simple-pwm = []
2668
27- # We must select a microcontroller to build on docs.rs
28- docsrs = [" attiny85" ]
2969
3070[dependencies ]
3171avr-hal-generic = { path = " ../../avr-hal-generic/" }
3272
3373[dependencies .avr-device ]
3474version = " 0.5.4"
35-
36- # Because this crate has its own check that at least one device is selected, we
37- # can safely "circumvent" the check in `avr-device`.
38- #
39- # Why would we want that? Otherwise, as `avr-device` is compiled first, its
40- # error will be shown and ours won't which leads to a degraded user experience
41- # as the displayed error message does not really tell what needs to be done...
4275features = [" device-selected" ]
4376
4477[package .metadata .docs .rs ]
0 commit comments