mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update
This commit is contained in:
parent
34d3652711
commit
39f77eb92b
1844 changed files with 899433 additions and 7 deletions
25
USDK/example_sources/spi_stream_twoboard/readme.txt
Normal file
25
USDK/example_sources/spi_stream_twoboard/readme.txt
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
Example Description
|
||||
|
||||
This example describes how to use SPI stream read/write by mbed api.
|
||||
|
||||
|
||||
The SPI Interface provides a "Serial Peripheral Interface" Master.
|
||||
|
||||
This interface can be used for communication with SPI slave devices,
|
||||
such as FLASH memory, LCD screens and other modules or integrated circuits.
|
||||
|
||||
|
||||
In this example, we use config SPI_IS_AS_MASTER to decide if device is master or slave.
|
||||
If SPI_IS_AS_MASTER is 1, then device is master.
|
||||
If SPI_IS_AS_MASTER is 0, then device is slave.
|
||||
|
||||
We connect wires as below:
|
||||
master's MOSI (PC_2) connect to slave's MOSI (PC_2)
|
||||
master's MISO (PC_3) connect to slave's MISO (PC_3)
|
||||
master's SCLK (PC_1) connect to slave's SCLK (PC_1)
|
||||
master's CS (PC_0) connect to slave's CS (PC_0)
|
||||
|
||||
This example shows master sends data to slave.
|
||||
We bootup slave first, and then bootup master.
|
||||
Then log will presents that master sending data to slave.
|
||||
To ensure the order is correct, we use a GPIO pin to notify the master that the slave device is ready to write or read data.
|
||||
Loading…
Add table
Add a link
Reference in a new issue