mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
STM32/EFM32: If any hardware feature other and LSBFIRST is selected, return -ENOSYS.
This commit is contained in:
@@ -1121,7 +1121,7 @@ static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features)
|
||||
priv->lsbfirst = lsbfirst;
|
||||
}
|
||||
|
||||
return OK;
|
||||
return ((hwfeatures & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1221,7 +1221,7 @@ static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features)
|
||||
spi_modifycr1(priv, setbits, clrbits);
|
||||
spi_modifycr1(priv, SPI_CR1_SPE, 0);
|
||||
|
||||
return OK;
|
||||
return ((hwfeatures & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1327,7 +1327,7 @@ static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features)
|
||||
spi_modifycr1(priv, setbits, clrbits);
|
||||
spi_modifycr1(priv, SPI_CR1_SPE, 0);
|
||||
|
||||
return OK;
|
||||
return ((hwfeatures & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1188,7 +1188,7 @@ static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features)
|
||||
spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, setbits, clrbits);
|
||||
spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, SPI_CR1_SPE, 0);
|
||||
|
||||
return OK;
|
||||
return ((hwfeatures & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user