mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Fix errors in KL25Z SPI driver reported by Alan Carvalho de Assis
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user