up
This commit is contained in:
@@ -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