Commit e0e5e23
committed
core: arduino: analogWrite: Fix DAC output calculation
- Correct max value calculation
- Add guard for DAC entry is not defined case
- initialize only if DAC not initialized
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>1 parent e9b9a3b commit e0e5e23
2 files changed
Lines changed: 33 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| |||
342 | 346 | | |
343 | 347 | | |
344 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
345 | 353 | | |
346 | 354 | | |
347 | 355 | | |
348 | 356 | | |
349 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
350 | 361 | | |
351 | | - | |
352 | | - | |
353 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
354 | 379 | | |
355 | 380 | | |
356 | 381 | | |
| |||
0 commit comments