stevenvar / OMicroB

An OCaml generic virtual machine for microcontrollers
Other
138 stars 23 forks source link

Proposal: Simplify pin gadt #19

Closed Vertmo closed 4 years ago

Vertmo commented 5 years ago

As we discussed earlier, I'm thinking it would be a good idea to simplify the pin GADT types, by regrouping the first three parameters indicating the relevant register. That's what I've done in this PR. I've also added one more parameter indicating if the pin is capable of PWM output, similar to the one indicating if it is capable of analog input. Any thoughts on this ?

stevenvar commented 5 years ago

I think we must put this one aside for the moment since I'm not sure that we wouldn't lose information by doing this (things like PORTx and DDRx registers won't be distinct while they are - physically - different things). I'll think about it.

EDIT : After a quick further look I think it's okay, I'll ask the others anyways.

Vertmo commented 4 years ago

I'm putting this aside for now, it should target master anyway