-
Notifications
You must be signed in to change notification settings - Fork 38
Description
If a a peripheral is partitioned into multiple clusters because registers differ on a subset of the clustered registers between partitions, it would be nice to be able to share the enum definitions from registers that are identical. Even better would be to also share the enum definitions in identical fields in registers that have extra fields.
As an example, the STM32H5xx series GPDMA peripheral has a bank of 8 channels. Channels 0-5 are identical, but channels 6 & 7 have extra functionality, which manifests in extra fields in a few of those registers. Unfortunately this means that the bank is partitioned into channels 0-5 and channels 6-7 and all the identical field definitions are duplicated across the separate partitions, which also means that a single common enum cannot be used for addressing identical registers across all 8 channels.