Commit 0744b81
committed
WIP: firmware: guard I2C transactions with timeouts.
If we don't add timeouts on I2C transactions, then the USB request
that caused it (for reads) or the next USB control request (for
writes) will silently hang forever until the device is power cycled.
This is clearly undesirable. However, this does not happen at all
during normal operation, and although it hardens the device, the FX2
firmware size comes at a premium, and blindly spraying these guard
conditions adds a nontrivial increase.
Therefore this code, although tested, is not currently used.1 parent a8ac6ba commit 0744b81
1 file changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
287 | 307 | | |
288 | 308 | | |
289 | 309 | | |
| |||
771 | 791 | | |
772 | 792 | | |
773 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
774 | 798 | | |
775 | 799 | | |
776 | 800 | | |
| |||
0 commit comments