Closed blacksmithgu closed 7 years ago
It's just for consistency. When you just need a volatile wrapper, the name Volatile
makes more sense than ReadWrite
. However, when using ReadOnly
and WriteOnly
(e.g. to describe memory mapped hardware registers), the name ReadWrite
fits better.
I agree that a separate ReadWrite
struct is redundant. We should make ReadWrite
a type alias for Volatile
instead (pub type ReadWrite = Volatile;
).
Ah, that would fix it nicely!
The
ReadWrite
type is functionally equivalent to theVolatile
type. Is there any reason for having this, or is it for consistency's sake withReadOnly
andWriteOnly
(in case the semantics ofVolatile
change)?