summaryrefslogtreecommitdiff
path: root/shared-bindings/bitbangio/I2C.c
AgeCommit message (Collapse)Author
2021-03-15run code formatting scriptmicroDev
2020-08-07Modify some Python stubsTaku Fukada
2020-07-27Fix several type hintsTaku Fukada
2020-07-23Remove stop kwarg from I2C writeto.Scott Shawcroft
Fixes #2082
2020-07-03Made every init return Nonedherrada
2020-07-02Changed unions to ReadableBuffer and WriteableBufferdherrada
2020-07-02Removed all 'self, )'dherrada
2020-07-02Made suggested changesdherrada
2020-07-02Changed bytearray to a uniondherrada
2020-07-02Added type hints to bitbangiodherrada
2020-06-25Use main/selected terminology in docstringsJeff Epler
Also copy some notes from busio docstrings to bitbangio docstrings
2020-05-12Swap sphinx to autoapi and the inline stubsScott Shawcroft
2020-05-01Did audiopwmio, bitbangio, and _bleiodherrada
2020-03-05rename routines to be clearer; fix wiznet arg typesDan Halbert
2020-02-28new pin validation routines; don't use mp_const_none if NULL will doDan Halbert
2019-08-23Use size_t and document buffers can be the same.Scott Shawcroft
2019-08-22Add writeto_then_readfrom to I2C API. Deprecate stop kwarg.Scott Shawcroft
writeto_then_readfrom has been added to do a write -> no stop -> repeated start -> read sequence. This is done to match the capabilities of Blinka on Linux. Code that uses stop=False will not work correctly on Blinka. To fix, if stop=False then use writeto_then_readfrom otherwise use writeto then readfrom_into. First step in #2082
2019-06-12Refactor deinit check to reduce code size.Scott Shawcroft
2019-05-30Improve rST consistency for rst2pyi useScott Shawcroft
2019-01-14Add subclass support to displayio.Scott Shawcroft
Also, swap make_news to accept a kwarg map and refine param checking. Fixes #1237
2018-08-07Support internationalisation.Scott Shawcroft
2018-05-13 add timeout keyword to I2C - for bitbangio - ignored for busioJerry Needell
2018-01-02merge from 2.2.0 + fix up board defsDan Halbert
2017-10-03Do not allow a *io object to be used after deinit().Dan Halbert
Fixes #278, #277, #276, #275.
2017-06-07shared-bindings: Update docs to remove with statements from examples but add ↵Scott Shawcroft
more detail to the design guide about their use.
2017-04-20Switch to a shared piece of code to compute start and length of aScott Shawcroft
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-03-07shared-bindings: Do a pass on the docs and make sure keyword only arguments ↵Scott Shawcroft
make sense and are documented correctly. Fixes #109
2017-02-24Switch exception throwing to mp_raise helpers. It saves a little code space ↵Scott Shawcroft
each time to share the call.
2017-02-19Two I2C fixes:Scott Shawcroft
1) Bus error will be thrown on read/write errors with errno set. (Read didn't used to fail at all.) 2) try_lock correctly returns boolean whether lock was grabbed. Fixes #87
2017-02-19Switch enum-like attributes to all caps and add print support for them. Make ↵Scott Shawcroft
room for this functionality by adding a shared __enter__ function object. #76
2016-12-02Add try_lock and unlock to I2C and SPI classes to make sure thingsScott Shawcroft
are shared well between threads and underlying MicroPython (SPI Flash for example.) It is recommended to use the bus device classes to manage the locks and other transaction state. https://github.com/adafruit/Adafruit_MicroPython_BusDevice Fixed #58 Fixed #59 Fixed #60
2016-11-29shared-bindings: Ensure pin objects are actually pins.Scott Shawcroft
Fixes #12
2016-11-21This introduces an alternative hardware API called nativeio structured ↵Scott Shawcroft
around different functions that are typically accelerated by native hardware. Its not meant to reflect the structure of the hardware. Docs are here: http://tannewt-micropython.readthedocs.io/en/microcontroller/ It differs from upstream's machine in the following ways: * Python API is identical across ports due to code structure. (Lives in shared-bindings) * Focuses on abstracting common functionality (AnalogIn) and not representing structure (ADC). * Documentation lives with code making it easy to ensure they match. * Pin is split into references (board.D13 and microcontroller.pin.PA17) and functionality (DigitalInOut). * All nativeio classes claim underlying hardware resources when inited on construction, support Context Managers (aka with statements) and have deinit methods which release the claimed hardware. * All constructors take pin references rather than peripheral ids. Its up to the implementation to find hardware or throw and exception.