Commit 2b1be69
Merge #177
177: Add check_interrupt method for GPIO pins r=therealprof a=mvirkkunen
This is needed to properly use pins where the interrupt vector is shared between multiple pins. Copied and pasted from stm32f1xx-hal, except that I changed the method to `&self` as opposed to `&mut self` because that makes more sense for a getter.
Personally I'd prefer a single method that both checks and clears the interrupt bit in one operation and returns if it was set, but I'm not sure if that has issues in some use cases. This way the user gets to decide.
Co-authored-by: Matti Virkkunen <[email protected]>2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| |||
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
223 | 234 | | |
224 | 235 | | |
225 | 236 | | |
| |||
0 commit comments