Skip to content

Commit 9414f92

Browse files
author
Daniel Campora
committed
cc3200: Fix I2C and SPI module references.
1 parent 8096be0 commit 9414f92

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

cc3200/mods/pybi2c.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
///
5757
/// from pyb import I2C
5858
///
59-
/// i2c = I2C(1) # create
60-
/// i2c = I2C(1, 50000) # create and init with a 50KHz baudrate
61-
/// i2c.init(100000) # init with a 100KHz baudrate
62-
/// i2c.deinit() # turn off the peripheral
59+
/// i2c = I2C(1) # create
60+
/// i2c = I2C(1, I2C.MASTER, baudrate=50000) # create and init with a 50KHz baudrate
61+
/// i2c.init(I2C.MASTER, baudrate=100000) # init with a 100KHz baudrate
62+
/// i2c.deinit() # turn off the peripheral
6363
///
6464
/// Printing the i2c object gives you information about its configuration.
6565
///
@@ -76,7 +76,6 @@
7676
///
7777
/// A master must specify the recipient's address:
7878
///
79-
/// i2c.init(1, 100000)
8079
/// i2c.send('123', 0x42) # send 3 bytes to slave with address 0x42
8180
/// i2c.send(b'456', addr=0x42) # keyword for address
8281
///

cc3200/mods/pybspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
/// parameters to init the SPI bus:
5555
///
5656
/// from pyb import SPI
57-
/// spi = SPI(2000000, bits=8, polarity=0, phase=0, nss=SPI.ACTIVE_LOW)
57+
/// spi = SPI(1, SPI.MASTER, baudrate=2000000, bits=8, polarity=0, phase=0, nss=SPI.ACTIVE_LOW)
5858
///
5959
/// Only required parameter is the baudrate, in Hz. polarity and phase may be 0 or 1.
6060
/// Bit accepts 8, 16, 32. Chip select values are ACTIVE_LOW and ACTIVE_HIGH

0 commit comments

Comments
 (0)