Skip to content

gen_block: Resolve dependencies.#109

Merged
Wassasin merged 1 commit intoembassy-rs:mainfrom
inferiorhumanorgans:iho/gen-block-expand
Apr 7, 2026
Merged

gen_block: Resolve dependencies.#109
Wassasin merged 1 commit intoembassy-rs:mainfrom
inferiorhumanorgans:iho/gen-block-expand

Conversation

@inferiorhumanorgans
Copy link
Copy Markdown

@inferiorhumanorgans inferiorhumanorgans commented Apr 6, 2026

This will:

  • Assume each YAML file has exactly one block
  • Assume he name of the YAML file is the unsanitized block name
  • Load additional YAML files as needed
  • Only garbage collect extra blocks (not other types).

This enables patterns like this:

block/PORT_ELC:
  description: Port (w/ Event Link) Control Registers.
  extends: PORT
  items:
  - name: EIDR
    description: Event input data register.
    byte_offset: 4
    access: Read
    bit_size: 16
    fieldset: regs::EIDR
fieldset/regs::EIDR:
  description: Event input data register.
  bit_size: 16
  fields:
  - name: EIDR
    description: Pmn Event Input Data.
    bit_offset: 0
    bit_size: 16
    enum: vals::EIDR_EIDR
enum/vals::EIDR_EIDR:
  bit_size: 16
  variants:
  - name: '0'
    description: Low input.
    value: 0
  - name: '1'
    description: High input.
    value: 1

This will:

* Assume each YAML file has exactly one block
* Assume he name of the YAML file is the unsanitized block name
* Load additional YAML files as needed
* Only garbage collect extra blocks (not other types).
@Wassasin Wassasin merged commit 09d66fe into embassy-rs:main Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants