Commit 86c71a0
esp32/machine_hw_spi: Reject invalid number of bits in constructor.
This commit adds an extra bit of parameters validation to the SPI bus
constructor on ESP32. Passing 0 as the number of bits would trigger a
division by zero error when performing read/write operations on an SPI
bus created in such a fashion.
Fixes issue micropython#5910.
Signed-off-by: Alessandro Gatti <[email protected]>1 parent 9ea8d2a commit 86c71a0
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
| |||
0 commit comments