]> granicus.if.org Git - esp-idf/commitdiff
spi: fix the misleading example, letting the master wait until slave is ready
authorMichael (XIAO Xufeng) <xiaoxufeng@espressif.com>
Wed, 29 Aug 2018 10:40:21 +0000 (18:40 +0800)
committerMichael (XIAO Xufeng) <xiaoxufeng@espressif.com>
Wed, 29 Aug 2018 10:40:21 +0000 (18:40 +0800)
examples/peripherals/spi_slave/sender/main/app_main.c

index c3eb5659272378de4a9fa6d70be320bdaaa1b3a3..b033fcf2a9345e9d270443b6e37cbacc9c09385c 100644 (file)
@@ -152,7 +152,7 @@ void app_main()
         t.tx_buffer=sendbuf;
         t.rx_buffer=recvbuf;
         //Wait for slave to be ready for next byte before sending
-        xSemaphoreTake(rdySem, 100);//portMAX_DELAY); //Wait until slave is ready
+        xSemaphoreTake(rdySem, portMAX_DELAY); //Wait until slave is ready
         ret=spi_device_transmit(handle, &t);
         printf("Received: %s\n", recvbuf);
         n++;