mirror of https://github.com/periph/devices
spi: Refactor Conn and ConnCloser into Conn, Port and PortCloser (#131)
This clarifies the difference on ownership and makes it clear that DevParams() is essentially a 'connection factory'. The flow is: Bus -> Port -> Conn Doing this caught inconsistencies in the unit tests. Made the structs in spitest enforce the fact that DevParams() can only be called once. In a follow up, I'll rename a lot of 'bus' to 'port' to be more consistent but punting to not make this change unreviewable.pull/1/head
parent
61c1b2c139
commit
f33f0732fb
Loading…
Reference in New Issue