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/01 16:12:54 UTC

[incubator-nuttx] 06/07: Fix lpc17_40_serial.c:705:24: error: unused function 'lpc17_40_uartcclkdiv'

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 4578df5cbba4273fe13449180247cba0d5f845dc
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Oct 31 22:36:28 2022 +0800

    Fix lpc17_40_serial.c:705:24: error: unused function 'lpc17_40_uartcclkdiv'
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c
index d0bb695250..aab955a5ac 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c
@@ -703,7 +703,7 @@ static inline uint32_t lpc17_40_uartcclkdiv(uint32_t baud)
  *
  ****************************************************************************/
 
-#  ifdef LPC176x
+#  if defined(LPC176x) && defined(USE_EARLYSERIALINIT)
 static inline uint32_t lpc17_40_uartcclkdiv(uint32_t baud)
 {
   /* Ignoring the fractional divider, the BAUD is given by:
@@ -790,7 +790,7 @@ static inline uint32_t lpc17_40_uartcclkdiv(uint32_t baud)
       return SYSCON_PCLKSEL_CCLK8;
     }
 }
-#  endif /* LPC176x */
+#  endif /* LPC176x && USE_EARLYSERIALINIT */
 #endif /* CONFIG_LPC17_40_UART_USE_FRACTIONAL_DIVIDER */
 
 /****************************************************************************