Commit Graph

58 Commits

Author SHA1 Message Date
Radomir Dopieralski 78f6c2232c Allow empty reads and writes for busio.SPI
This is mostly for convenience, so that user code doesn't
need to add additional checks.

Also, bring the bitbangio into compatibility with busio wrt. empty
buffers.
2017-11-03 17:33:37 +01:00
Dan Halbert f738996164 Allow writing buffer of length zero to I2C device; it can be used to poll for existence. 2017-10-30 18:32:36 -07:00
Scott Shawcroft bd7abcda97 shared-bindings: Check that I2C and SPI reads and writes are given a buffer of at least 1. (#370)
Fixes #358
2017-10-25 17:28:23 -04:00
Dan Halbert c478c10923 Do not allow a *io object to be used after deinit().
Fixes #278, #277, #276, #275.
2017-10-03 12:07:17 -07:00
Scott Shawcroft 6467e3d40b shared-bindings: Prevent check_lock from being optimized away. (#240)
Fixes #229
2017-09-06 17:49:30 -04:00
Scott Shawcroft 714521a4c7 shared-bindings: Update docs to remove with statements from examples but add more detail to the design guide about their use. 2017-06-07 14:39:12 -07:00
Scott Shawcroft 939c0045db Switch to a shared piece of code to compute start and length of a
buffer from start, end and length. The old code miscomputed length
leading to writing and reading from memory past the end of the buffer.
Consolidating the code should make it easier to get right everywhere.
2017-04-20 11:24:05 -07:00
Scott Shawcroft f28f8ba568 Split up nativeio.
This was done to allow greatly granularity when deciding what functionality
is built into each board's build. For example, this way pulseio can be
omitted to allow for something else such as touchio.
2017-04-10 13:32:19 -07:00