Skip to content

Commit e069bca

Browse files
authored
Merge pull request #27 from posborne/fix-active-low-ordering
export: fix active_low operation when using direction high/low
2 parents c86a9fb + a13a34e commit e069bca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gpio-utils"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["Paul Osborne <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"

src/export.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ pub fn export(pin_config: &PinConfig, symlink_root: Option<&str>) -> Result<()>
125125
// create root directory if not exists
126126
fs::create_dir_all(symroot)?;
127127

128-
// set the pin direction
128+
// set active low
129129
pin_config
130130
.get_pin()
131-
.set_direction(pin_config.direction)?;
131+
.set_active_low(pin_config.active_low)?;
132132

133-
// set active low directio
133+
// set the pin direction
134134
pin_config
135135
.get_pin()
136-
.set_active_low(pin_config.active_low)?;
136+
.set_direction(pin_config.direction)?;
137137

138138
// create symlink for each name
139139
for name in &pin_config.names {

0 commit comments

Comments
 (0)