mirror of
https://github.com/apache/nuttx.git
synced 2026-05-09 23:12:17 +08:00
drivers/sensors: fix misplaced endif in bmi160_base.c
Move the #endif preprocessor guard to after bmi160_transferspi() so that both bmi160_configspi() and bmi160_transferspi() are properly enclosed within the SPI conditional compilation block. Signed-off-by: likun17 <likun17@xiaomi.com>
This commit is contained in:
@@ -49,7 +49,6 @@ static void bmi160_configspi(FAR struct spi_dev_s *spi)
|
||||
SPI_HWFEATURES(spi, 0);
|
||||
SPI_SETFREQUENCY(spi, BMI160_SPI_MAXFREQUENCY);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: bmi160_transferspi
|
||||
@@ -122,6 +121,7 @@ static void bmi160_transferspi(FAR struct spi_dev_s *spi, bool write,
|
||||
|
||||
SPI_LOCK(spi, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
||||
Reference in New Issue
Block a user