Skip to content

Pin owner for out-of-tree usermod, and inter-usermod method calls #5290

@blazoncek

Description

@blazoncek

Is your feature request related to a problem? Please describe.
Currently if one needs GPIO for usermod a new entry is added to pin_manager.h to add a new PinOwner. The same goes for usermod ID constant defined in const.h.

If one wants to create out-of-tree (i.e. not included in WLED source code, privately maintained) usermod that requires GPIO allocation there is no way to extend PinOwner enum (except in local/private repository by modifying pin_manager.h) and that defeats usability of such usermod.

The same is true for usermod ID constant defined in const.h.

Describe the solution you'd like
Add extensibility to PinManager to allow addition of custom PinOwner. Remove the need for usermod ID constants or replace it with something more versatile.

Describe alternatives you've considered
Reuse one of the existing PinOwner codes but that is not a safe approach as there might be a clash. Or, provide a patch for upstream to add new owner, but that is no better than the old approach with in-tree usermods.

Additional context
Since usermods were modified to behave like libraries (i.e. no longer included in usermod_list.cpp) it is expected that WLED API would allow extensibility without modifying WLED's source code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions