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