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
tock-register-interface: support disabling crate::registers
tock-register-interface has grown to feature traits for defining
custom registers and using a well-established API to access these,
manipulate fields, etc. Examples such as the RISC-V CSR interface
included with Tock show that tock-registers has utility, even without
using the included register types. This feature allows a user of
tock-registers to disable all of the built-in register types, but
still use the crate's API. Furthermore, it is possible to design
generic types which take references to some opaque tock-registers
type, without including such types in the crate.
To demonstrate that this feature indeed works as intended, the RISC-V
CSR crate is changed to depend on a build of tock-registers with this
feature disabled.
If no register types are built, this enforces that the library may
otherwise not use any unsafe code.
By default, the register types will still be included with the crate.
Signed-off-by: Leon Schuermann <leon@is.currently.online>
0 commit comments