This adds a couple of bit-fields to read/write, as well as streamlining the use of read/write methods by means of coupling a bit-field to its register address and offset using associated consts/types.
instead of having to manually choose which &dyn Register to provide when calling a bit-field read/write, the Bitfield trait must now define which Register it's associated with, and which Register implementing value it's associated with. The read/write methods take these definitions required by Bitfield implementation to determine the metadata needed to read/write the correct register.
This adds a couple of bit-fields to read/write, as well as streamlining the use of read/write methods by means of coupling a bit-field to its register address and offset using associated consts/types.
Bitfields added, and chapter in datasheet: https://invensense.tdk.com/wp-content/uploads/2021/07/ds-000451_icm-42670-p-datasheet.pdf
Register read/write structure
instead of having to manually choose which
&dyn Register
to provide when calling a bit-field read/write, theBitfield
trait must now define whichRegister
it's associated with, and whichRegister
implementing value it's associated with. The read/write methods take these definitions required byBitfield
implementation to determine the metadata needed to read/write the correct register.