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 <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
202408c6e7
commit
ad35572751
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue