Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type-safe interface to wiringpi #5

Open
co-dan opened this issue Jan 27, 2019 · 1 comment
Open

type-safe interface to wiringpi #5

co-dan opened this issue Jan 27, 2019 · 1 comment

Comments

@co-dan
Copy link
Contributor

co-dan commented Jan 27, 2019

I am interested in having a slightly more generic type-safe interface to wiringpi.
Specifically this entails having variants pin = .. | GPIO4 | GPIO5 | .., pin_mode = IN | OUT, etc, and make all the functions operate on those types. So, instead of

val pin_mode : int -> int -> unit

have

val pin_mode : pin -> mode -> unit

I was planning to write some sort of typed interface for GPIO using your library as a backend. But if you are interesting, I can keep it close to the wiringpi API and have it part of this package? That is, if you still have time to maintain this.

@Leonidas-from-XIV
Copy link
Owner

I think a higher level, type-safe variant would make a lot of sense. I would guess such a layer would be rather small (since it is mostly mapping, I assume), so why don't you add it to ocaml-wiringpi directly? I can make you co-maintainer if you're interested. That saves a bit of maintenance for both of us (maintaining package, releases and such stuff).

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

No branches or pull requests

2 participants