Fix Error: chip/stm32_spi.c:571:23: error: unused function 'spi_getreg8'

and unused function 'spi_putreg8'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-20 14:02:52 +08:00 committed by archer
parent 6386596731
commit ea171d6e5d

View File

@ -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 * 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, static inline void spi_putreg8(struct stm32_spidev_s *priv,
uint8_t offset, uint8_t value) uint8_t offset, uint8_t value)
{ {
putreg8(value, priv->spibase + offset); putreg8(value, priv->spibase + offset);
} }
#endif
/**************************************************************************** /****************************************************************************
* Name: spi_readword * Name: spi_readword