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/11/20 13:35:02 UTC

[incubator-nuttx] 10/26: Fix chip/s32k3xx_lpspi.c:719:23: error: unused function 's32k3xx_lpspi_readbyte'

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 e18d5870db006e859dd553773dd39d5162ec8913
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Nov 19 12:32:00 2022 +0800

    Fix chip/s32k3xx_lpspi.c:719:23: error: unused function 's32k3xx_lpspi_readbyte'
    
    and chip/s32k3xx_lpspi.c:748:20: error: unused function 's32k3xx_lpspi_writebyte'
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/s32k3xx/s32k3xx_lpspi.c | 58 ------------------------------------
 1 file changed, 58 deletions(-)

diff --git a/arch/arm/src/s32k3xx/s32k3xx_lpspi.c b/arch/arm/src/s32k3xx/s32k3xx_lpspi.c
index a7d1bca823..109c81a5dc 100644
--- a/arch/arm/src/s32k3xx/s32k3xx_lpspi.c
+++ b/arch/arm/src/s32k3xx/s32k3xx_lpspi.c
@@ -720,64 +720,6 @@ static inline void s32k3xx_lpspi_write_dword(struct s32k3xx_lpspidev_s *priv,
 
 #endif
 
-/****************************************************************************
- * Name: s32k3xx_lpspi_readbyte
- *
- * Description:
- *   Read one byte from SPI
- *
- * Input Parameters:
- *   priv - Device-specific state data
- *
- * Returned Value:
- *   Byte as read
- *
- ****************************************************************************/
-
-static inline uint8_t s32k3xx_lpspi_readbyte(struct s32k3xx_lpspidev_s *priv)
-{
-  /* Wait until the receive buffer is not empty */
-
-  while ((s32k3xx_lpspi_getreg32(priv, S32K3XX_LPSPI_SR_OFFSET) &
-          LPSPI_SR_RDF) == 0)
-    {
-    }
-
-  /* Then return the received byte */
-
-  return s32k3xx_lpspi_getreg8(priv, S32K3XX_LPSPI_RDR_OFFSET);
-}
-
-/****************************************************************************
- * Name: s32k3xx_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 s32k3xx_lpspi_writebyte(struct s32k3xx_lpspidev_s *priv,
-                                           uint8_t byte)
-{
-  /* Wait until the transmit buffer is empty */
-
-  while ((s32k3xx_lpspi_getreg32(priv, S32K3XX_LPSPI_SR_OFFSET) &
-          LPSPI_SR_TDF) == 0)
-    {
-    }
-
-  /* Then send the byte */
-
-  s32k3xx_lpspi_putreg8(priv, S32K3XX_LPSPI_TDR_OFFSET, byte);
-}
-
 /****************************************************************************
  * Name: s32k3xx_lpspi_9to16bitmode
  *