Skip to content

Device/machine package to keep all target hardware details confined #65

@jubeormk1

Description

@jubeormk1

Reviewing PR #61 and authoring flash OTA details I had to deal with some hardware details.

Different parts of the project need to access hardware and that bring the challenges of sharing peripherals (static by nature). At the moment we implement these details on different parts of the code and this might prove challenging while expanding the target from esp32c6 to other members of the esp family and beyond.

I would like to open the discussion of putting al hardware details in a workspace member package (device? Machine? Other name?) and abstract the hardware configuration and interaction using traits and where sharing is required creating freestanding singletons.

We have merged into main already the "storage" package that provides access to the flash and (will) allow sharing this resource between config and OTA.

In my fork for the OTA implementation I have defined traits in "ota" member package and implemented them in the storage package. That keeps all the hardware/platform details away from my OTA package. Add to that target feature flags, and you can have all the implementation details organised by family and peripheral.

It will take some time to do this, but it might help keeping our project readable and extensible.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions