pre-commit.com provides a way to configure pre-commit hooks for multiple
tools, including `reuse lint` (configured here), isort, black, and more.
This is also integrated with GitHub actions in the example configuration.
The REUSE specifications[1] are meant to make it explicit and easier to
apply code licensing information for a project. The provided lint tool
makes it easy to ensure all the content (code and not code) is tagged.
Important notes:
* All the code (and documentation) that otherwise didn't have an explicit
license headers have been tagged with ladyada's copyright as per the
LICENSE file.
* favicon.ico and CODE_OF_CONDUCT.md have been synced from the
source-of-truth repositories.
* All configuration files have been tagged with ladyada's copyright and
Unlicense[2]. The current REUSE recommendation is to use CC0-1.0, but
that has… side effects. There's some discussion in [3] about the
recommendation for likely-uncopyrightable files (such as configuration
files).
[1]: https://reuse.software/
[2]: https://unlicense.org/
[3]: https://github.com/fsfe/reuse-docs/issues/62
Writing to UDP requires separate APIs to use to append data and finalize.
TCP sends and confirms per-write and finalize is a no-op. UDP appends to a buffer and finalize sends all at once.
The simple socket_open method doesn't actually create a socket per https://github.com/arduino/nina-fw.
Since socket_connect is a convenience method anyway, and connect doesn't really make sense for UDP, add the start_server call for UDP to that method to have a socket to write as well as read on.
e.x. usage
esp.socket_connect(socket_num, dest, port, esp.UDP_MODE)
esp.socket_write(socket_num, buffer, esp.UDP_MODE)
avail = esp.socket_available(socket_num)
recv = esp.socket_read(socket_num, avail)
esp.socket_close(socket_num)