@@ -16,22 +16,23 @@ edition = "2018"
16
16
gpio_sysfs = [" sysfs_gpio" ]
17
17
gpio_cdev = [" gpio-cdev" ]
18
18
async-tokio = [" gpio-cdev/async-tokio" , " dep:embedded-hal-async" , " tokio/time" ]
19
- i2c = [" i2cdev" ]
19
+ i2c = [" i2cdev" , " nix " ]
20
20
spi = [" spidev" ]
21
+ serial = [" serialport" , " embedded-hal-nb" ]
21
22
22
- default = [ " gpio_cdev" , " gpio_sysfs" , " i2c" , " spi" ]
23
+ default = [ " gpio_cdev" , " gpio_sysfs" , " i2c" , " spi" , " serial " ]
23
24
24
25
[dependencies ]
25
26
embedded-hal = " 1"
26
- embedded-hal-nb = " 1"
27
+ embedded-hal-nb = { version = " 1" , optional = true }
27
28
embedded-hal-async = { version = " 1" , optional = true }
28
29
gpio-cdev = { version = " 0.6.0" , optional = true }
29
30
sysfs_gpio = { version = " 0.6.1" , optional = true }
30
31
i2cdev = { version = " 0.6.0" , optional = true }
31
32
nb = " 1"
32
- serialport = { version = " 4.2.0" , default-features = false }
33
+ serialport = { version = " 4.2.0" , default-features = false , optional = true }
33
34
spidev = { version = " 0.6.0" , optional = true }
34
- nix = " 0.27.1"
35
+ nix = { version = " 0.27.1" , optional = true }
35
36
tokio = { version = " 1" , default-features = false , optional = true }
36
37
37
38
[dev-dependencies ]
0 commit comments