Skip to content

Problems with svd2rust #72

@phil-opp

Description

@phil-opp
  • The read/modify/write API takes only &self instead of &mut self for write and modify, which makes the register structs !Sync.
  • The Peripherals API creates an empty type for each register block that derefs to a RegisterBlock type, which contains the actual struct. This makes it impossible to get a &'static mut reference to the register block without boxing and unsafe. Instead, the Peripherals struct could directly contain &'static mut RegisterBlock references.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions