diff options
author | David P <dpoirier@y7mail.com> | 2021-06-12 14:51:05 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-07-18 11:19:44 +1000 |
commit | fdd5b18133e9d9f5a4e76be22ece6632d11d7fee (patch) | |
tree | 07f4e1b5eb2688306ec840a0d099b4408f7b46f2 /docs/pyboard/tutorial | |
parent | cbc8d5b61f0742e810ad45bd27d8daa11f3dbbf8 (diff) | |
download | micropython-fdd5b18133e9d9f5a4e76be22ece6632d11d7fee.tar.gz micropython-fdd5b18133e9d9f5a4e76be22ece6632d11d7fee.zip |
docs: Replace master/slave with controller/peripheral in I2C and SPI.
See https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names
Diffstat (limited to 'docs/pyboard/tutorial')
-rw-r--r-- | docs/pyboard/tutorial/amp_skin.rst | 2 | ||||
-rw-r--r-- | docs/pyboard/tutorial/lcd_skin.rst | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/pyboard/tutorial/amp_skin.rst b/docs/pyboard/tutorial/amp_skin.rst index bcb5832613..b6558959ea 100644 --- a/docs/pyboard/tutorial/amp_skin.rst +++ b/docs/pyboard/tutorial/amp_skin.rst @@ -30,7 +30,7 @@ To set the volume, define the following function:: import pyb def volume(val): - pyb.I2C(1, pyb.I2C.MASTER).mem_write(val, 46, 0) + pyb.I2C(1, pyb.I2C.CONTROLLER).mem_write(val, 46, 0) Then you can do:: diff --git a/docs/pyboard/tutorial/lcd_skin.rst b/docs/pyboard/tutorial/lcd_skin.rst index 288ac1bf08..4df0041607 100644 --- a/docs/pyboard/tutorial/lcd_skin.rst +++ b/docs/pyboard/tutorial/lcd_skin.rst @@ -51,7 +51,7 @@ MPR121 capacitive touch sensor has address 90. To get started, try:: >>> import pyb - >>> i2c = pyb.I2C(1, pyb.I2C.MASTER) + >>> i2c = pyb.I2C(1, pyb.I2C.CONTROLLER) >>> i2c.mem_write(4, 90, 0x5e) >>> touch = i2c.mem_read(1, 90, 0)[0] @@ -68,7 +68,7 @@ directory or ``lib/`` directory) and then try:: >>> import pyb >>> import mpr121 - >>> m = mpr121.MPR121(pyb.I2C(1, pyb.I2C.MASTER)) + >>> m = mpr121.MPR121(pyb.I2C(1, pyb.I2C.CONTROLLER)) >>> for i in range(100): ... print(m.touch_status()) ... pyb.delay(100) @@ -80,7 +80,7 @@ Try touching each one in turn. Note that if you put the LCD skin in the Y-position, then you need to initialise the I2C bus using:: - >>> m = mpr121.MPR121(pyb.I2C(2, pyb.I2C.MASTER)) + >>> m = mpr121.MPR121(pyb.I2C(2, pyb.I2C.CONTROLLER)) There is also a demo which uses the LCD and the touch sensors together, and can be found `here <http://micropython.org/resources/examples/lcddemo.py>`__. |