docs: Replace master/slave with controller/peripheral in I2C and SPI.
See https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names
This commit is contained in:
@@ -270,11 +270,11 @@ alias of :ref:`machine.SoftI2C <machine.SoftI2C>`)::
|
||||
# construct an I2C bus
|
||||
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000)
|
||||
|
||||
i2c.readfrom(0x3a, 4) # read 4 bytes from slave device with address 0x3a
|
||||
i2c.writeto(0x3a, '12') # write '12' to slave device with address 0x3a
|
||||
i2c.readfrom(0x3a, 4) # read 4 bytes from peripheral device with address 0x3a
|
||||
i2c.writeto(0x3a, '12') # write '12' to peripheral device with address 0x3a
|
||||
|
||||
buf = bytearray(10) # create a buffer with 10 bytes
|
||||
i2c.writeto(0x3a, buf) # write the given buffer to the slave
|
||||
i2c.writeto(0x3a, buf) # write the given buffer to the peripheral
|
||||
|
||||
Real time clock (RTC)
|
||||
---------------------
|
||||
|
||||
Reference in New Issue
Block a user