Swift MMIO 0.0.1
Swift MMIO initial release.
Additions
- Introduces
@RegisterBank
and@RegisterBank(offset:)
macros, enabling you
to define register groups directly in Swift code. #2 - Introduces
@Register
macro and bit field macros (@Reserved
,@ReadWrite
,
@ReadOnly
,@WriteOnly
) for declaring registers composed of bit fields. Bit
field macros take a range parameter which describes the subset of bits they
reference (e.g.,@ReadWrite(bits: 3..<7)
). #4 - Enhances bit field macros to support discontiguous bit fields. They now accept
a variadic list of bit ranges and automatically handle scattering/gathering
from the relevant bits (e.g.,@ReadWrite(bits: 3..<7, 10..<12)
). #10 - Enhances bit field macros with type projections via a new
as:
parameter.
Projections allow you to operation on bit fields using strong types instead of
raw integers (e.g.@ReadWrite(bits: 3..<7, as: A.self)
) #27 - Enhances registers with support for interposing reads and writes when
compiling withFEATURE_INTERPOSABLE
. You can use interposers to unit test
drivers. This feature is enabled when building with the
SWIFT_MMIO_FEATURE_INTERPOSABLE
environment variable defined. #31
The 0.0.1 release includes contributions from @rauhul. Thank you!