We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c6e977 commit 51afe26Copy full SHA for 51afe26
zephyr/src/sys.rs
@@ -119,6 +119,24 @@ pub mod gpio {
119
device: self.pin.port,
120
}
121
122
+
123
+ /// Configure a single pin.
124
+ pub fn configure(&mut self, extra_flags: raw::gpio_flags_t) {
125
+ // TODO: Error?
126
+ unsafe {
127
+ raw::gpio_pin_configure(self.pin.port,
128
+ self.pin.pin,
129
+ self.pin.dt_flags as raw::gpio_flags_t | extra_flags);
130
+ }
131
132
133
+ /// Toggle pin level.
134
+ pub fn toggle_pin(&mut self) {
135
136
137
+ raw::gpio_pin_toggle_dt(&self.pin);
138
139
140
141
142
0 commit comments