You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2022/11/21 09:39:20 UTC
[incubator-nuttx] 08/12: Fix Error: chip/stm32_spi.c:571:23: error: unused function 'spi_getreg8'
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ea171d6e5d00638f5fc39d9ba8fd839010939b3c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 20 14:02:52 2022 +0800
Fix Error: chip/stm32_spi.c:571:23: error: unused function 'spi_getreg8'
and unused function 'spi_putreg8'
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/arm/src/stm32f0l0g0/stm32_spi.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/arch/arm/src/stm32f0l0g0/stm32_spi.c b/arch/arm/src/stm32f0l0g0/stm32_spi.c
index 136680731b..f72892d2df 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_spi.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_spi.c
@@ -553,27 +553,6 @@ static inline void spi_rx_mode(struct stm32_spidev_s *priv, bool enable)
}
}
-/****************************************************************************
- * Name: spi_getreg8
- *
- * Description:
- * Get the contents of the SPI register at offset
- *
- * Input Parameters:
- * priv - private SPI device structure
- * offset - offset to the register of interest
- *
- * Returned Value:
- * The contents of the 8-bit register
- *
- ****************************************************************************/
-
-static inline uint8_t spi_getreg8(struct stm32_spidev_s *priv,
- uint8_t offset)
-{
- return getreg8(priv->spibase + offset);
-}
-
/****************************************************************************
* Name: spi_putreg8
*
@@ -587,11 +566,13 @@ static inline uint8_t spi_getreg8(struct stm32_spidev_s *priv,
*
****************************************************************************/
+#ifdef HAVE_IP_SPI_V2
static inline void spi_putreg8(struct stm32_spidev_s *priv,
uint8_t offset, uint8_t value)
{
putreg8(value, priv->spibase + offset);
}
+#endif
/****************************************************************************
* Name: spi_readword