summaryrefslogtreecommitdiff
path: root/shared-module/bitbangio
AgeCommit message (Collapse)Author
2021-03-26bitbangio.SPI.read: Support write_value, fix some other nitsJeff Epler
2021-03-15run code formatting scriptmicroDev
2021-03-02wipDan Halbert
2020-07-06Add license to some obvious files.Diego Elio Pettenò
2020-02-28new pin validation routines; don't use mp_const_none if NULL will doDan Halbert
2019-10-26bitbangio.SPI was not setting direction of output pinsDan Halbert
2018-11-08Move atmel-samd to tinyusb and support nRF flash.Scott Shawcroft
This started while adding USB MIDI support (and descriptor support is in this change.) When seeing that I'd have to implement the MIDI class logic twice, once for atmel-samd and once for nrf, I decided to refactor the USB stack so its shared across ports. This has led to a number of changes that remove items from the ports folder and move them into supervisor. Furthermore, we had external SPI flash support for nrf pending so I factored out the connection between the usb stack and the flash API as well. This PR also includes the QSPI support for nRF.
2018-08-07Support internationalisation.Scott Shawcroft
2018-07-31Merge pull request #1075 from tannewt/more_mp_raiseDan Halbert
Use more mp_raise_* to save 28 bytes code size.
2018-07-31Use more mp_raise_* to save 28 bytes code size.Scott Shawcroft
2018-07-16Merge 3.0.0 final bugfixes and changes to masterDan Halbert
2018-05-16Reformat the error messageScott Shawcroft
2018-05-13 remove #include py/nlr.h from I2C.cJerry Needell
2018-05-13 revise to use mp_raise_msg insead of nlr_raise....Jerry Needell
2018-05-13 add timeout keyword to I2C - for bitbangio - ignored for busioJerry Needell
2018-02-05replace tabs with spacesdean
2018-01-30DM: added write_readinto to bitbangiodean
2017-10-03Do not allow a *io object to be used after deinit().Dan Halbert
Fixes #278, #277, #276, #275.
2017-08-25Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in ↵Dan Halbert
development) master. cpx build compiles and loads and works in repl; test suite not run yet esp8266 not tested yet
2017-04-12atmel-samd: Rework status LED implementationScott Shawcroft
* Track status pin use by user code separately so it can take over the pins and then give them back. * Switch to hardware SPI for APA102 on Gemma and Trinket. * Merge microcontroller/types.h into microcontroller/Pin.h to better match approach going forwards.
2017-04-10Split up nativeio.0.9.4Scott Shawcroft
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-03-25Add low-level OneWire support class.Scott Shawcroft
This class focuses on the timing sensitive parts of the protocol. Everything else will be done by Python code. This also establishes that its OK to back a nativeio class with a bitbang implementation when no hardware acceleration exists. When it does, then bitbangio should be used to explicitly bitbang a protocol.
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
2016-12-09atmel-samd: Add APA102 support and flash more advanced status.Scott Shawcroft
The new sequence is as follows: * Solid blue during the boot/settings script. * Solid green during the main/code script. * After main while waiting to enter repl or reset: * Fading green once main is done successfully. * On error produce a series of flashes: * Long flash color of script. * Long flash color of error: * Green = IndentationError * Cyan = SyntaxError * White = NameError * Orange = OSError * Yellow = Other error * Line number of the exception by digit. Number of flashes represents value. * Thousands = White * Hundreds = Blue * Tens = Yellow * Ones = Cyan * Off for a period and then repeats. At any point a write to the flash storage will flicker red. Fixes #63
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: Make MOSI and MISO optional for SPI.Scott Shawcroft
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.