Skip to content

core.matrix style impl selection #5

Open
@zeroem

Description

@zeroem

This is mainly to get my thoughts out about the core.matrix style implementation selection and to centralize the discussion of it.

  • I don't think the effort of building a pluggable back end is worth it for the fairly constrained number of possible gpio implemenations (sysfs for linux, maybe a jna one, something for windows? other?)
  • Unlike a matrix library in which you would need to know about the impl in many places, applications using gpio code are likely to allocate all of the pins up front. It does not seem likely that you would have dozens of files all needing to know about how to allocate pins in the same exact way
    • This is why I believe there should be a separation between the GPIOPin protocol and the reserve/release protocol. In my mind, only one point in the code would care about how to allocate pins, everything else simply acts on a pin it has been given.
  • Due to the previous two points, should someone really need to propagate the ability to allocate pins throughout their code base, I would use something like https://github.com/stuartsierra/component to manage it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions