You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/10/30 15:03:45 UTC
[incubator-nuttx] 04/22: Fix Error: chip/gd32f4xx_spi.c:924:20: error: unused function 'spi_putreg16' [-Werror,-Wunused-function]
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ad35572751c217786e97ade33dec897a54890f08
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Oct 26 10:22:37 2022 +0800
Fix Error: chip/gd32f4xx_spi.c:924:20: error: unused function 'spi_putreg16' [-Werror,-Wunused-function]
static inline void spi_putreg16(struct gd32_spidev_s *priv,
^
Error: chip/gd32f4xx_spi.c:945:23: error: unused function 'spi_getreg8' [-Werror,-Wunused-function]
static inline uint8_t spi_getreg8(struct gd32_spidev_s *priv,
^
Error: chip/gd32f4xx_spi.c:967:20: error: unused function 'spi_putreg8' [-Werror,-Wunused-function]
static inline void spi_putreg8(struct gd32_spidev_s *priv,
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/arm/src/gd32f4/gd32f4xx_spi.c | 71 --------------------------------------
1 file changed, 71 deletions(-)
diff --git a/arch/arm/src/gd32f4/gd32f4xx_spi.c b/arch/arm/src/gd32f4/gd32f4xx_spi.c
index 13ee2ac536..fee72e36bc 100644
--- a/arch/arm/src/gd32f4/gd32f4xx_spi.c
+++ b/arch/arm/src/gd32f4/gd32f4xx_spi.c
@@ -193,12 +193,6 @@ static inline void spi_putreg(struct gd32_spidev_s *priv,
uint8_t offset, uint32_t value);
static inline uint16_t spi_getreg16(struct gd32_spidev_s *priv,
uint8_t offset);
-static inline void spi_putreg16(struct gd32_spidev_s *priv,
- uint8_t offset, uint16_t value);
-static inline uint8_t spi_getreg8(struct gd32_spidev_s *priv,
- uint8_t offset);
-static inline void spi_putreg8(struct gd32_spidev_s *priv,
- uint8_t offset, uint8_t value);
static inline uint16_t spi_readword(struct gd32_spidev_s *priv);
static inline void spi_writeword(struct gd32_spidev_s *priv,
@@ -905,71 +899,6 @@ static inline uint16_t spi_getreg16(struct gd32_spidev_s *priv,
return getreg16(priv->spibase + offset);
}
-/****************************************************************************
- * Name: spi_putreg16
- *
- * Description:
- * Write a 16-bit value to the SPI register at offset
- *
- * Input Parameters:
- * priv - private SPI device structure
- * offset - offset to the register of interest
- * value - the 16-bit value to be written
- *
- * Returned Value:
- * Nothing
- *
- ****************************************************************************/
-
-static inline void spi_putreg16(struct gd32_spidev_s *priv,
- uint8_t offset, uint16_t value)
-{
- putreg16(value, priv->spibase + offset);
-}
-
-/****************************************************************************
- * Name: spi_getreg8
- *
- * Description:
- * Get the 8 bit 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 gd32_spidev_s *priv,
- uint8_t offset)
-{
- return getreg8(priv->spibase + offset);
-}
-
-/****************************************************************************
- * Name: spi_putreg8
- *
- * Description:
- * Write a 8-bit value to the SPI register at offset
- *
- * Input Parameters:
- * priv - private SPI device structure
- * offset - offset to the register of interest
- * value - the 8-bit value to be written
- *
- * Returned Value:
- * Nothing
- *
- ****************************************************************************/
-
-static inline void spi_putreg8(struct gd32_spidev_s *priv,
- uint8_t offset, uint8_t value)
-{
- putreg8(value, priv->spibase + offset);
-}
-
/****************************************************************************
* Name: spi_modifyreg
*