You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/13 14:35:36 UTC
[incubator-nuttx] 12/18: Fix Error: chip/s32k1xx_lpspi.c:581:9: error: unused function 's32k1xx_lpspi_[write|read]byte'
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit e0f1c4169522a352078cf26d696f5a1326f95164
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 15:36:33 2022 +0800
Fix Error: chip/s32k1xx_lpspi.c:581:9: error: unused function 's32k1xx_lpspi_[write|read]byte'
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/arm/src/s32k1xx/s32k1xx_lpspi.c | 101 -----------------------------------
1 file changed, 101 deletions(-)
diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
index 6b02673bd8..a80636d368 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
@@ -380,47 +380,6 @@ static struct pm_callback_s g_spi1_pmcb =
* Private Functions
****************************************************************************/
-/****************************************************************************
- * Name: s32k1xx_lpspi_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 s32k1xx_lpspi_getreg8(struct s32k1xx_lpspidev_s *priv,
- uint8_t offset)
-{
- return getreg8(priv->spibase + offset);
-}
-
-/****************************************************************************
- * Name: s32k1xx_lpspi_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
- *
- ****************************************************************************/
-
-static inline void s32k1xx_lpspi_putreg8(struct s32k1xx_lpspidev_s *priv,
- uint8_t offset, uint8_t value)
-{
- putreg8(value, priv->spibase + offset);
-}
-
/****************************************************************************
* Name: s32k1xx_lpspi_getreg
*
@@ -563,66 +522,6 @@ static inline void s32k1xx_lpspi_write_dword(struct s32k1xx_lpspidev_s
#endif
-/****************************************************************************
- * Name: s32k1xx_lpspi_readbyte
- *
- * Description:
- * Read one byte from SPI
- *
- * Input Parameters:
- * priv - Device-specific state data
- *
- * Returned Value:
- * Byte as read
- *
- ****************************************************************************/
-
-static inline
-uint8_t s32k1xx_lpspi_readbyte(struct s32k1xx_lpspidev_s *priv)
-{
- /* Wait until the receive buffer is not empty */
-
- while ((s32k1xx_lpspi_getreg32(priv, S32K1XX_LPSPI_SR_OFFSET) &
- LPSPI_SR_RDF) == 0)
- {
- }
-
- /* Then return the received byte */
-
- return s32k1xx_lpspi_getreg8(priv, S32K1XX_LPSPI_RDR_OFFSET);
-}
-
-/****************************************************************************
- * Name: s32k1xx_lpspi_writebyte
- *
- * Description:
- * Write one 8-bit frame to the SPI FIFO
- *
- * Input Parameters:
- * priv - Device-specific state data
- * byte - Byte to send
- *
- * Returned Value:
- * None
- *
- ****************************************************************************/
-
-static inline
-void s32k1xx_lpspi_writebyte(struct s32k1xx_lpspidev_s *priv,
- uint8_t byte)
-{
- /* Wait until the transmit buffer is empty */
-
- while ((s32k1xx_lpspi_getreg32(priv, S32K1XX_LPSPI_SR_OFFSET) &
- LPSPI_SR_TDF) == 0)
- {
- }
-
- /* Then send the byte */
-
- s32k1xx_lpspi_putreg8(priv, S32K1XX_LPSPI_TDR_OFFSET, byte);
-}
-
/****************************************************************************
* Name: s32k1xx_lpspi_9to16bitmode
*