Commit dc21efe
committed
espressif: Validate sample rate
The reported code used an invalid sample rate. This improves
the error message so that it is not a generic IDFError.
The new error message says:
```
ValueError: sample_rate must be 20000-2000000
```
I verified at a sample rate of 20000 that I could read both 0
and 65535 using a jumper wire to another GPIO pin configured as a
digital output.
Closes adafruit#95041 parent 396aaef commit dc21efe
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
0 commit comments