| Electronic Components Datasheet Search |
|
ESP8266 Datasheet(PDF) 61 Page - ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. |
|
|
|||||||||||||||||||||||||||||
ESP8266 Datasheet(HTML) 61 Page - ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. |
|
61 / 117 page ![]() ! 6. SPI Wi-Fi Passthrough 1-Interrupt Mode 1. void spi_slave_init(uint8 spi_no) Function: Initialise the SPI slave mode, set the IO interface to SPI mode, start the SPI transmission interrupt, and register spi_slave_isr_handler. The communication format is set to be 8 bits command + 8 bits address + 256 bits (32 Bytes) read/write data. Parameters: spi_no: number of the SPI module. The ESP8266 processor has two SPI modules (SPI and HSPI) with the same functions. Value to be selected: SPI or HSPI. 2. spi_slave_isr_sta(void *para) Function and trigger condition: It's the SPI interrupt handler function. When the master successfully reads data from or writes data into the slave, the interrupt will be triggered. Users can revise the interrupt service routine in order to attain the communication functions they need. The code is shown as below: struct spi_slave_status_element { uint8 wr_busy:1; uint8 rd_empty :1; uint8 comm_cnt :3; uint8 res :3; }; union spi_slave_status { struct spi_slave_status_element elm_value; uint8 byte_value; }; void spi_slave_isr_sta(void *para) { uint32 regvalue,calvalue; uint32 recv_data,send_data; union spi_slave_status spi_sta; if(READ_PERI_REG(0x3ff00020)&BIT4){ //following 3 lines is to clear isr signal Espressif ! /! 53 104 2017.05 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |