mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-24 01:25:36 +00:00
exclude rom headers in examples
1. avoid including rom headers directly in examples 2. add common API interface for CRC calculation in esp_common component
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include "esp_event_loop.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "soc/rtc_periph.h"
|
||||
#include "esp32/rom/cache.h"
|
||||
#include "driver/spi_master.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_spi_flash.h"
|
||||
@@ -39,12 +38,12 @@
|
||||
/*
|
||||
SPI sender (master) example.
|
||||
|
||||
This example is supposed to work together with the SPI receiver. It uses the standard SPI pins (MISO, MOSI, SCLK, CS) to
|
||||
This example is supposed to work together with the SPI receiver. It uses the standard SPI pins (MISO, MOSI, SCLK, CS) to
|
||||
transmit data over in a full-duplex fashion, that is, while the master puts data on the MOSI pin, the slave puts its own
|
||||
data on the MISO pin.
|
||||
|
||||
This example uses one extra pin: GPIO_HANDSHAKE is used as a handshake pin. The slave makes this pin high as soon as it is
|
||||
ready to receive/send data. This code connects this line to a GPIO interrupt which gives the rdySem semaphore. The main
|
||||
ready to receive/send data. This code connects this line to a GPIO interrupt which gives the rdySem semaphore. The main
|
||||
task waits for this semaphore to be given before queueing a transmission.
|
||||
*/
|
||||
|
||||
@@ -137,7 +136,7 @@ void app_main(void)
|
||||
ret=spi_bus_add_device(HSPI_HOST, &devcfg, &handle);
|
||||
assert(ret==ESP_OK);
|
||||
|
||||
//Assume the slave is ready for the first transmission: if the slave started up before us, we will not detect
|
||||
//Assume the slave is ready for the first transmission: if the slave started up before us, we will not detect
|
||||
//positive edge on the handshake line.
|
||||
xSemaphoreGive(rdySem);
|
||||
|
||||
|
Reference in New Issue
Block a user