!
uint8 data——8 bit data sending.
•
! Note:
Yellow line: CS, blue line: CLK, red line: MOSI, green line: MISO.
6. void spi_byte_read_espslave(uint8 spi_no,uint8 *data)
Function:
Read one byte data from slave SPI and read other SPI slave devices. As the slave device is
set at 7bits command+1bit address+8bits data, data sending requires 16 bits transmission
and the first byte is 0b0000011+0 (refer to Section 4.3.3), i.e. 0x06. The second Byte is
data sending. The actual operating waveform is illustrated in Figure 4-2.
For other full duplex slave devices, 16 bits slave communication should be set. The
effective data should be put to the second byte of slave sending caching which will be
received by master ESP8266.
Parameters:
uint8 spi_no——The number of SPI module. Only input SPI and HSPI. Any other
•
inputs are invalid.
uint8* data——8 bit memory address data receiving.
•
Espressif
!
Figure 4-1. The waveform of spi_byte_write_espslave written into slave ESP8266
24 86
!
/!
4. SPI Communication User Guide
2016.05
Need help?
Do you have a question about the ESP8266 and is the answer not in the manual?
Questions and answers