From 720acac6afafb3f1feb44baebef8cddf40c87899 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 19 Nov 2022 13:02:51 +0800 Subject: [PATCH] Fix chip/stm32_usbdev.c:929:20: error: unused function 'stm32_setstatusout' Signed-off-by: Xiang Xiao --- arch/arm/src/stm32/stm32_usbdev.c | 22 ---------------------- arch/arm/src/stm32/stm32_usbfs.c | 22 ---------------------- arch/arm/src/stm32f0l0g0/stm32_usbdev.c | 21 --------------------- 3 files changed, 65 deletions(-) diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c index 79e0f9187a..dc70cad438 100644 --- a/arch/arm/src/stm32/stm32_usbdev.c +++ b/arch/arm/src/stm32/stm32_usbdev.c @@ -406,8 +406,6 @@ static inline void stm32_seteptype(uint8_t epno, uint16_t type); static inline void stm32_seteptxaddr(uint8_t epno, uint16_t addr); -static inline void - stm32_setstatusout(uint8_t epno); static inline void stm32_clrstatusout(uint8_t epno); static void stm32_clrrxdtog(uint8_t epno); @@ -922,26 +920,6 @@ static inline void stm32_seteptype(uint8_t epno, uint16_t type) stm32_putreg(regval, epaddr); } -/**************************************************************************** - * Name: stm32_setstatusout - ****************************************************************************/ - -static inline void stm32_setstatusout(uint8_t epno) -{ - uint32_t epaddr = STM32_USB_EPR(epno); - uint16_t regval; - - /* For a BULK endpoint the EP_KIND bit is used to enabled double buffering; - * for a CONTROL endpoint, it is set to indicate that a status OUT - * transaction is expected. The bit is not used with out endpoint types. - */ - - regval = stm32_getreg(epaddr); - regval &= EPR_NOTOG_MASK; - regval |= USB_EPR_EP_KIND; - stm32_putreg(regval, epaddr); -} - /**************************************************************************** * Name: stm32_clrstatusout ****************************************************************************/ diff --git a/arch/arm/src/stm32/stm32_usbfs.c b/arch/arm/src/stm32/stm32_usbfs.c index 44e783dcc5..3205b2638e 100644 --- a/arch/arm/src/stm32/stm32_usbfs.c +++ b/arch/arm/src/stm32/stm32_usbfs.c @@ -387,8 +387,6 @@ static inline void stm32_seteptype(uint8_t epno, uint16_t type); static inline void stm32_seteptxaddr(uint8_t epno, uint16_t addr); -static inline void - stm32_setstatusout(uint8_t epno); static inline void stm32_clrstatusout(uint8_t epno); static void stm32_clrrxdtog(uint8_t epno); @@ -904,26 +902,6 @@ static inline void stm32_seteptype(uint8_t epno, uint16_t type) stm32_putreg(regval, epaddr); } -/**************************************************************************** - * Name: stm32_setstatusout - ****************************************************************************/ - -static inline void stm32_setstatusout(uint8_t epno) -{ - uint32_t epaddr = STM32_USB_EPR(epno); - uint16_t regval; - - /* For a BULK endpoint the EP_KIND bit is used to enabled double buffering; - * for a CONTROL endpoint, it is set to indicate that a status OUT - * transaction is expected. The bit is not used with out endpoint types. - */ - - regval = stm32_getreg(epaddr); - regval &= EPR_NOTOG_MASK; - regval |= USB_EPR_EP_KIND; - stm32_putreg(regval, epaddr); -} - /**************************************************************************** * Name: stm32_clrstatusout ****************************************************************************/ diff --git a/arch/arm/src/stm32f0l0g0/stm32_usbdev.c b/arch/arm/src/stm32f0l0g0/stm32_usbdev.c index d08370a55b..a213f884b4 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_usbdev.c +++ b/arch/arm/src/stm32f0l0g0/stm32_usbdev.c @@ -382,7 +382,6 @@ static inline uint16_t stm32_geteprxaddr(uint8_t epno); static inline void stm32_setepaddress(uint8_t epno, uint16_t addr); static inline void stm32_seteptype(uint8_t epno, uint16_t type); static inline void stm32_seteptxaddr(uint8_t epno, uint16_t addr); -static inline void stm32_setstatusout(uint8_t epno); static inline void stm32_clrstatusout(uint8_t epno); static void stm32_clrrxdtog(uint8_t epno); static void stm32_clrtxdtog(uint8_t epno); @@ -866,26 +865,6 @@ static inline void stm32_seteptype(uint8_t epno, uint16_t type) stm32_putreg(regval, epaddr); } -/**************************************************************************** - * Name: stm32_setstatusout - ****************************************************************************/ - -static inline void stm32_setstatusout(uint8_t epno) -{ - uint32_t epaddr = STM32_USB_EPR(epno); - uint16_t regval; - - /* For a BULK endpoint the EP_KIND bit is used to enabled double buffering; - * for a CONTROL endpoint, it is set to indicate that a status OUT - * transaction is expected. The bit is not used with out endpoint types. - */ - - regval = stm32_getreg(epaddr); - regval &= EPR_NOTOG_MASK; - regval |= USB_EPR_EP_KIND; - stm32_putreg(regval, epaddr); -} - /**************************************************************************** * Name: stm32_clrstatusout ****************************************************************************/