Skip to content

board_init: Inconsistent declaration #16007

@chrysn

Description

@chrysn

Description

The use of board_init is inconsistent: Some boards define it in their include/board.h, some don't and rely on the caller to extern void board_init(void) it.

As a side effect, the real documentation for board_init (if there is one) is neigh impossible to find.

Proposed steps

Rip out all board_init from include/board.h files, and ask murdock whether any users of it should add an exter declaration.

In parallel, think about whether it'd make sense to have a single header that declares the function once-and-for-all, and make those that fail use that.

Open questions

  • Is there any good reason to have separate board.h definitions for the function?
  • If we add other per-board functions, do these apply too? (For example, some boards have external power control for things like speakers; when they follow the current board_init style, it's 50:50 where and whether they declare their functions. Example: e5c0259)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: boardsArea: Board portsArea: docArea: DocumentationState: staleState: The issue / PR has no activity for >185 daysType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions