You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Older peripheral wrappers have unsafe init functions, reasoning that this is equivalent to a Rust PAC's stealing function (which allows creating the same peripheral twice). Newer peripheral wrappers have safe init functions, reasoning that in RIOT initializers are idempotent.
I don't have a full conclusion yet, because while RIOT does make some of those things safe, peripheral drivers are also not thread safe. But given they don't access real RAM, maybe it's fine even under Rust's model for both to write to registers a the same time? (At least as in "not cause UB" -- the ADC readings are still likely garbage).
The text was updated successfully, but these errors were encountered:
Older peripheral wrappers have unsafe init functions, reasoning that this is equivalent to a Rust PAC's stealing function (which allows creating the same peripheral twice). Newer peripheral wrappers have safe init functions, reasoning that in RIOT initializers are idempotent.
I don't have a full conclusion yet, because while RIOT does make some of those things safe, peripheral drivers are also not thread safe. But given they don't access real RAM, maybe it's fine even under Rust's model for both to write to registers a the same time? (At least as in "not cause UB" -- the ADC readings are still likely garbage).
The text was updated successfully, but these errors were encountered: