!
1, communication count increases by 1****//
spi_sta.byte_value=READ_PERI_REG(SPI_STATUS(HSPI))&0xff;
(uint32)spi_sta.byte_value);
into the memory******//
(idx<<2));
\r",recv_data);
(recv_data>>8)&0xff;
(recv_data>>16)&0xff;
(recv_data>>24)&0xff;
set to be 0*************//
spi_sta.byte_value=READ_PERI_REG(SPI_STATUS(HSPI))&0xff;
(uint32)spi_sta.byte_value);
************************************************//
the program is used to copy the data read to the read buffer**/
Espressif
if(regvalue&SPI_SLV_WR_BUF_DONE){
//*****complete the write operation, wr_busy set to be
spi_sta.elm_value.wr_busy=1;
spi_sta.elm_value.comm_cnt++;
WRITE_PERI_REG(SPI_STATUS(HSPI),
//**********************************************//
//*******move the data received by the register
idx=0;
while(idx<8){
recv_data=READ_PERI_REG(SPI_W0(HSPI)+
//os_printf("rcv data : 0x%x \n
spi_data[idx<<2] = recv_data&0xff;
spi_data[(idx<<2)+1] =
spi_data[(idx<<2)+2] =
spi_data[(idx<<2)+3] =
idx++;
}
//***********************************//
//************data transmission completed, wr_busy
spi_sta.elm_value.wr_busy=0;
WRITE_PERI_REG(SPI_STATUS(HSPI),
//
/***testing part, it can be revised. This part of
37 86
!
/!
6. SPI Wi-Fi Passthrough 1-Interrupt Mode
2016.05
Need help?
Do you have a question about the ESP8266 and is the answer not in the manual?
Questions and answers