adamgreig / stm32ral

Register access layer in Rust for all STM32 microcontrollers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve register aliasing

adamgreig opened this issue · comments

At the moment register aliases are merged where possible: their fields are combined and the resulting name set to the common prefix of the two names if that prefix is at least 3 characters long.

This isn't ideal as some fields alias poorly (especially in the USB stack with OTG_HS_DIEPINT5/OTH_HS_DIEPTSIZ7).

This does work well for timer capture/compare registers though.

See the README for more details.

Ideally we could use anonymous unions to improve matters.