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 85bfbde commit 0104c33Copy full SHA for 0104c33
zephyr/src/sys.rs
@@ -125,6 +125,24 @@ pub mod gpio {
125
device: self.pin.port,
126
}
127
128
+
129
+ /// Configure a single pin.
130
+ pub fn configure(&mut self, extra_flags: raw::gpio_flags_t) {
131
+ // TODO: Error?
132
+ unsafe {
133
+ raw::gpio_pin_configure(self.pin.port,
134
+ self.pin.pin,
135
+ self.pin.dt_flags as raw::gpio_flags_t | extra_flags);
136
+ }
137
138
139
+ /// Toggle pin level.
140
+ pub fn toggle_pin(&mut self) {
141
142
143
+ raw::gpio_pin_toggle_dt(&self.pin);
144
145
146
147
148
0 commit comments