Add RawRepresentable
conformance to the generated Read
and Write
structs
#70
Labels
mmio
Related to the MMIO library
(I originally proposed this change here.)
The raw value of the register can be read/written to by accessing the
.raw.storage
property like so:This seems similar to the
rawValue
property of theRawRepresentable
protocol. Instead of.raw.storage
, perhaps the generatedRead
/Write
structs could conform toRawRepresentable
. It probably doesn’t make a functional difference but it might reduce the ramp-up time for developers who are new to the package.(There was a concern about the optionality of the
init(rawValue:)
initializer; however, a non-optional initializer can satisfy an optional initializer protocol requirement.)The text was updated successfully, but these errors were encountered: