circuitpython/ports/nrf/modules
Damien George 39d50d129c ports: Add SoftI2C and SoftSPI to machine module where appropriate.
Previous commits removed the ability for one I2C/SPI constructor to
construct both software- or hardware-based peripheral instances.  Such
construction is now split to explicit soft and non-soft types.

This commit makes both types available in all ports that previously could
create both software and hardware peripherals: machine.I2C and machine.SPI
construct hardware instances, while machine.SoftI2C and machine.SoftSPI
create software instances.

This is a breaking change for use of software-based I2C and SPI.  Code that
constructed I2C/SPI peripherals in the following way will need to be
changed:

    machine.I2C(-1, ...)            ->  machine.SoftI2C(...)
    machine.I2C(scl=scl, sda=sda)   ->  machine.SoftI2C(scl=scl, sda=sda)

    machine.SPI(-1, ...)            ->  machine.SoftSPI(...)
    machine.SPI(sck=sck, mosi=mosi, miso=miso)
                        ->  machine.SoftSPI(sck=sck, mosi=mosi, miso=miso)

Code which uses machine.I2C and machine.SPI classes to access hardware
peripherals does not need to change.

Signed-off-by: Damien George <damien@micropython.org>
2020-10-01 12:57:10 +10:00
..
ble nrf: Clean up source by removing tabs, trailing spaces, non-ASCII chars. 2019-08-28 13:34:45 +10:00
board all: Use MP_ERROR_TEXT for all error messages. 2020-04-05 15:02:06 +10:00
machine ports: Add SoftI2C and SoftSPI to machine module where appropriate. 2020-10-01 12:57:10 +10:00
music all: Use MP_ERROR_TEXT for all error messages. 2020-04-05 15:02:06 +10:00
ubluepy all: Use MP_ERROR_TEXT for all error messages. 2020-04-05 15:02:06 +10:00
uos nrf: Remove unnecessary includes of mpconfigport.h and its header guard. 2020-09-09 00:13:34 +10:00
utime nrf: Add support for time.ticks_xxx functions using RTC1. 2020-07-08 23:47:02 +10:00