up
This commit is contained in:
@@ -2,7 +2,7 @@ dependencies:
|
||||
idf:
|
||||
source:
|
||||
type: idf
|
||||
version: 5.3.1
|
||||
version: 5.5.2
|
||||
manifest_hash: a52a8cabe7f10f1636effa39e0be0f2d62531803ed5f518e7921b728e64c8752
|
||||
target: esp32c3
|
||||
version: 2.0.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "spi.h"
|
||||
|
||||
#define SPI_HOST SPI2_HOST
|
||||
#define USE_SPI_HOST SPI2_HOST
|
||||
|
||||
static const char *TAG = "SPI_2";
|
||||
|
||||
@@ -24,7 +24,7 @@ void spi_init()
|
||||
};
|
||||
|
||||
// 2. 初始化 SPI 总线
|
||||
ret = spi_bus_initialize(SPI_HOST, &buscfg, SPI_DMA_CH_AUTO);
|
||||
ret = spi_bus_initialize(USE_SPI_HOST, &buscfg, SPI_DMA_CH_AUTO);
|
||||
if (ret != ESP_OK)
|
||||
{
|
||||
ESP_LOGE(TAG, "IO总线初始化失败");
|
||||
@@ -50,7 +50,7 @@ void spi_init()
|
||||
|
||||
};
|
||||
|
||||
ret = spi_bus_add_device(SPI_HOST, &devcfg, &lcd_spi);
|
||||
ret = spi_bus_add_device(USE_SPI_HOST, &devcfg, &lcd_spi);
|
||||
if (ret != ESP_OK)
|
||||
{
|
||||
ESP_LOGE(TAG, "SPI 设备配置失败");
|
||||
|
||||
Reference in New Issue
Block a user