HWA
Bare metal programming with style
|
A HWA register object is a set of consecutive bits (1 or more). It can correspond to a hardware register or to one or two subsets of one or two hardware registers.
A register object is accessed through the object it pertains to, using the path notation: (object, register)
.
Register objects give access to subsets of their content using the path notation:
(object,register,p)
: the single bit at position p
in the register object;(object,register,n,p)
: n
bits from position p
in the register object.HW_ADDRESS()
gives the address of a register object if it corresponds to a single hardware register:
HW_POSITION()
gives the position of the least significant bit in the corresponding hardware register:
HW_BITS()
gives the number of bits of a register:
Operations on registers can use the hw(...)
instruction to act immediatly, or the transactional machanism with hwa(...)
.