diff options
-rwxr-xr-x | nuttx/arch/arm/src/kl/kl_spi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/kl/kl_spi.c b/nuttx/arch/arm/src/kl/kl_spi.c index 4806c91ef..efce2d6e8 100755 --- a/nuttx/arch/arm/src/kl/kl_spi.c +++ b/nuttx/arch/arm/src/kl/kl_spi.c @@ -676,17 +676,17 @@ FAR struct spi_dev_s *kl_spiinitialize(int port) /* Enable clocking */ regval = getreg32(KL_SIM_SCGC4); - regval |= SIM_SCGC4_SPI1; + regval |= SIM_SCGC4_SPI0; putreg32(regval, KL_SIM_SCGC4); } else #endif -#ifdef CONFIG_KL_SPI0 - if (port == 0) +#ifdef CONFIG_KL_SPI1 + if (port == 1) { priv = &g_spi1dev; - /* Configure pins for SPI0 */ + /* Configure pins for SPI1 */ kl_configgpio(PIN_SPI1_SCK); kl_configgpio(PIN_SPI1_MISO); |