|
|
@@ -11,7 +11,7 @@
|
|
|
#include "wm_dma.h"
|
|
|
#include "wm_pmu.h"
|
|
|
|
|
|
-#define LUAT_LOG_TAG "luat.spi"
|
|
|
+#define LUAT_LOG_TAG "spi"
|
|
|
#include "luat_log.h"
|
|
|
#include "luat_timer.h"
|
|
|
|
|
|
@@ -49,7 +49,6 @@ int luat_spi_bus_setup(luat_spi_device_t* spi_dev){
|
|
|
wm_spi_di_config(WM_IO_PB_03);
|
|
|
wm_spi_do_config(WM_IO_PB_05);
|
|
|
}
|
|
|
- // #ifdef AIR103
|
|
|
else if (bus_id == 1) { // 本质上是mode=1,不是spi1,该模式下psram可用
|
|
|
wm_spi_ck_config(WM_IO_PB_15);
|
|
|
wm_spi_di_config(WM_IO_PB_16);
|
|
|
@@ -67,7 +66,6 @@ int luat_spi_bus_setup(luat_spi_device_t* spi_dev){
|
|
|
tls_open_peripheral_clock(TLS_PERIPHERAL_TYPE_SDIO_MASTER);
|
|
|
return 0;
|
|
|
}
|
|
|
- // #endif
|
|
|
else{
|
|
|
LLOGD("spi_bus error");
|
|
|
return -1;
|
|
|
@@ -95,7 +93,6 @@ int luat_spi_setup(luat_spi_t* spi) {
|
|
|
wm_spi_di_config(WM_IO_PB_03);
|
|
|
wm_spi_do_config(WM_IO_PB_05);
|
|
|
}
|
|
|
- // #ifdef AIR103
|
|
|
else if (spi->id == 1) { // 本质上是mode=1,不是spi1,该模式下psram可用
|
|
|
if (spi->cs == 0 || spi->cs == WM_IO_PB_14)
|
|
|
wm_spi_cs_config(WM_IO_PB_14);
|
|
|
@@ -121,7 +118,6 @@ int luat_spi_setup(luat_spi_t* spi) {
|
|
|
sdio_spi_init(spi->bandrate);
|
|
|
return 0;
|
|
|
}
|
|
|
- // #endif
|
|
|
else {
|
|
|
return -1;
|
|
|
}
|