From 94655e95ea7102deb1edad709e93e950a69a1b88 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 13 Nov 2022 17:00:31 +0800 Subject: [PATCH] Fix chip/sam_serial.c:900:20: error: unused function 'sam_restoreusartint' [-Werror,-Wunused-function] Signed-off-by: Xiang Xiao --- arch/arm/src/samv7/sam_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/samv7/sam_serial.c b/arch/arm/src/samv7/sam_serial.c index c464d94ef1..b6cc019642 100644 --- a/arch/arm/src/samv7/sam_serial.c +++ b/arch/arm/src/samv7/sam_serial.c @@ -897,6 +897,7 @@ static inline void sam_serialout(struct sam_dev_s *priv, int offset, * Name: sam_restoreusartint ****************************************************************************/ +#ifdef CONFIG_SERIAL_TERMIOS static inline void sam_restoreusartint(struct sam_dev_s *priv, uint32_t imr) { /* Restore the previous interrupt state (assuming all interrupts @@ -905,6 +906,7 @@ static inline void sam_restoreusartint(struct sam_dev_s *priv, uint32_t imr) sam_serialout(priv, SAM_UART_IER_OFFSET, imr); } +#endif /**************************************************************************** * Name: sam_disableallints