Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
9414f92f
Commit
9414f92f
authored
May 26, 2015
by
Daniel Campora
Browse files
cc3200: Fix I2C and SPI module references.
parent
8096be08
Changes
2
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/pybi2c.c
View file @
9414f92f
...
...
@@ -56,10 +56,10 @@
///
/// from pyb import I2C
///
/// i2c = I2C(1) # create
/// i2c = I2C(1,
50000)
# create and init with a 50KHz baudrate
/// i2c.init(
100000)
# init with a 100KHz baudrate
/// i2c.deinit() # turn off the peripheral
/// i2c = I2C(1)
# create
/// i2c = I2C(1,
I2C.MASTER, baudrate=50000)
# create and init with a 50KHz baudrate
/// i2c.init(
I2C.MASTER, baudrate=100000)
# init with a 100KHz baudrate
/// i2c.deinit()
# turn off the peripheral
///
/// Printing the i2c object gives you information about its configuration.
///
...
...
@@ -76,7 +76,6 @@
///
/// A master must specify the recipient's address:
///
/// i2c.init(1, 100000)
/// i2c.send('123', 0x42) # send 3 bytes to slave with address 0x42
/// i2c.send(b'456', addr=0x42) # keyword for address
///
...
...
cc3200/mods/pybspi.c
View file @
9414f92f
...
...
@@ -54,7 +54,7 @@
/// parameters to init the SPI bus:
///
/// from pyb import SPI
/// spi = SPI(2000000, bits=8, polarity=0, phase=0, nss=SPI.ACTIVE_LOW)
/// spi = SPI(
1, SPI.MASTER, baudrate=
2000000, bits=8, polarity=0, phase=0, nss=SPI.ACTIVE_LOW)
///
/// Only required parameter is the baudrate, in Hz. polarity and phase may be 0 or 1.
/// Bit accepts 8, 16, 32. Chip select values are ACTIVE_LOW and ACTIVE_HIGH
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment