periph / conn

Go·Hardware·Lean - Interfaces
https://periph.io
Apache License 2.0
65 stars 11 forks source link

conn: deprecate Halt() #29

Open maruel opened 10 months ago

maruel commented 10 months ago

Ported from https://github.com/google/periph/issues/377.

Move the blocking operation context from the driver to the individual function call.

See https://docs.google.com/document/d/1vQdZdoOMaIan7dKwcAzqHbfM_LCnnSMUQvqypRkjohM for more information.

As such, Halt() will not be needed anymore.

This is a big deal, but the rationale is that it will tremendously simplify the device drivers. Most people get this wrong, and it had been a point of friction for contributors and obscure for users.