Commit e3597a7
committed
cleanup peripheral register addressing code
There is no need to duplicate the "<= DR_REG_MAG_DIRECT" check
in two functions. Now the _soc_reg_to_ulp_periph_sel() function
is used only for "full addresses" (as it was some commits ago)
and will return a ValueError if used with direct ULP addresses.
This commit also masks values correctly when setting the addr
and periph_sel fields for "direct ULP addresses", so only the
bits we're interested in actually get used (rather than being
implicitly trimmed because there aren't more bits available in
a field).1 parent c967c1d commit e3597a7
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | | - | |
| 361 | + | |
364 | 362 | | |
365 | 363 | | |
366 | 364 | | |
| |||
378 | 376 | | |
379 | 377 | | |
380 | 378 | | |
381 | | - | |
382 | | - | |
| 379 | + | |
| 380 | + | |
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
| |||
393 | 391 | | |
394 | 392 | | |
395 | 393 | | |
396 | | - | |
397 | | - | |
| 394 | + | |
| 395 | + | |
398 | 396 | | |
399 | 397 | | |
400 | 398 | | |
| |||
0 commit comments